Add script to add some bookmark to buku

This commit is contained in:
Thomas Dehaeze 2020-03-22 19:47:54 +01:00
parent 65edc736ac
commit 7ce58ada11

View File

@ -257,12 +257,12 @@ Create a Password for the current website
config.bind(',P', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-passowrd.sh')
#+end_src
Use Pass to fill password and username (configuration is done in =~/.config/qutebrowser/password_fill_rc=).
Use Pass to fill password and username (configuration is done in =~/.config/qutebrowser/password_fill_rc=)
#+begin_src python
config.bind(',p', 'spawn --userscript password_fill')
#+END_SRC
Open Youtube video using MPV
Open Youtube video using =mpv=
#+begin_src python
config.bind(',m', 'spawn --detach mpv --force-window yes {url}')
config.bind(',M', 'hint links spawn --detach mpv --force-window yes {hint-url}')
@ -274,18 +274,13 @@ Cast Youtube to Chromecast
config.bind(',C', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/cast.sh {hint-url}')
#+END_SRC
Add url to refile.org
Add page to Bookmarks using =buku=
#+begin_src python
config.bind(',r', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh')
#+END_SRC
Add page to Bookmarks
#+begin_src python
config.bind(',b', 'spawn buku -a {url}')
config.bind(',b', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-add.sh')
config.bind(',B', 'spawn --userscript ~/.config/qutebrowser/userscripts/buku-rofi.sh')
#+end_src
Open bookmark using buku
Open bookmark using =buku=
#+begin_src python
config.bind(',o', 'spawn ~/bin/bukurun')
#+end_src
@ -337,20 +332,6 @@ See Amazon price history using CamelCamelCamel
youtube-dl -o - $1 | castnow --quiet -
#+end_src
** Add url to refile.org
:PROPERTIES:
:header-args: :tangle ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
Add the date and time of add to properties.
#+begin_src bash
echo "* TODO $QUTE_TITLE" >> ~/Dropbox/org/refile.org
echo "$QUTE_URL" >> ~/Dropbox/org/refile.org
echo "message-info 'Added to refile.org'" >> "$QUTE_FIFO"
#+end_src
** Password_fill_rc
:PROPERTIES:
:header-args+: :tangle ~/.config/qutebrowser/password_fill_rc
@ -411,5 +392,16 @@ Add the date and time of add to properties.
title=$(echo "$QUTE_TITLE" | rofi -p "Title" -dmenu -lines 1)
tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -p "Tags" -dmenu)
buku --add "$QUTE_URL" --tag "$tags" --title "$title"
buku --add "$QUTE_URL" --tag "$tags" --title "$title" && dunstify "Buku" "📑 Bookmark Added"
#+end_src
** Add Url to Buku without asking for information
:PROPERTIES:
:header-args: :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
buku --add $QUTE_URL --title "$QUTE_TITLE" && dunstify "Buku" "📑 Bookmark Added"
#+end_src