Portable desktop-web app for indexing and searching codes inside local Word .docx files.
Built with:
- FastAPI
- SQLModel + SQLite
- python-docx
- Jinja2 + Tailwind CDN
- scans all
.docxfiles indocs/ - reads table content from Word documents
- extracts codes and links them to file name and node number
- stores the index in local
index.db - lets you search and open the source document in Word
The search/indexer supports codes in this format:
- Russian uppercase letter
- then digits
- optional space between letter and digits
- optional hyphen between letter and digits
Examples:
А0168А 0168А-0168
Search normalizes these variants, so they are treated as the same code.
main.py
models.py
templates/
index.html
docs/
requirements.txt
build.bat
build_onedir.bat
pip install -r requirements.txt
python main.pyOpen:
http://127.0.0.1:8000
The app resolves these paths relative to the executable location:
docs/index.db
That makes it suitable for running from a USB drive.
- only
.docxfiles are scanned - temporary Word lock files like
~$file.docxare ignored - invalid or broken
.docxfiles are skipped instead of crashing the whole refresh - node number is detected from table headers like
Node,Node Number,Узел,Номер узла - if no explicit node column is found, the app falls back to the first non-code cell in the row
Install dependencies:
pip install -r requirements.txtbuild.batOutput:
dist/DocNavigatorLite.exe
Notes:
- convenient single file
- slower startup from USB
- extracts runtime files on launch
build_onedir.batOutput:
dist/DocNavigatorLite-Portable/
Recommended for USB use because it starts much faster than --onefile.
Run:
dist/DocNavigatorLite-Portable/start_docnavigator.bat
- app opens quickly
- index is not rebuilt automatically on startup
- click
Refresh Indexwhen documents were added or changed - click
Exitto stop the local server
Suggested repository name:
docnavigator-lite
Suggested first push:
git init
git add .
git commit -m "Initial commit: DocNavigator Lite"If GitHub CLI is configured:
gh repo create docnavigator-lite --public --source . --remote origin --push