|
Download task_008/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_008/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_008/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_008/instruction.md
1.59 kB
| # Offline Markdown-to-PDF batch converter | |
| Complete the supplied Node.js converter in `convert.js`. Keep the bundled `samples/` directory. Convert local Markdown to readable PDFs without network access. | |
| ## Interface and output | |
| Run `node convert.js <input-directory> <output-directory>` or import the exported `convertBatch(inputDir, outputDir)`. The export may finish synchronously or return a Promise that resolves once conversion is complete. | |
| Convert every top-level `.md` input to a separate `.pdf` with the same base name, including names containing Chinese characters. Generate genuine PDFs with extractable text; any valid internal PDF representation is acceptable. Render level-one headings, bold and inline code without the raw Markdown delimiters. Render inline `\(\sqrt{2}\)` as a readable square-root expression such as √2 or `sqrt(2)`, retaining the surrounding text without raw LaTeX markers. | |
| Preserve both Chinese and English glyphs and text. Wrap long lines, paginate long documents and keep text within the page. The environment includes Playwright/Chromium, Poppler and Noto CJK fonts; other offline implementations are allowed. | |
| ## Acceptance Checklist | |
| - The CLI and exported function produce parseable PDFs. Each input has a correctly named output with its own content and no text belonging to another input. | |
| - Text extraction preserves Chinese and English content, heading/bold/code text and the rendered inline square root without raw syntax. | |
| - Long documents retain their content through the end; wrapped and paginated text lies inside the visible page boundaries. | |