{"id":22529835,"url":"https://github.com/4techsadiq/whatsapp-invoice","last_synced_at":"2025-03-28T04:45:14.670Z","repository":{"id":245975724,"uuid":"819339192","full_name":"4TechSadiq/Whatsapp-Invoice","owner":"4TechSadiq","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-25T06:10:29.000Z","size":527,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T05:42:45.711Z","etag":null,"topics":["invoice-generator","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4TechSadiq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-06-24T10:01:15.000Z","updated_at":"2024-10-28T17:16:09.000Z","dependencies_parsed_at":"2024-06-25T05:51:39.879Z","dependency_job_id":"442d745a-c033-482c-b889-379bcadfd9a9","html_url":"https://github.com/4TechSadiq/Whatsapp-Invoice","commit_stats":null,"previous_names":["4techsadiq/whatsapp-invoice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FWhatsapp-Invoice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FWhatsapp-Invoice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FWhatsapp-Invoice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FWhatsapp-Invoice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4TechSadiq","download_url":"https://codeload.github.com/4TechSadiq/Whatsapp-Invoice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245972668,"owners_count":20702720,"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","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":["invoice-generator","python"],"created_at":"2024-12-07T07:16:41.725Z","updated_at":"2025-03-28T04:45:14.644Z","avatar_url":"https://github.com/4TechSadiq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Invoice Automation System\n\n## Overview\n\nThe Invoice Automation System is designed to automate the process of generating, uploading, and sending invoices via WhatsApp. This project utilizes several tools and libraries including PIL for image handling, Cloudinary for image uploading, Twilio for messaging, and docxtpl for document generation and manipulation.\n\n## Project Structure\n\nThe project consists of three main modules:\n\n1. **Invoice Manager**: Handles the creation and formatting of invoices.\n2. **URL Generator**: Uploads the invoice images to Cloudinary and retrieves the URL.\n3. **Message Manager**: Sends the invoice URL to clients via WhatsApp using Twilio.\n\n## Modules\n\n### 1. Invoice Manager\n\nThis module generates an invoice in `.docx` format, converts it to `.pdf`, and finally converts the `.pdf` to an image (`.png`).\n\n#### Dependencies\n\n- `docxtpl`\n- `docx2pdf`\n- `fitz`\n- `os`\n\n#### Function\n\n```python\ndef invoice(template, name, logo, date, invoice_number, company_address, invoice_to, amount):\n    # Implementation details here\n    pass\n```\n\n### 2. URL Generator \nThis module uploads the generated invoice image to Cloudinary and retrieves the secure URL of the uploaded image.\n\n#### Dependencies\n- `cloudinary`\n- `os`\n\n#### Function\n\n```python\ndef get_url(image):\n    # Function implementation here\n    pass\n```\n\n### 3. Message Manager\nThis module sends a WhatsApp message to the client with the invoice URL using Twilio.\n\n#### Dependencies\n- `twilio`\n- `os`\n\n#### Function\n```python\ndef message(url, name, date):\n    # Function implementation here\n    pass\n```\n\n## Configuration\n#### Cloudinary Configuration\nSet up your Cloudinary credentials in the cloudinary.config:\n\n\n```python\ncloudinary.config(\n    cloud_name = 'your_cloud_name', \n    api_key = 'your_api_key', \n    api_secret = 'your_api_secret', \n    secure = True\n)\n```\n\n#### Twilio Configuration\n```python\naccount_sid = 'your_account_sid' \nauth_token = 'your_auth_token'\n\nfrom_number = 'whatsapp:your_twilio_number_here' \nto_number = 'whatsapp:client_number_here'\n```\n## Usage\n### Main Script\nThe main script integrates all modules to generate the invoice, upload it to Cloudinary, and send it via WhatsApp\n\n#### Dependencies\n\n- `invoiceManager`\n- `urlGenerator`\n- `messageManager`\n\n```python\nfrom invoiceManager import invoice\nfrom urlGen import get_url\nfrom messageManager import message\n\n# Invoice Generation\n#Example Data\nimage = invoice('invoice.docx', 'demo', 'image.png', 'July 8, 2019', '1234', 'company address', 'invoice to address', '1000.00')\n\n# Invoice image to URL\nurl = get_url(image)\n\n# Send Invoice\nmessage(url=url, name='demo', date='July 8, 2019')\n```\n\n## Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/your_username/your_repository.git\n   ```\n2. **Install the required packages:**\n   Ensure you have Python and pip installed. Then, install the necessary Python packages by running:\n   ```bash\n   pip install -r requirements.txt\n   ```\n   Alternatively, install them individually:\n   ```bash\n   pip install pillow cloudinary twilio docxtpl docx2pdf pymupdf\n   ```\n   Replace https://github.com/your_username/your_repository.git with the actual URL of your Git repository. If you have a requirements.txt file listing all dependencies, use pip install -r requirements.txt to install them in one go. If not, install each package individually as shown.\n\n## Contributing\nFeel free to open issues or submit pull requests. Contributions are welcome!\n\n## License\nThis project is licensed under the GPL-3.0 license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4techsadiq%2Fwhatsapp-invoice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4techsadiq%2Fwhatsapp-invoice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4techsadiq%2Fwhatsapp-invoice/lists"}