diff --git a/README.md b/README.md index 3e65ac6..126dc73 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Build multiple versions of your sphinx docs and merge them into one website. - Concurrent builds - Override build configuration from commandline easily - Render templates to the root directory containing the docs for each version +- Build from local working tree easily while mocking version data - Not a sphinx extension -> standalone tool - Configuration in a python script - Highly customizable and scriptable through OOP @@ -69,6 +70,20 @@ POETRY_ARGS = "--only sphinx --sync".split() #: Arguments to pass to `sphinx-build` SPHINX_ARGS = "-a -v".split() +#: Mock data used for building local version +MOCK_DATA = { + "revisions": [ + GitRef("v1.8.0", "", "", GitRefType.TAG, datetime.fromtimestamp(0)), + GitRef("v1.9.3", "", "", GitRefType.TAG, datetime.fromtimestamp(1)), + GitRef("v1.10.5", "", "", GitRefType.TAG, datetime.fromtimestamp(2)), + GitRef("master", "", "", GitRefType.BRANCH, datetime.fromtimestamp(3)), + GitRef("dev", "", "", GitRefType.BRANCH, datetime.fromtimestamp(4)), + GitRef("some-feature", "", "", GitRefType.BRANCH, datetime.fromtimestamp(5)), + ], + "current": GitRef("local", "", "", GitRefType.BRANCH, datetime.fromtimestamp(6)), +} +MOCK = False + # Load overrides read from commandline to global scope apply_overrides(globals()) # Determine repository root directory @@ -89,7 +104,8 @@ DefaultDriver( env=Poetry.factory(args=POETRY_ARGS), template_dir=root / src / "templates", static_dir=root / src / "static", -).run() + mock=MOCK_DATA, +).run(MOCK) ``` Build your docs by running diff --git a/ROADMAP.md b/ROADMAP.md index 202642e..9811f00 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -42,10 +42,10 @@ # 0.5.0 -- [ ] Custom data format - depending on version -- [ ] Verbosity flag -- [ ] Easily build local version and mocking -- [ ] Pre and post build commands +- [x] Custom data format - depending on version +- [x] Verbosity flag +- [x] Pre and post build commands +- [x] Easily build local version and mocking # 1.0.0-alpha1