{"id":37359354,"url":"https://github.com/noelruault/invoice","last_synced_at":"2026-01-16T04:44:01.112Z","repository":{"id":49344159,"uuid":"517393923","full_name":"noelruault/invoice","owner":"noelruault","description":"An express invoice editor for freelancers, with and without VAT(s). Using yaml templates.","archived":false,"fork":false,"pushed_at":"2022-09-29T09:05:49.000Z","size":314,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T02:18:07.480Z","etag":null,"topics":["golang","invoice","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/noelruault.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}},"created_at":"2022-07-24T17:38:47.000Z","updated_at":"2024-06-21T02:18:07.481Z","dependencies_parsed_at":"2022-09-14T12:40:32.787Z","dependency_job_id":null,"html_url":"https://github.com/noelruault/invoice","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/noelruault/invoice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noelruault%2Finvoice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noelruault%2Finvoice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noelruault%2Finvoice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noelruault%2Finvoice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noelruault","download_url":"https://codeload.github.com/noelruault/invoice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noelruault%2Finvoice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["golang","invoice","yaml"],"created_at":"2026-01-16T04:44:00.360Z","updated_at":"2026-01-16T04:44:01.103Z","avatar_url":"https://github.com/noelruault.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# invoice\n\nA simple way to generate invoices\n\n## Result file example\n\n\u003cimg src=\"example.png\" alt=\"drawing\" width=\"300\"/\u003e\n\n## How to use\n\nThere are two ways of using the invoice tool:\n\n1. Using a binary file. So you don't need to deal with any code.\n2. Running the `main.go` file. Which needs some previous setup.\n\n### 1. Using the binary file\n\n#### Download\n\nDepending on the operating system you are on, you can download and use the [latest released binary](https://github.com/noelruault/invoice/releases/latest)\n\nOr use the following magic command to do such download automatically (tested on MacOS):\n\n```bash\nif [[ $(uname -p) == 'i386' ]]; then CHIP=amd; else CHIP=$(uname -p); fi; \\\nOS=$(uname -s | tr '[:upper:]' '[:lower:]'); \\\ncurl -s https://api.github.com/repos/noelruault/invoice/releases/latest \\\n| grep \"browser_download_url\" \\\n| grep \"$OS.*$CHIP\" \\\n| cut -d : -f 2,3 \\\n| tr -d \\\" \\\n| xargs wget -qO- \\\n| tar xvz\n```\n\n[Providing an input file](#input-file) with a suitable data structure is necessary for writing data to the invoice.\n\n```bash\n./invoice -input=\"./templates/input.yml\"\n```\n\n\u003e Resolve MacOS [\"cannot be opened because the developer cannot be verified\"](https://gist.github.com/noelruault/6d67933c95127b592c44eaee25dfc7e9) error\n\n## 2. Running the program using Golang\n\nThe bare minimum setup to run the invoice tool is to [provide a yaml file](#input-file).\n\n```bash\ngo run cmd/main.go -input=\"./templates/input.yml\"\n```\n\nOptionally, a [config file](#config-file) containing specific information about fonts and texts can also be provided.\n\n## Required and optional configuration files\n\n## Input file\n\n**Required**\n\n```yml\n# input.yml\nid: 20220701\nemitted: 2022-07-25T00:00:00.000000000+00:00\ndelivered: 2022-08-05T00:00:00.000000000+00:00\n\nname: My name\ninfo: |-\n  Address to House 123\n  ://website | @email | +00 PH0N3 NUMB3R\n\n# Client info\nclient: |-\n  Client address\n  Office 1234\n  1234, Country\n  client@email\n\n# Multiple services can be provided\nservices:\n- description: Software development service\n  unitcost: 10\n  unit: h.\n  quantity: 100\n- description: Software QA service\n  unitcost: 10\n  unit: hours\n  quantity: 20\n\n# One or more taxes can be provided\ntaxes:\n- description: VAT\n  value: 21\n- description: VAT2\n  value: 3\n\ncurrency: €\n\nnet: false\n\n# Bank details\naccount: |-\n  Acc Name: My name\n  IBAN : XX0000000000000000\n  SWIFT: BANKXX00\n```\n\n\u003e [input file example](./templates/input.yml)\n\n\n## Config file\n\n**Optional**\n\nThe configuration file example is not mandatory and can be used to change fonts, some texts and the date format.\n\n```yml\n# config.yml\n\nfontBody: Arial\nfontBodyBold: Arial\nfontTitle: Helvetica\n\ndateFormat: 02/01/2006\n\ntextTitle: INVOICE\ntextFooterTitle: Payment details\ntextDate1: Issue date\ntextDate2: Due date\n```\n\n\u003e [config file example](./templates/config.yml)\n\n## VAT\n\nValue Added Tax is calculated in two different ways, depending on the `net` boolean, which can be set in the `input` template.\n\n- When net is true, the added prices will be reduced by the VAT value(s) provided and added back to the total price at the end of the document.\n\n```\nhours: 2\nprice: 4\nvat:   21%\nnet:   true\n\n2 * (4 - 4 * 0.21) + (4 * 0.21)\n(2 * 3,16) + (2 * 0,84)\n= 8€\n```\n\n- If net is false, the prices will be displayed as they are provided, and the VAT value(s) will be added to the total price at the end.\n\n```\nhours: 2\nprice: 4\nvat:   21%\nnet:   false\n\n2 * 4 + (2 * 4 * 0.21)\n8 + 1,68\n= 9,68€\n````\n\n## Fonts\n\n```\nfonts/iso-8859-15.map is used to display characters such as '@', that don't come natively with other map encodings.\n```\n\n### How to download and use new fonts\n\n- download fonts from [fonts.google.com](https://fonts.google.com)\n- place ttf in `fonts/` folder\n- run command `make font`, e.g:\n\n```\necho Belleza-Regular.ttf | make font\necho Raleway-Regular.ttf | make font\necho Raleway-SemiBold.ttf | make font\necho Aldrich-Regular.ttf | make font\n```\n\n- change font names (without extension) on config file\n\n```\nfontTitle: Aldrich-Regular\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoelruault%2Finvoice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoelruault%2Finvoice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoelruault%2Finvoice/lists"}