Skip to main content

Helps you manage your literature notes locally written in Markdown format.

Project description

md-paper

English | 中文

md-paper is a lightweight command-line tool to help you manage literature notes written in Markdown.
It is inspired by Mu Li and is a modified version of autoLiterature, focusing on a smoother Markdown workflow.

Best practice: use it together with Typora and configure Typora to use relative paths for images and file links.

Finally, place your literature and Markdown notes in the same folder, and use LLMs and Agents like Copilot to read and summarize the literature for better results.

Features

1. Start from Markdown notes: fetch metadata and PDFs

md-paper scans your Markdown file(s) and automatically recognizes paper IDs, then:

  • updates the metadata of papers in your notes;
  • optionally downloads the corresponding PDFs.

Syntax rules:

  • Automatically recognizes list items like: - {xxx}.
  • When a note line contains - {paper_id}, md-paper updates the paper metadata in the note, without downloading PDF.
  • When a note line contains - {{paper_id}}, md-paper updates both the paper metadata and downloads the PDF.

Supported paper_id types:

  • Published papers: doi
  • Preprints: arxiv_id, biorxiv_id, medrxiv_id (note the spelling)

Basic usage:

md-paper -i <note-file-or-folder> [-o <output-folder>] [-p <proxy>]
  • -i / --input : path to a single Markdown note file or a folder containing multiple notes.
  • -o / --output: target folder to save downloaded PDFs and images (must be a folder).
  • -p / --proxy : HTTP proxy, e.g. 127.0.0.1:7890.

2. Start from PDFs: rename and write back metadata to Markdown

If some papers cannot be fetched directly (e.g. sci-hub unavailable, access behind authentication),
you can download the PDFs manually, then let md-paper:

  1. extract DOI from the first pages of each PDF;
  2. query CrossRef for title / authors / venue / citation count;
  3. rename the PDF to Title.pdf;
  4. append or update the corresponding entry in your Markdown note.

Usage:

md-paper -i <note-file> -r <pdf-folder> [-p <proxy>]
  • -i / --input : Markdown file where entries will be added or updated.
  • -r / --rename : folder containing PDFs to be processed.
  • -p / --proxy : HTTP proxy used for CrossRef.

If a PDF does not contain a detectable DOI, or CrossRef returns no result,
md-paper logs a warning and skips renaming for that file.

Installation

1. Install from PyPI

pip install markdown-paper
# or
pip3 install markdown-paper

2. Install from source

git clone https://github.com/ryan-utopia/markdown-paper.git
cd markdown-paper
python setup.py install

Command-line options

md-paper

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        The path to the note file or note file folder.
  -o OUTPUT, --output OUTPUT
                        The folder path to save paper pdfs and images. NOTE: MUST BE FOLDER
  -r RENAME, --rename RENAME
                        The folder path that contains pdfs to be renamed.
  -p PROXY, --proxy PROXY
                        The proxy. e.g. 127.0.0.1:7890

License

This project is licensed under the MIT License – see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_paper-1.0.0.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file markdown_paper-1.0.0.tar.gz.

File metadata

  • Download URL: markdown_paper-1.0.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for markdown_paper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d9eedf18d799e526bfebda49081b0055c7b1e43795a630fcb9a06e52da642f5b
MD5 723de643daf0cf2c3879287e9c513fde
BLAKE2b-256 c395c0a474724f8eff9827443574715bdd1281c62f41b55e26ea1f7afd98c375

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page