DarkMark
Runs codeblocks marked with the darkmark, and inserts the results.
DarkMark uses tree-sitter to identify codeblocks. Currently it only supports python codeblocks in markdown files and runs them with ipython. Handy for writing docs/blog posts so you can stay right in your markdown editor of choice and get the outputs in line. No need to jump into a whole other tool just to do live execution.
Installation
pip install darkmark
❯ darkmark --help
Usage: darkmark [OPTIONS] COMMAND [ARGS]...
run code blocks in markdown
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion [bash|zsh|fish|powershell|pwsh] Install completion for the specified shell. │
│ [default: None] │
│ --show-completion [bash|zsh|fish|powershell|pwsh] Show completion for the specified shell, to copy │
│ it or customize the installation. │
│ [default: None] │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ run │
│ sexp │
│ tui │
│ watch │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Usage
Mark your codeblocks with the darkmark.
```python {.python .darkmark}
r = requests.get('https://waylonwalker.com')
r.status_code
```
Then run darkmark <file>.md and darkmark will insert the results of the codeblock.
``` {.console .darkmark_output}
200
```
Automatic imports
Automatic imports are provided by pyflyby.
Supported Languages
Currently the only language supported is python.
- python
Example
Running darkmark watch <file.md> updates the file on save.
License
darkmark is distributed under the terms of the MIT license.
Metadata
Release files for darkmark 0.2.0
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 |
|---|---|---|---|---|
| darkmark-0.2.0.tar.gz | 13.0 kB | Without provenance | Details for darkmark-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| darkmark-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for darkmark-0.2.0-py3-none-any.whl |
Total release size: 20.9 kB
Release files / darkmark-0.2.0.tar.gz
| Download URL | darkmark-0.2.0.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1d970f6b95634be81a0532bf15c750a8d076706778db147397ca47603787b75
|
|
BLAKE2b-256 checksum How to use checksums |
12390d0d9123bf75f680384f760f1ac62807ab105642fff8c00117b4d20192ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Release files / darkmark-0.2.0-py3-none-any.whl
| Download URL | darkmark-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be2f61479b3ac16cbfcf93007c49c413fbe601c2997d1f24099df48e8d9fb1cc
|
|
BLAKE2b-256 checksum How to use checksums |
d65024df2a3bd9033f850287db92424566040fccfbd5c778cd5eec3e55fb9606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Security for darkmark 0.2.0
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.