MCPcopy Create free account
hub / github.com/DFHack/dfhack / cli_entrypoint

Function cli_entrypoint

docs/sphinx_extensions/dfhack/changelog.py:266–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264 return entries
265
266def cli_entrypoint():
267 import argparse
268 parser = argparse.ArgumentParser()
269 parser.add_argument('-a', '--all', action='store_true',
270 help='Print changelogs for all versions to docs/changelogs')
271 parser.add_argument('-c', '--check', action='store_true',
272 help='Check that all entries are printed')
273 args = parser.parse_args()
274
275 entries = generate_changelog(all=args.all)
276
277 if args.check:
278 with open(os.path.join(DOCS_ROOT, 'changelogs/news.rst')) as f:
279 content_stable = f.read()
280 with open(os.path.join(DOCS_ROOT, 'changelogs/news-dev.rst')) as f:
281 content_dev = f.read()
282 for entry in entries:
283 for description in entry.children:
284 if not entry.dev_only and description not in content_stable:
285 print('stable missing: ' + description)
286 if description not in content_dev:
287 print('dev missing: ' + description)
288
289
290def sphinx_entrypoint(app, config):

Callers 1

gen_changelog.pyFile · 0.90

Calls 3

generate_changelogFunction · 0.85
printFunction · 0.50
readMethod · 0.45

Tested by

no test coverage detected