packaged
This commit is contained in:
parent
dfd09ca167
commit
6acadeadaa
4 changed files with 30 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ The project wraps the [md2txt](https://github.com/randogoth/md2txt/) toolchain,
|
|||
|
||||
### Installation
|
||||
|
||||
Install the CLI directly from GitHub with [uv](https://github.com/astral-sh/uv):
|
||||
Install the CLI directly from GitHub with [uv](https://github.com/astral-sh/uv):
|
||||
|
||||
```
|
||||
uv tool install --from github:randogoth/mambler mambler
|
||||
|
|
@ -23,7 +23,7 @@ uv tool install --from github:randogoth/mambler mambler
|
|||
### Usage
|
||||
|
||||
```bash
|
||||
uv run mambler.py --title "Your Book Title" --codepage 437 path/to/index.md output.amb
|
||||
mambler --title "Your Book Title" --codepage 437 path/to/index.md output.amb
|
||||
```
|
||||
|
||||
- `index.md` is the root Markdown file. Any local Markdown links it contains will be followed and bundled automatically.
|
||||
|
|
@ -35,7 +35,7 @@ uv run mambler.py --title "Your Book Title" --codepage 437 path/to/index.md outp
|
|||
|
||||
### Development Notes
|
||||
|
||||
- Run `uv run python -m compileall mambler.py` to ensure the script still compiles.
|
||||
- Run `uv run python -m compileall src/mambler` to ensure the package still compiles.
|
||||
- The `md2txt` dependency is fetched from GitHub; contribute renderer/parser changes upstream in that project.
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "mambler"
|
||||
version = "0.1.0"
|
||||
|
|
@ -7,6 +11,17 @@ requires-python = ">=3.13"
|
|||
dependencies = [
|
||||
"md2txt",
|
||||
]
|
||||
license = { file = "LICENSE" }
|
||||
authors = [{ name = "Tobias Raayoni Last" }]
|
||||
|
||||
[project.scripts]
|
||||
mambler = "mambler:main"
|
||||
|
||||
[tool.uv.sources]
|
||||
md2txt = { git = "https://github.com/randogoth/md2txt", rev = "master" }
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/mambler"]
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
include = ["src/mambler", "README.md", "LICENSE"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Core package for converting Markdown to Ancient Machine Book archives."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
10
src/mambler/__main__.py
Normal file
10
src/mambler/__main__.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from . import main
|
||||
|
||||
|
||||
def run() -> int:
|
||||
"""Entry point for `python -m mambler`."""
|
||||
return main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(run())
|
||||
Loading…
Add table
Add a link
Reference in a new issue