This Python package 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.
- 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
- Python 3.9+
- BeautifulSoup4
You can install the package using pip:
pip install pocket-to-bookmarks-html
After installation, you can run the script from the command line using:
pocket2bookmarks 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.
- The script parses the Pocket export HTML file using BeautifulSoup.
- It extracts the title, URL, and time added for each link.
- The extracted information is then formatted into a standard bookmarks HTML file.
- The resulting file can be imported into most web browsers as bookmarks.
- 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.
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
To set up the development environment:
-
Clone the repository:
git clone https://github.com/davidpoblador/pocket-to-bookmarks-html.git cd pocket-to-bookmarks-html
-
Install development dependencies:
pip install uv uv sync
Contributions, issues, and feature requests are welcome. Feel free to check the issues page if you want to contribute.
David Poblador i Garcia
For more information or support, please open an issue in the repository.