bdesham / py-pinboard2html

A Python script to convert your Pinboard bookmarks into an HTML bookmarks file

Repository from Github https://github.combdesham/py-pinboard2htmlRepository from Github https://github.combdesham/py-pinboard2html

py-pinboard2html

This is a simple Python script to download your Pinboard bookmarks and write them in the standard HTML-ish bookmarks file format.

Usage

This script requires Python 3.7 or later.

The script can be invoked like

python3 py-pinboard2html.py -u USERNAME -t TOKEN OUTPUT_FILE

Here USERNAME is your Pinboard username, TOKEN is your Pinboard API token (shown in the “password” section of your Pinboard preferences), and OUTPUT_FILE is the filename where the bookmarks should be saved. Specifying - as the OUTPUT_FILE will print the HTML to the standard output.

Version history

  • 2.0 (2024-07-22)
    • The script has been completely rewritten. It now requires Python 3.7 or later.
    • Hard-coding the username and password in the script file is no longer supported. The -u and -t command-line arguments are now mandatory.
    • The OUTPUT_FILE command-line argument is now mandatory. If you want to send the output to the standard output, you must now supply a value of - for OUTPUT_FILE instead of omitting the argument.
    • Non-ASCII characters are no longer HTML-escaped in the output. (HTML special characters are, of course, still escaped.)
    • The script no longer expands ~ in the OUTPUT_FILE argument into a reference to the home directory. This was always a misfeature; this kind of expansion is done by the shell and generally should not be done by other programs.
  • 1.2 (2012-08-01)
    • This version no longer stores or accepts passwords, but rather uses the API tokens described in this blog post. To use this version, obtain your token (something like "username:2AB96390C7DBE34") from your Pinboard settings. The part after the colon is your API token, which can be set on line 20 of the script or passed in with the -t argument.
    • Don't overwrite an existing bookmarks file if we get a bad response from the server.
  • 1.1 (2011-06-24): Changed my mind and renamed the project from pinboard2bookmarks to py-pinboard2html.
  • 1.0 (2011-06-24): Initial release.

Author

This script was written by Benjamin Esham.

This project is hosted on GitHub. Please feel free to submit pull requests.

License

Copyright © 2011–2012, 2024 Benjamin D. Esham. This program is released under the ISC license, which you can find in the file LICENSE.md.

About

A Python script to convert your Pinboard bookmarks into an HTML bookmarks file

License:ISC License


Languages

Language:Python 100.0%