A pocket to bookmarks.html converter
Project description
Pocket-to-Bookmarks HTML Converter
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.
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.9+
- BeautifulSoup4
Installation
You can install the package using pip:
pip install pocket-to-bookmarks-html
Usage
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.
How It Works
- 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.
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
Development
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
Contributing
Contributions, issues, and feature requests are welcome. Feel free to check the issues page if you want to contribute.
License
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
Built Distribution
File details
Details for the file pocket_to_bookmarks_html-0.1.3.tar.gz
.
File metadata
- Download URL: pocket_to_bookmarks_html-0.1.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e0e9d7923afe2a5247e249fd120f04848190a83a0d5e4856e3548ea290f2fcd |
|
MD5 | 9e4e81e1119776ea9a7e6641c2440ce1 |
|
BLAKE2b-256 | 9f24b6684a010ddf97fcbf109d2c916aaf62959bedc7842c68d6753543c565b2 |
File details
Details for the file pocket_to_bookmarks_html-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: pocket_to_bookmarks_html-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3761baeb55fc992d02686813cdf798e09a1a079f9bff53dc5316c9817072ed7c |
|
MD5 | 45c4786410c571664f118dfa260e47df |
|
BLAKE2b-256 | cfbd4d20c872021153378f2fa722317dbd9e8f199943188f742a6f156792210e |