filetomarkdown

0.4.1 • Public • Published

FileToMarkdown

Convert various file types to Markdown with a single command.

Documentation

Supported Formats

  • Documents: PDF, DOCX, PPTX, XLSX, TXT
  • Code: JS (JSX), TS (TSX), PY, JAVA, CS, HTML, CPP, C, GO, SQL, PHP, SWIFT, CSS, RUBY, RUST, KOTLIN, LUA, MATLAB, SHELL, VUE, SVELTE
  • Archives: ZIP, 7Z

Quick Test

Node >= v23.5.0

# Install
npm install filetomarkdown@latest

# Try example conversions
npx filetomarkdown-test --github

Usage Options

  1. Command Line (make sure to navigate to your file's directory in cmd first)

    filetomarkdown-convert "input.pdf"
    filetomarkdown-convert "input.pdf" "output.md"
  2. Markdown Viewer

    # Create viewer in current directory
    npx filetomarkdown-viewer
    
    # Or specify a target directory
    npx filetomarkdown-viewer /path/to/directory

    This creates a standalone viewer.html that can:

    • Open and display markdown files without needing a server
    • Support syntax highlighting for multiple programming languages
    • Drag & drop or browse for markdown files
    • Toggle sidebar for better reading experience

    To use the viewer:

    1. Run the command above to create viewer.html
    2. Open viewer.html in your browser
    3. Drop markdown files onto it or use the browse button
    4. Your markdown files will be rendered with syntax highlighting
  3. API Server

    npm run start:api   # Runs on http://localhost:3000

Package Sidebar

Install

npm i filetomarkdown

Weekly Downloads

1,372

Version

0.4.1

License

MIT

Unpacked Size

1.35 MB

Total Files

25

Last publish

Collaborators

  • jojomondag