Skip to main content

中文

Academic File Converter

Download from PyPI Discord GitHub Sponsors Twitter Follow GitHub followers

📚 Easily import publications and Jupyter notebooks to your Markdown-formatted website or book

Features

  • Import Jupyter notebooks as blog posts or book chapters
  • Import publications (such as books, conference proceedings, and journals) from your reference manager to your Markdown-formatted website or book
    • Simply export a BibTeX file from your reference manager, such as Zotero, and provide this as the input to the converter tool
  • Compatible with all static website generators such as Next, Astro, Gatsby, Hugo, etc.
  • Easy to use - 100% Python, no dependency on complex software such as Pandoc
  • Automate file conversions using a GitHub Action

Community

❤️ Support Open Research & Open Source

We are on a mission to foster open research by developing open source tools like this.

To help us develop this open source software sustainably under the MIT license, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship and contributing.

Support the open research movement:

Installation

Open your Terminal or Command Prompt app and enter one of the installation commands below.

With Pipx

For the easiest installation, install with Pipx:

pipx install academic

Pipx will automatically install the required Python version for you in a dedicated environment.

With Pip

To install using the Python's Pip tool, ensure you have Python 3.11+ installed and then run:

pip3 install -U academic

Usage

Open your Command Line or Terminal app and use the cd command to navigate to the folder containing the files you wish to convert, for example:

cd ~/Documents/my_website

Import publications

Download references from your reference manager, such as Zotero, in the Bibtex format.

Say we downloaded our publications to a file named my_publications.bib within the website folder, let's import them into the content/publication/ folder:

academic import my_publications.bib content/publication/ --compact

Optional arguments:

  • --compact Generate minimal markdown without comments or empty keys
  • --overwrite Overwrite any existing publications in the output folder
  • --normalize Normalize tags by converting them to lowercase and capitalizing the first letter (e.g. "sciEnCE" -> "Science")
  • --featured Flag these publications as featured (to appear in your website's Featured Publications section)
  • --verbose or -v Show verbose messages
  • --help Help

Import full text and cover image

After importing publications, we suggest you:

  • Edit the Markdown body of each publication to add the full text directly to the page (if the publication is open access), or otherwise, to add supplementary notes for each publication
  • Add an image named featured to each publication's folder to visually represent your publication on the page and for sharing on social media
  • Add the publication PDF to each publication folder (for open access publications), to enable your website visitors to download your publication

Learn more in the Hugo Blox Docs.

Import blog posts from Jupyter Notebooks

Say we have our notebooks in a notebooks folder within the website folder, let's import them into the content/post/ folder:

academic import 'notebooks/*.ipynb' content/post/ --verbose

Optional arguments:

  • --overwrite Overwrite any existing blog posts in the output folder
  • --verbose or -v Show verbose messages
  • --help Help

Contribute

Interested in contributing to open source and open research?

Learn how to contribute code on Github.

Check out the open issues and contribute a Pull Request.

For local development, clone this repository and use Poetry to install and run the converter using the following commands:

git clone https://github.com/GetRD/academic-file-converter.git
cd academic-file-converter
poetry install
poetry run academic import tests/data/article.bib output/publication/ --overwrite --compact
poetry run academic import 'tests/data/**/*.ipynb' output/post/ --overwrite --verbose

When preparing a contribution, run the following checks and ensure that they all pass:

  • Lint: make lint
  • Format: make format
  • Test: make test
  • Type check: make type

Help beta test the dev version

You can help test the latest development version by installing the latest main branch from GitHub:

pip3 install -U git+https://github.com/GetRD/academic-file-converter.git

License

Copyright 2018-present George Cushen.

Licensed under the MIT License.

PyPI - Downloads License

Release files for academic 0.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for academic 0.11.2
File Size Uploaded
academic-0.11.2.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for academic 0.11.2
File Interpreter ABI Platform
academic-0.11.2-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / academic-0.11.2.tar.gz

Download URL academic-0.11.2.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
16c2a3a774018b5af64f445f17c6d4851f1c9a9b0cac8e32fd9dbc74c81253c5
BLAKE2b-256 checksum
How to use checksums
cfa2c2f2b33fa096c65cba1f99bfd55336a11cf328ea8d8fa913a230b5b44754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.12.0 Darwin/23.1.0

Release files / academic-0.11.2-py3-none-any.whl

Download URL academic-0.11.2-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28e459cf8fe261d870f8663f33fb8d90263cece7967d70c5db55ebbde07d59ba
BLAKE2b-256 checksum
How to use checksums
6c085e1b48688d4bebec3eeda3971ad4d9ee1d165ceefa22c68a6571812a2103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.12.0 Darwin/23.1.0

Release history Release notifications | RSS feed

This release

0.11.2 This release

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page