Skip to main content

A pocket to bookmarks.html converter

Project description

Pocket-to-Bookmarks Converter

This Python script converts a Pocket export HTML file to a standard bookmarks file format. It extracts links from your Pocket export and creates a new HTML file compatible with most web browsers' bookmark import features.

Features

  • Parses Pocket export HTML files
  • Extracts link information including title, URL, and time added
  • Generates a new HTML file in standard bookmarks format
  • Preserves the original "time added" information for each bookmark
  • Provides informative logging throughout the conversion process

Requirements

  • Python 3.6+
  • BeautifulSoup4

Installation

  1. Clone this repository or download the pocket-to-bookmarks-html.py file.
  2. Install the required dependencies:
pip install beautifulsoup4

Usage

Run the script from the command line, providing the input Pocket export file and the desired output file name:

python pocket-to-bookmarks-html.py input_pocket_export.html output_bookmarks.html

Replace input_pocket_export.html with the path to your Pocket export file, and output_bookmarks.html with your desired output file name.

How It Works

  1. The script parses the Pocket export HTML file using BeautifulSoup.
  2. It extracts the title, URL, and time added for each link.
  3. The extracted information is then formatted into a standard bookmarks HTML file.
  4. The resulting file can be imported into most web browsers as bookmarks.

Error Handling

  • The script includes error handling for file reading and writing operations.
  • Informative error messages are logged in case of any issues during the conversion process.

Logging

The script uses Python's logging module to provide information about the conversion process, including:

  • The number of links successfully converted
  • Any errors encountered during file operations
  • A warning if no links were found or processed

Contributing

Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.

License

MIT

Author

David Poblador i Garcia


For more information or support, please open an issue in the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pocket_to_bookmarks_html-0.1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pocket_to_bookmarks_html-0.1.2.tar.gz.

File metadata

File hashes

Hashes for pocket_to_bookmarks_html-0.1.2.tar.gz
Algorithm Hash digest
SHA256 35531bdd4dd7a3734ff047085f73a11e57e7e9aaab76cc6535d95e6ef4e4f1af
MD5 6bcf350eb7f9b173b172b7608600e08e
BLAKE2b-256 9a8cb6702167679a0c041118f8eccca9fbf5f15283d14293ae7cd15eaca990af

See more details on using hashes here.

File details

Details for the file pocket_to_bookmarks_html-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pocket_to_bookmarks_html-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe3b5189d706b8027095cdb4375c719be717aac000001c19a64d20346c5d6ff
MD5 25b5a11460d98be7490a7567cdd76abc
BLAKE2b-256 916f053ca3ed4ad598d10b65a0d3af6477410423cd80588b8c6a14c1795f8a4c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page