✨ Write needextend rst from need-id-refs markers#13
Conversation
5677466 to
2e167cd
Compare
|
The invocation works! Some points: Can you change the CLI interface to This looks like a bug to me. The input Generally I think the output will be pretty ugly because the URLs are so long. Maybe https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-string-links would help shorten what is displayed while still being able to have the full link. This leads to an exception:
Is there a use case for |
2e167cd to
ac6dd5c
Compare
ac6dd5c to
3a62190
Compare
| # needextend demo | ||
| "analyse" = "codelinks analyse tests/data/configs/minimum_config.toml" | ||
| "analyse:rm" = "rm -rf output/marked_content.json" | ||
| "bridge" = "codelinks bridge output/marked_content.json --outdir tests/data/needextend_demo" |
| "demo:clean" = { chain = [ | ||
| "demo:rm", | ||
| "analyse:rm", | ||
| "bridge:rm", |
| try: | ||
| with jsonpath.open("r") as f: | ||
| marked_content = json.load(f) | ||
| except Exception as e: |
There was a problem hiding this comment.
have you head of https://docs.astral.sh/ruff/rules/blind-except/#blind-except-ble001 ?
| raise typer.BadParameter( | ||
| f"Errors occurred during conversion: {linesep.join(errors)}" | ||
| ) | ||
| with outpath.open("w") as f: |
There was a problem hiding this comment.
btw, this can also fail easily - permission issues and stuff


needextend_write, which consume the output ofanalyseand generate the corresponding rst withneedextenddirectivewrite rstCLI which useneedextend_writerye run demo:cleanto have documentation readytitleoption to inject the specified section in the generated rst