Bookmarklets
A tool for developing bookmarklets.
Inspired by https://github.com/mrcoles/bookmarklet, but designed to support multiple bookmarklets, and to also export as html.
Develop bookmarklets based on javascript files, eg. so that you can commit the source files to git.
Installation
It is recommended to install using pipx, but you can also use pip. See https://pypi.org/project/pipx/.
pipx install bookmarklet
To convert them to bookmarklets, either start the server or generate a bookmarks.html file.
Server
- run
bookmarklet server [FOLDER]- specify the folder with the javascript files, otherwise the current folder is used
- use
-o/--opento automatically open the webpage - use
-p/--portto serve the port other than the default (8000) - use
--publicto allow other devices on your network to access the page, otherwise only on localhost
- on the webpage drag each bookmarklet to your bookmarks bar
HTML
- run
bookmarklet html [FOLDER]- specify the folder with the javascript files, otherwise the current folder is used
- use
-o/--outputto specify the output file, otherwise it defaults tobookmarks.html
- import the
bookmarks.htmlinto your browser
Metadata
You can include some metadata in a comment block at the top of the source file.
The fields that you can use are:
- name: the name of the bookmarklet (if not provided, the file name will be used)
- in the server this will be the name of the button
- in the html this will be the name of the bookmark, and included in a comment
- author : the author of the bookmarklet
- in the server this will be mentioned next to the button
- in the html this will be included in a comment
- url: link to the author
- in the server this will be linked to the author
- in the html this will be included in a comment
- script: script to load before running the bookmarklet
- specify it multiple times to use multiple scripts
- style: style to load before running the bookmarklet
- specify it multiple times to use multiple styles
See the examples in this repo.
Metadata
Release files for bookmarklets 0.3.2
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 |
|---|---|---|---|---|
| bookmarklets-0.3.2.tar.gz | 5.1 kB | Without provenance | Details for bookmarklets-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bookmarklets-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for bookmarklets-0.3.2-py3-none-any.whl |
Total release size: 11.2 kB
Release files / bookmarklets-0.3.2.tar.gz
| Download URL | bookmarklets-0.3.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d75161aa91429318764ae4c9b15e7d981831374d1cbf98fd76de6f51b4da73a
|
|
BLAKE2b-256 checksum How to use checksums |
873fef16d1d331d5fa7d4d873f8acad513a0bec8f0dd663a0bf7ac9040240141
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.1 Windows/10
|
Release files / bookmarklets-0.3.2-py3-none-any.whl
| Download URL | bookmarklets-0.3.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80ff0a7fde569ce26482465841a1ed8712c656155f540737265d839e7fa55ed3
|
|
BLAKE2b-256 checksum How to use checksums |
e0cba9c34e7adac2467f31494236e023e2a3d573952749bc003007fe2160f064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.1 Windows/10
|
Security for bookmarklets 0.3.2
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.