Skip to content

drycool/docnavigator-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocNavigator Lite

Portable desktop-web app for indexing and searching codes inside local Word .docx files.

Built with:

  • FastAPI
  • SQLModel + SQLite
  • python-docx
  • Jinja2 + Tailwind CDN

What It Does

  • scans all .docx files in docs/
  • 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

Code Format Rules

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.

Project Structure

main.py
models.py
templates/
  index.html
docs/
requirements.txt
build.bat
build_onedir.bat

Development Run

pip install -r requirements.txt
python main.py

Open:

http://127.0.0.1:8000

Portable Paths

The app resolves these paths relative to the executable location:

  • docs/
  • index.db

That makes it suitable for running from a USB drive.

Indexing Notes

  • only .docx files are scanned
  • temporary Word lock files like ~$file.docx are ignored
  • invalid or broken .docx files 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

Build Options

Install dependencies:

pip install -r requirements.txt

Option 1: One-file EXE

build.bat

Output:

  • dist/DocNavigatorLite.exe

Notes:

  • convenient single file
  • slower startup from USB
  • extracts runtime files on launch

Option 2: Portable Folder Build

build_onedir.bat

Output:

  • dist/DocNavigatorLite-Portable/

Recommended for USB use because it starts much faster than --onefile.

Run:

  • dist/DocNavigatorLite-Portable/start_docnavigator.bat

UI Behavior

  • app opens quickly
  • index is not rebuilt automatically on startup
  • click Refresh Index when documents were added or changed
  • click Exit to stop the local server

GitHub Publish

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors