Skip to content

Adds paragraph numbering to .docx files. Meant for personal use.

Notifications You must be signed in to change notification settings

MentalMegalodon/paragraph-numbering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

paragraph-numbering

This is a personal project to add paragraph numbers to .docx documents. I use these for beta reading books, so that all readers can reference a specific paragraph. Chapters should reset the numbering if they are titled as chapters. The project currently relies on the python-docx package, but hopefully I can rewrite it to parse the underlying xml once I figure out how to query for the right nodes.

Installation

Clone the git repository.

python -m pip install -r requirements.txt

Use

python addnumsboth.py <filename>.docx

This will produce an output file <filename> with inline numbers.docx that should have the proper paragraph numbers.

Goals

  • Clean up command line interface and add options for viewing the xml file instead of commenting/uncommenting code.
  • Rewrite code to use the built-in python xml parser and insert the paragraph numbers without any other modification of the underlying text.
  • Re-add code to insert both inline and margin numbers, to be more friendly to kindle formatting.

About

Adds paragraph numbering to .docx files. Meant for personal use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages