Skip to content

Data upload via external file like the json,csv? #376

Discussion options

You must be logged in to vote

Hi, you could add files to your access model, which can then get read by typst compiler. The access model refers to

export function withAccessModel(accessModel: FsAccessModel): BeforeBuildFn {

You can also use the {map,unmap,reset}Shadow function to manipulate any text or binary file data for typst compiler. They will shadow the file access from provided access model directly in memory.

/**
* Add a source file to the compiler.
* @param {string} path - The path of the source file.
* @param {string} source -…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Myriad-Dreamin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #375 on October 13, 2023 02:32.