{"id":30110978,"url":"https://github.com/ericmann/invoices","last_synced_at":"2025-10-17T01:22:18.749Z","repository":{"id":296539886,"uuid":"993288011","full_name":"ericmann/invoices","owner":"ericmann","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-30T14:32:34.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-09T23:50:53.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-30T14:29:44.000Z","updated_at":"2025-05-30T16:03:47.000Z","dependencies_parsed_at":"2025-06-01T00:16:02.123Z","dependency_job_id":null,"html_url":"https://github.com/ericmann/invoices","commit_stats":null,"previous_names":["ericmann/invoices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericmann/invoices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Finvoices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Finvoices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Finvoices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Finvoices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmann","download_url":"https://codeload.github.com/ericmann/invoices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Finvoices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269677801,"owners_count":24457876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-10T05:06:05.211Z","updated_at":"2025-10-17T01:22:13.717Z","avatar_url":"https://github.com/ericmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Invoice Generator\n\nA Python script that generates professional PDF invoices from YAML data files.\n\n## Setup\n\n1. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. Directory structure:\n   ```\n   .\n   ├── main.py              # Main script\n   ├── requirements.txt     # Python dependencies\n   ├── invoices/           # YAML invoice data files\n   │   ├── _template.yaml  # Template for new invoices\n   │   └── 1001.yaml       # Example invoice\n   ├── includes/           # Styling and assets\n   │   └── style.css       # PDF styling\n   └── output/             # Generated PDF files\n   ```\n\n## Usage\n\n### Creating a New Invoice\n\n1. Copy the template file:\n   ```bash\n   cp invoices/_template.yaml invoices/YOUR_INVOICE_NUMBER.yaml\n   ```\n\n2. Edit the new YAML file with your invoice details:\n   - Replace placeholders with actual values\n   - Update services, rates, and amounts\n   - Modify payment instructions and terms\n\n3. Run the script to generate all pending invoices:\n   ```bash\n   python main.py\n   ```\n\n### Command Line Options\n\nThe script supports the following command line options:\n\n- **Standard generation**: `python main.py`\n  - Processes all invoices and skips any that already have PDFs generated\n\n- **Force regeneration**: `python main.py --regenerate`\n  - Forces regeneration of all invoices, overwriting existing PDFs\n  - Useful when you've updated styling or invoice data and want fresh PDFs\n\n- **Debug mode**: `python main.py --debug`\n  - Saves the generated HTML to `debug.html` for browser inspection\n  - Useful for testing CSS changes and troubleshooting layout issues\n  - Opens in your browser to see exactly how the invoice will look\n\n- **Combined flags**: `python main.py --regenerate --debug`\n  - You can combine flags to regenerate all invoices AND save debug output\n\n### Customizing Invoice Styling\n\nYou can customize the appearance of your invoices by editing `includes/style.css`. The CSS file contains styling for:\n\n- Typography and fonts (Google Fonts: Funnel Display, Geist, Geist Mono)\n- Colors and spacing\n- Table formatting\n- Layout and margins\n\nIf the CSS file is missing, the script will fall back to minimal default styling.\n\n### How It Works\n\n- The script scans the `invoices/` directory for all `.yaml` files (except `_template.yaml`)\n- For each invoice file, it checks if a PDF already exists in the `output/` directory\n- If no PDF exists (or `--regenerate` is used), it generates a new one with the current date\n- If a PDF already exists and `--regenerate` is not used, it skips generation to avoid duplicates\n- CSS styling is loaded from `includes/style.css` at runtime\n\n### Example Invoice YAML Structure\n\n```yaml\ninvoice_number: \"1001\"\ninvoice_date: \"May 31, 2025\"\ndue_date: \"Upon receipt\"\n\nfrom_name: \"Your Name\"\nfrom_email: \"your.email@domain.com\"\n\nto_name: \"Client Name\"\n# to_email: \"client@example.com\"  # Optional field\n\nservices:\n  - description: \"Service Description\"\n    hours: 10.0\n    rate: 100.00\n    amount: 1000.00\n\ntotal_amount: 1000.00\n\npayment_instructions: |\n  Payment instructions here\n\nterms: \"Payment terms here\"\n```\n\n**Optional Fields:**\n- `to_email`: If provided, the client's email will be displayed under their name in the \"To\" section. If omitted or empty, only the client name is shown.\n\n## Features\n\n- **YAML-based data storage**: Easy to edit and version control\n- **Template system**: Reusable template for consistency\n- **Duplicate prevention**: Automatically skips invoices that have already been generated\n- **Force regeneration**: `--regenerate` flag to overwrite existing PDFs\n- **Debug mode**: `--debug` flag to save HTML output for browser inspection\n- **Professional styling**: Clean, modern PDF output with customizable CSS and Google Fonts\n- **Batch processing**: Processes multiple invoices in one run\n- **Flexible styling**: External CSS file for easy customization ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmann%2Finvoices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmann%2Finvoices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmann%2Finvoices/lists"}