Document
Document
Returned by: Document.update_markdown, Document.update_markdown_from_file, JinkoClient.create_document_from_markdown, JinkoClient.get_document, JinkoClient.iter_documents, JinkoClient.list_documents
Also has every member of ProjectItem.
| Member | Kind | Description |
|---|---|---|
download_latex_zip | method | Download this document exported as a LaTeX zip archive. |
update_markdown | method | Replace this document body with markdown text and return self. |
update_markdown_from_file | method | Replace this document body with markdown loaded from a UTF-8 file. |
download_latex_zip
download_latex_zip() -> bytes
Download this document exported as a LaTeX zip archive.
update_markdown
update_markdown(markdown: str) -> Document
Replace this document body with markdown text and return self.
The provided text follows the same rules as
client.create_document_from_markdown(): standard Markdown is
supported, and Jinko project item .url values can be used directly
for rich embeds alongside normal Markdown links, images, tables, code
blocks, and external URLs.
This operation replaces the full markdown body. It does not append to or patch the existing content.
Update a document with a model embed, an uploaded image, and an external link:
model = client.create_empty_model("PK starter model")
image = client.upload_image(image_file_path="assets/overview.png")
document.update_markdown(
f"""# Updated Report
{model.url}

See also: [Jinko](https://www.novainsilico.ai/jinko)
"""
)
update_markdown_from_file
update_markdown_from_file(path: str | Path) -> Document
Replace this document body with markdown loaded from a UTF-8 file.
The file content uses the same Markdown dialect as
client.create_document_from_markdown() and fully replaces the
current document body.
Reload a generated markdown file into an existing document:
document.update_markdown_from_file("build/report.md")