printer-service

Printer Service πŸ–¨οΈ

Python Version License Build Status

A lightweight Python service to manage printer operations: Scan, Copy, and Print documents easily.


πŸš€ Features


πŸ“‹ Requirements


βš™οΈ Installation

Clone the repository:

git clone https://github.com/JahongirHakimjonov/printer-service.git
cd printer-service

Install dependencies:

pip install -r requirements.txt

πŸ› οΈ Configuration

Create a config.json file in the project root:

{
  "printer_name": "Canon iR2006/2206 UFRII LT"
}

Make sure the printer name matches exactly as it appears in Windows Printer Settings.


πŸƒ Usage

Run the service:

python main.py

You will be prompted to select an operation:

Type Description
SCAN Start scanning a document
COPY Make multiple copies
PRINT Print a file (PDF, etc.)

Example flow:

$ python main.py
Type input (SCAN, COPY, PRINT): PRINT
How many pages to print?: 1-3
Enter the file path: D:\files\example.pdf

πŸ”₯ Advanced Usage

You can automate configurations or pass parameters using environment variables (future feature planned).

Planned CLI support:

python main.py --type PRINT --file_path "D:\docs\test.pdf" --pages "1-2"

For more information use this command:

python main.py --help

(Not available yet β€” currently interactive mode only.)


πŸ“‚ Project Structure

β”œβ”€β”€ config/                # Configuration files (e.g., config.json)
β”œβ”€β”€ resources/
β”‚   └── output/            # Scanned/copied/printed file outputs
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ controller/        # Handles user inputs and flow control
β”‚   β”œβ”€β”€ exceptions/        # Custom exception classes
β”‚   β”œβ”€β”€ services/          # Core printer services
β”‚   β”‚   β”œβ”€β”€ copy/          # Copy service logic
β”‚   β”‚   β”œβ”€β”€ print_file/    # Print service logic
β”‚   β”‚   └── scan/          # Scan service logic
β”‚   β”œβ”€β”€ utils/             # Utilities (logger, enums, etc.)
β”‚   └── __pycache__/       # Python cache files (ignored)
β”œβ”€β”€ main.py                # Application entry point
β”œβ”€β”€ requirements.txt       # Python dependencies
└── README.md              # Project documentation

⚑ Error Handling


πŸ‘¨β€πŸ’» Author

Jahongir Hakimjonov β€” Backend Developer

Contact

Please contact Jahongir Hakimjonov with any questions or concerns regarding this project.

Donate

pypi


πŸ“„ License

This project is licensed under the MIT License.


βœ… Summary of Improvements