Parse your browser's exported HTML bookmark file to Markdown.
Project description
bookmarkdown
Parse your browser's exported HTML bookmark file to Markdown.
Supported browsers: Brave.
Installation
pip install bookmarkdown
Usage
CLI
# Convert "bookmarks.html" to markdown and output to STDOUT
btm bookmarks.html
# Convert "bookmarks.html" to markdown and write to "bookmarks.md"
btm --output=bookmarks.md bookmarks.html
# Alternatively
btm bookmarks.html > bookmarks.md
Python
The BookmarkHTMLParser is an instance of the Python standard library's
HTMLParser and thus supports all its
methods.
from bookmarkdown import btm
parser = btm.BookmarkHTMLParser()
parser.feed(html_content)
# Access the data
parser.data
FAQ
Concerns
- Minimal dependencies.
bookmarkdownis likely to be installed on the system level Python to make use of thebtmscript. - Correctness. No one likes to lose a bookmark nor a different ordering.
Future ideas
The current application solves my needs pretty well, but there are additional applications I can think of. Such as merging multiple bookmark files.
Add functionality to the CLI and Python codebase to support the following:
# Merge bookmark html-file into existing markdown file.
btm --merge=[md-file] [html-file]
btm [html-file] # already implemented
# Read the `-r` as "reverse", i.e. instead of bookmark to markdown it
# becomes markdown to bookmark.
btm -r [md-file]
btm -r --merge=[md-file] [html-file]
Project structure
The project structure was automatically set up using cookiecutter and my Python template:
cutter-py.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bookmarkdown-0.1.0.tar.gz.
File metadata
- Download URL: bookmarkdown-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
175ec5bcbe4431299913a302e899cb6d36b174f5e427aa3ccdfa21fbb1af52db
|
|
| MD5 |
3c2fe04b2d0ef02707a4527f36f699ab
|
|
| BLAKE2b-256 |
821908beb1b497c2d4008d182e1577ab571e90cec6e9cc71fea9e520a1de82ab
|
File details
Details for the file bookmarkdown-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bookmarkdown-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ad458f015069526d5df9c19e9794e7437f891703b8dd077d823f00f994937dd
|
|
| MD5 |
910dcc8fe64392fdaf8e4247c34b428b
|
|
| BLAKE2b-256 |
570a09173ee9e22b25299bdaf1e37e74c49a697601ab18c170925b634ae3235f
|