Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
32
.bin/OLD/bm
Executable file
32
.bin/OLD/bm
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this is work in progress
|
||||
|
||||
# bookmark file format descrition
|
||||
#
|
||||
# date | uri | tags | title
|
||||
# 2021-01-06 | http://example.com | tech, whatever | Title
|
||||
|
||||
add() {
|
||||
_date="$(date +"%Y-%m-%d")"
|
||||
_url="$1"
|
||||
shift
|
||||
_desc0="$@"
|
||||
_desc1="$(curl -sL $_url | hxclean | hxselect -ic 'title' 2>/dev/null)"
|
||||
printf '%s | %s | %s | %s\n' "$_date" "$_url" "$_desc0" "$_desc1"
|
||||
}
|
||||
|
||||
|
||||
case $1 in
|
||||
add) shift; add $@;
|
||||
;;
|
||||
rm)
|
||||
;;
|
||||
list)
|
||||
;;
|
||||
*) printf '%s\n%s\n%s\n' \
|
||||
"bm add <url> [descr] - Add new entry to bookmark file" \
|
||||
" del <url> - Delete entry from bookmark file" \
|
||||
" list [filter] - Show bookmark file";
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user