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.
Metadata
Release files for bookmarkdown 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bookmarkdown-0.1.1.tar.gz | 4.4 kB | Without provenance | Details for bookmarkdown-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bookmarkdown-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for bookmarkdown-0.1.1-py3-none-any.whl |
Total release size: 9.1 kB
Release files / bookmarkdown-0.1.1.tar.gz
| Download URL | bookmarkdown-0.1.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d69152b33de6d498b2aeec382f8df699d84e35efa0cf5d5ff8ef085d3e940cf9
|
|
BLAKE2b-256 checksum How to use checksums |
5f3188fee72959ac7ed2b7abaaec92347d89e230a7c90b84509d2eb654bf1a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic
|
Release files / bookmarkdown-0.1.1-py3-none-any.whl
| Download URL | bookmarkdown-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16df2636eabccc70a9f6352a17f33193861e815b0acb112b4f976b04c63bab6f
|
|
BLAKE2b-256 checksum How to use checksums |
9bc0b95b23f1ca66f6d99a97573ae168d33666f2ab74b952855214f07f0964c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic
|
Security for bookmarkdown 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.