First commit.

This commit is contained in:
rjt 2022-04-04 17:28:32 +00:00
parent 24c7db49dc
commit ecac47a02a
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#!/bin/bash
# Converts plain list of URLs to minimal HTML importable by most browsers.
# usage: bookmarks-convert-netscape.sh [input] [output]
echo -e '<!DOCTYPE NETSCAPE-Bookmark-file-1>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n<dl>\n\t<dt><h3>Bookmarks from Mastodon</h3></dt>\n\t<dl>' > $2
for url in `cat ${1}`
do
echo -e '\t\t<dt><a href="'${url}'"></a>' >> $2
done
echo -e '\t</dl>\n</dl>' >> $2