gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf #document-conversion#document-conversion #markdownfunction HorizontalRule()
return pandoc.RawBlock('openxml', '<w:p><w:r><w:br w:type="page"/></w:r></w:p>')
end
#code-agents #document-conversion #future #markdown #write#document-conversionconst blobToDataURL = (blob) =>
new Promise((res, rej) => {
const r = new FileReader();
r.onload = () => res(r.result);
r.onerror = () => rej(r.error);
r.readAsDataURL(f);
});
// @ts-check to a JavaScript file and documenting types via JSDoc might be the simplest way to migrate phase-wise from JS to Typescript. #document-conversionuvx markitdown https://example.com/ fetches example.com as Markdown. I learnt this when I told Codex it could use uvx markitdown to convert PDFs and it figured this part out by itself. #document-conversion #html #markdown#document-conversion #markdown#cloud #document-conversion #image-generation#document-conversion #image-generation #llm-ops#document-conversion#ai-coding #code-agents #document-conversion #future #github#ai-coding #code-agents #document-conversion #future #llm-ops#document-conversion #future #llm-ops #markdown#document-conversion #image-generation#document-conversion #html #markdown #web-dev#ai-coding #code-agents #document-conversion #prompt-engineering #write#automation #best-practices #document-conversion #future #optimization #prompt-engineering #write#document-conversion #web-dev#document-conversion #github #markdown #ai-coding#document-conversion#document-conversioncat file.md | pandoc -f markdown -t html). My favorites: #document-conversion #html #markdown--no-highlight skips code-highlighting. --highlight=pygments adds Pygments styling--wrap=none doesn't wrap the content in a single block--number-sections adds section numbering (<h2>1. Introduction</h2>)--shift-heading-level-by=NUM – shift all headings by NUM levels (e.g., start at <h2> instead of <h1>)pandoc -f markdown-auto_identifiers drops the auto-identifiers extension that generates id=... for each headingpandoc -f gfm uses GitHub flavored Markdown. Run pandoc --list-extensions=gfm to identify the extensions it uses.alerts: GitHub-style callouts (info, tip, warning) via > [!TYPE] blocks.autolink_bare_uris: Turns bare URLs into links, without needing <...>.emoji: Parses :smile:-style codes into Unicode emoji characters.footnotes: Enables footnote syntax with [^id] and definitions at the bottom.gfm_auto_identifiers: Uses GitHub’s heading-ID algorithm: spaces → dashes, lowercase, removes punctuation.pipe_tables: Enables table.raw_html: Raw HTML is unchanged.strikeout: Enables strikethrough with ~~text~~.task_lists: Parses - [ ] and - [x] items as checkboxes.yaml_metadata_block: YAML front matter for document metadata, e.g. <title>ascii_identifiers: Strips accents/non-Latin letters in automatically generated IDs.bracketed_spans: [Warning]{.alert} becomes <span class="alert">definition_lists: Term\n: Definition text becomes a definition listfenced_divs: ::: {.note} block creates a <div class="note">...</div>implicit_figures: Standalone images become <figure> with <figcaption>.implicit_header_references: [Section] is treated as [Section][#section]raw_attribute: <b>bold</b>{=html} is inserted as HTMLsmart: Converts straight quotes to curly, -- to en-dash, --- to em-dash, ... to ellipsis.subscript & superscript: E.g. H~2~O and E = mc^2^#document-conversion #htmlxclip -sel clip -o | pandoc -f markdown -t html --no-highlight | xclip -sel clip -t text/html -i to convert Markdown in the clipboard to rich text. But xclip doesn't support multiple selections, so the text is lost. ChatGPT #document-conversion #markdown#document-conversion #markdown #speech-to-text#document-conversion #html #markdown #write#document-conversion #markdown #speech-to-text#document-conversion #html #markdown#document-conversion#document-conversion #html #web-dev#document-conversion#document-conversion #html #markdown #web-dev#document-conversion #github #markdown #prompt-engineering#document-conversion #github #gpu #markdown#document-conversionuvx doc2docx converts Word .doc files to the new .docx format. I had several old .doc files that I converted. #document-conversion#document-conversion #github #markdownuvx files-to-promptnpx git-ingestingest - written in Go, only Mac/Linux binaries#document-conversion #markdownPYTHONUTF8=1 uv run --with pymupdf4llm python -c 'import pymupdf4llm; h = open("pymupdf4llm.md", "w"); h.write(pymupdf4llm.to_markdown("$FILE.pdf"))'PYTHONUTF8=1 uvx markitdown $FILE.pdf > markitdown.md#document-conversion#cloud #document-conversion #markdown#ai-coding #code-agents #document-conversion #html #llm-ops#document-conversion #github #html #markdown#document-conversion #markdown#document-conversion #llm-ops #markdown#document-conversion #future #speech-to-text#document-conversion #future #github #speech-to-text#document-conversion #html #markdown#document-conversion #llm-ops#document-conversion#document-conversion #future #image-generation#document-conversion#document-conversion#document-conversion #markdown#ai-coding #code-agents #document-conversion#document-conversion #speech-to-text #tts #voice-cloning