Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # # # WHAT IS IT? # # #
- # This script converts plain-text URL links (each link started from new line)
- # into links that you can select and open in new tabs in firefox to import them
- # as bookmarks or open in tabs. This method is useful when coming from another browser
- # such as opera, safari, IE, etc. and if you used sqlite manager to get the URLs list but
- # can't import them into firefox (or another browser) directly.
- # # # HOW TO USE? # # #
- # Save links into file bookmarks.txt. Save script into somescript.sh in same dir.
- # Run script. It will create bookmarks.html. Now, to import created HTML file,
- # add (install) plugin "multi links" to firefox, open created bookmarks.html file
- # with firefox, press AND HOLD RIGHT MOUSE BUTTON (you can change it in plugin settings),
- # select all links, press the left mouse button on links and choose "Add to bookmarts"
- # or "Open in new tabs" etc. Have fun! // By Security XIII, 10.06.2014
- # # # SCRIPT STARTS HERE # # #
- # Specify file to import (TXT, each URL started from/by new line).
- infile=bookmarks.txt
- # Specify the resulting file (HTML).
- outfile=bookmarks.html
- # Counter
- count=0
- echo "Starting converting TXT file $infile to HTML file $outfile..."
- for url in $(cat $infile); do
- echo "<a href=$url>$url</a>" >> $outfile
- echo "<BR>" >> $outfile
- ((count++))
- done
- echo "Done converting TXT file $infile to HTML file $outfile, there was $count records converted. Thanks."
Advertisement
Add Comment
Please, Sign In to add comment