explaingit

fuwenhao12/academic-ref-inserter

23PythonAudience · researcherComplexity · 2/5LicenseSetup · easy

TLDR

Command-line tool that reformats, reorders, and validates citations in Microsoft Word documents across six academic styles including IEEE, APA 7th, and the Chinese GB/T 7714-2015 standard, with DOI lookup and BibTeX import/export.

Mindmap

mindmap
  root((academic-ref-inserter))
    Citation styles
      IEEE
      APA 7th
      GB T 7714-2015
      Chicago MLA Harvard
    Features
      Auto reformat
      Reorder bibliography
      Hyperlink citations
      Validate references
    Integrations
      CrossRef API
      BibTeX import export
    Audience
      Researchers
      Students
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automatically reformat all citations in a Word document from APA to IEEE style before submitting to an engineering journal.

USE CASE 2

Convert a bibliography from BibTeX format into a Word document formatted to the Chinese GB/T 7714-2015 standard.

USE CASE 3

Validate that every in-text citation has a matching bibliography entry, sequential numbers have no gaps, and at least half of your references are recent.

USE CASE 4

Fetch a properly formatted citation for a DOI from CrossRef and insert it directly into your Word document's bibliography.

Tech stack

Pythonpython-docxCrossRef APIBibTeX

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Academic Reference Inserter is a Python command-line tool that fixes, reformats, and cross-references citations in Microsoft Word documents. It targets researchers and students working with academic papers who need their references formatted consistently. The tool supports six citation styles: GB/T 7714-2015 (the Chinese national standard used by engineering and automation journals), IEEE (common in engineering and computer science), APA 7th edition (social sciences and business), Chicago 17th edition (humanities), MLA 9th edition (literature and arts), and Harvard (UK and Australia, social sciences). It can auto-detect which style is already in use in a document. From a single command, the tool can analyze the existing references, reformat them to a target style, reorder the bibliography to match the order citations appear in the text, turn all numbered citations into clickable hyperlinks that jump to their bibliography entry in Word, and validate the result. Validation checks confirm that every in-text citation has a matching bibliography entry, that sequential numbers have no gaps, that at least 15 references are present, and that more than half are from the past five years. Additional features include fetching a formatted reference from a DOI via the CrossRef API, and importing or exporting references from BibTeX files. The tool makes an automatic backup of the original document before modifying anything. Installation requires Python 3.8 or later and the python-docx library, which reads and writes Word documents. The project includes a test suite and configuration files for a wide range of AI coding assistants including Cursor, Claude Code, GitHub Copilot, and Windsurf, allowing those tools to assist with development. The project is licensed under MIT.

Copy-paste prompts

Prompt 1
I have a Word document with APA citations. Using the academic-ref-inserter tool, write a Python script that reformats all citations to IEEE style and creates clickable hyperlinks from each citation number to its bibliography entry.
Prompt 2
Help me use the academic-ref-inserter CLI to fetch a properly formatted citation from this DOI and add it to my Word document's bibliography in GB/T 7714-2015 format: 10.1145/example
Prompt 3
I need to validate my Word document's references using academic-ref-inserter. Write the command to check that all in-text citations match bibliography entries and that at least half of my 30 references are from the last five years.
Prompt 4
Using academic-ref-inserter, write a script to export my Word document's references to a BibTeX file, then reimport them reformatted in Chicago 17th edition style.
Open on GitHub → Explain another repo

← fuwenhao12 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.