-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI tool #32
Add CLI tool #32
Conversation
Lines 7 to 8 in 84cc793
needs to be updated |
text = f.read() | ||
|
||
page_info = {"package_name": package_name, "page": source_file.with_suffix(".html").relative_to(doc_folder)} | ||
text = convert_rst_to_mdx(text, page_info, add_imports=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does convert_md_to_mdx
has to be somewhere here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No this is only for rst files (I can add a check).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that's a nice API!
"Cannot determine a default for package_name as the file passed is not in a git directory. " | ||
"Please pass along a package_name." | ||
) | ||
doc_folder = git_folder / "docs/source" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not robust for windows but I'm not sure we care in a v1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do two / which should be.
This PR adds some CLI tools with:
build_doc
and makes it easier to launch it from anywhere.