#!/bin/bash # # By Maxim F. Stewart # Contact: [maxim2131@gmail.com] OR [gamer1119@gmail.com] # # Copyright 2013 Maxim F. Stewart # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # #-------------------------------------------------------------------------# # Possibly use in future releases # wget http://www.google.com/s2/favicons?domain_url=${link} -O ./faveIcons/$i.png main() { lynx -force_html -dump --listonly ./bookmarks.html | awk '/^ *[0-9]+\. / { print $2}' > ./links.txt echo ' Bookish Home
" ' > ./bookMarksHomePg.html body; } body() { x=$(cat ./links.txt | wc -l) >> /dev/null ; i="1" while [ $i -le $x ]; do line=$(sed -n "${i}p" ./links.txt); link=$(echo "$line" | sed 's/*\///'); ./resources/bin/wkhtmltoimage --crop-w 1280 \ --crop-h 900 \ --width 1920 \ --height 1080 \ --quality 75 \ --quiet ${link} \ ./snapShots/$i.png echo "

"${link}"
" >> bookMarksHomePg.html i=$[$i++1] ; done echo ' ' >> ./bookMarksHomePg.html rm links.txt } main