Skip to content

ayushrskiaa/BP-writingTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ BP Writing Tool

Build Status License: MIT Python 3.11+ Platform

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.

BP Writing Tool Interface

✨ Features

  • πŸš€ 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

πŸš€ Quick Start

Download Latest Release

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 drag MyApp.app to Applications

Prerequisites for Full Functionality

Browser Requirement: Use Google Chrome browser to access the required extensions.

To use the application at its full potential, install these Chrome browser extensions:

  1. 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.

  2. 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.

πŸ”§ Configuration

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.

πŸ“– API Documentation

See doc/api_contracts.md for the full API contract and usage examples.

πŸ› Issues and Support

If you encounter any issues or have questions:

  1. Check the Issues page for existing solutions
  2. Create a new issue with detailed information about your problem
  3. Include your operating system, Python version, and any error messages

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» For Developers

Prerequisites

  • Python 3.11 or higher
  • pip (Python package installer)

Installation from Source

# 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.

Project Structure

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

Building Standalone Applications

# Install PyInstaller
pip install pyinstaller

# Build for current platform
make build

# Or manually
pyinstaller MyApp.spec

The executables will be in the dist/ folder.

Available Make Commands

make install    # Install dependencies
make build      # Build standalone application
make run        # Run from source
make clean      # Clean build artifacts
make help       # Show all commands

Technology Stack

  • 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

Requirements

  • 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

🀝 Contributing

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.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guidelines
  • Add tests for new features
  • Update documentation as needed
  • Ensure the application builds successfully

πŸ™ Acknowledgments

πŸ“Š Project Status

  • βœ… 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •