openbookmark/openbookmark.sh

10 lines
440 B
Bash
Raw Permalink Normal View History

2023-03-06 18:28:24 -03:00
#!/bin/bash
raws="$(grep -v "Recent\(ly\)\? \(Bookmarked\|Tags\)" bookmarks.html | grep -o "<A.*</A>$" | grep -n ".*")"
2023-03-06 20:13:25 -03:00
titles="$(grep -on "\">.*</A>$" <<< "${raws}" | sed 's/">//;s/<\/A>$//')"
2023-03-06 18:28:24 -03:00
selection=$(dmenu -c -l 10 -bw 3 <<< "${titles}" | grep -o "^[0-9]*:")
url="$(grep "^${selection}" <<< "${raws}" | grep -o "HREF=\".*\" ADD_DATE" | sed 's/^HREF="//;s/" ADD_DATE$//')"
2023-03-06 18:28:24 -03:00
palemoon "${url}" || firefox "${url}" || chromium "${url}"