💾 Archived View for hajime.4teri.de › dotfiles › file › scripts › add_bookmark.sh.gmi captured on 2021-12-05 at 23:47:19. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
add_bookmark.sh - dotfiles - Collection of my dotfiles
---
add_bookmark.sh (446B)
---
1 #! /bin/sh
2
3 title="$1"
4 url="$2"
5 db="$3"
6
7 if [ -z "$title" ]
8 then
9 printf "Enter title: "
10 read -r title
11 fi
12
13 if [ -z "$url" ]
14 then
15 printf "Enter url: "
16 read -r url
17 fi
18
19 if [ -z "$db" ]
20 then
21 printf "Enter database: "
22 read -r db
23 fi
24
25 if [ -z "$db" ]
26 then
27 db="/home/zocki/.config/pmb/bookmark.db"
28 else
29 db="/home/zocki/.config/pmb/$db.db"
30 fi
31
32 if [ -z "$title" ] || [ -z "$url" ]
33 then
34 echo "Aborting."
35 else
36 pmb -f "$db" -a n="$title",u="$url"
37 fi
generated w/ stagit-gemini