BP Writing Tool is a specialized desktop application developed specifically for the Bihar Police to facilitate Hindi document creation and management. This tool enables officers and staff to write in Hindi (Devanagari script) efficiently by typing in Hinglish (Romanized Hindi), with instant transliteration to Hindi script using advanced language models.
- π Instant Transliteration - Type in Hinglish, see Hindi output in real-time
- π Document Management - Create, edit, save, and delete multiple documents
- π History Sidebar - Browse and manage your document history, grouped by date
- π€ Export & Print - Download or print your Hindi documents in styled format
- π» Cross-Platform - Available for Windows and macOS as standalone apps
- π Local Data Storage - All documents stored locally on device
- π Extension Integration - Enhanced input via Chrome extensions (requires internet)
- π― User-Friendly - Clean interface with Tkinter-based GUI controller
Visit our Releases page to download the latest version for your platform:
- Windows: Download
BP-writing tool.exe
- macOS: Download
BP-writing-tool-macos.zip
, extract, and dragMyApp.app
to Applications
Browser Requirement: Use Google Chrome browser to access the required extensions.
To use the application at its full potential, install these Chrome browser extensions:
-
Google Input Tools - Provides virtual keyboards for over 90 languages, full IMEs for over 30 scripts, and handwriting input for over 40 languages. Enables enhanced Hindi input and transliteration.
-
Voice In - Speech-To-Text Dictation - Enables voice typing in 50+ languages with real-time speech-to-text transcription. Works on 10k+ websites and supports 40+ languages.
Note: These extensions require internet connectivity to function, while your document data remains stored locally on your device for privacy and security.
The application uses a local TinyDB database (db.json
) that is automatically created on first run. All documents and settings are stored locally on your device, ensuring complete privacy and data security.
Data Privacy: Your documents are never transmitted over the internet and remain stored locally on your device. The Chrome extensions mentioned above require internet connectivity for their functionality, but they do not access your document data.
See doc/api_contracts.md for the full API contract and usage examples.
If you encounter any issues or have questions:
- Check the Issues page for existing solutions
- Create a new issue with detailed information about your problem
- Include your operating system, Python version, and any error messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Python 3.11 or higher
- pip (Python package installer)
# Clone the repository
git clone https://github.com/ayushrskiaa/BP-writingTool.git
cd BP-writingTool
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.py
The app will be available at http://127.0.0.1:5000.
BP-writingTool/
βββ app.py # Main Flask application
βββ requirements.txt # Python dependencies
βββ Makefile # Build and management commands
βββ MyApp.spec # PyInstaller spec for packaging
βββ src/ # Source code
β βββ launcher.py # Tkinter GUI launcher
β βββ routers.py # Flask routes
β βββ utils.py # Utility functions
β βββ db_handler.py # Database operations
β βββ diary/ # Diary-related modules
βββ static/ # Static assets
β βββ app.js # Main JavaScript
β βββ css/ # Stylesheets
β βββ js/ # JavaScript modules
β βββ images/ # Images and icons
βββ templates/ # HTML templates
β βββ index.html # Main template
βββ .github/workflows/ # GitHub Actions
βββ main.yml # Build and release workflow
βββ cleanup-keep-n.yml # Cleanup workflow
# Install PyInstaller
pip install pyinstaller
# Build for current platform
make build
# Or manually
pyinstaller MyApp.spec
The executables will be in the dist/
folder.
make install # Install dependencies
make build # Build standalone application
make run # Run from source
make clean # Clean build artifacts
make help # Show all commands
- Frontend: HTML, CSS, JavaScript (served via Flask)
- Backend: Python (Flask)
- Transliteration: hindi-xlit
- Database: TinyDB (local JSON storage)
- Packaging: PyInstaller for standalone executables
- CI/CD: GitHub Actions for automated builds and releases
- flask==3.1.1 - Web framework for the backend server
- tinydb==4.8.2 - Lightweight, document-oriented database
- pillow==11.3.0 - Python Imaging Library for image processing
This project is developed specifically for the Bihar Police but is open source to encourage community contributions and improvements. While the primary audience is law enforcement personnel in Bihar, we welcome contributions from developers who can help enhance the tool's functionality and usability.
Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation as needed
- Ensure the application builds successfully
- Flask - Web framework
- hindi-xlit - Transliteration engine
- TinyDB - Lightweight database
- PyInstaller - Application packaging
- β Active Development - Regular updates and improvements
- β Cross-Platform - Windows and macOS support
- β Automated Builds - GitHub Actions for continuous integration
- β Version Management - Automated releases with versioning
- β Bihar Police Specific - Tailored for law enforcement documentation needs
- β Open Source - Available for community contributions and improvements
Made with β€οΈ specifically for the Bihar Police to modernize Hindi documentation workflows