{"id":31718334,"url":"https://github.com/pprecel/pkup-gen","last_synced_at":"2025-10-09T02:38:04.860Z","repository":{"id":200361642,"uuid":"656274453","full_name":"pPrecel/pkup-gen","owner":"pPrecel","description":"Simple tool to generate PKUP report","archived":false,"fork":false,"pushed_at":"2025-05-16T09:52:14.000Z","size":8158,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T13:11:20.985Z","etag":null,"topics":["cli","github","go","pkup","sap"],"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/pPrecel.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,"zenodo":null}},"created_at":"2023-06-20T15:55:07.000Z","updated_at":"2025-05-16T09:48:05.000Z","dependencies_parsed_at":"2024-04-01T23:27:36.420Z","dependency_job_id":"22e8dbc9-21d7-4cad-a291-334f77112137","html_url":"https://github.com/pPrecel/pkup-gen","commit_stats":null,"previous_names":["pprecel/pkup-gen","pprecel/pkup"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/pPrecel/pkup-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pPrecel%2Fpkup-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pPrecel%2Fpkup-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pPrecel%2Fpkup-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pPrecel%2Fpkup-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pPrecel","download_url":"https://codeload.github.com/pPrecel/pkup-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pPrecel%2Fpkup-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000777,"owners_count":26082906,"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-10-09T02:00:07.460Z","response_time":59,"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":["cli","github","go","pkup","sap"],"created_at":"2025-10-09T02:38:03.517Z","updated_at":"2025-10-09T02:38:04.854Z","avatar_url":"https://github.com/pPrecel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#\n\n``` text\n.______    __  ___  __    __  .______\n|   _  \\  |  |/  / |  |  |  | |   _  \\\n|  |_)  | |  '  /  |  |  |  | |  |_)  |__ _  ___ _ __\n|   ___/  |    \u003c   |  |  |  | |   ___// _' |/ _ \\ '_ \\\n|  |      |  .  \\  |  '--'  | |  |   | (_| |  __/ | | |\n| _|      |__|\\__\\  \\______/  | _|    \\__, |\\___|_| |_|\n                                      |___/\n```\n\n---\n\n[![license](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=for-the-badge)](https://github.com/pPrecel/pkup-gen/blob/main/LICENSE)\n[![build](https://img.shields.io/github/actions/workflow/status/pPrecel/pkup-gen/tests-build.yml?style=for-the-badge)](https://github.com/pPrecel/pkup-gen/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pPrecel/PKUP?style=for-the-badge)](https://goreportcard.com/report/github.com/pPrecel/PKUP)\n\n---\n\nSimple and easy-to-use tool to generate PKUP (`Podwyższone Koszty Uzyskania Przychodu` - Polish law thing) report (`.docx`) and artifacts (`.diff`).\n\nThe `pkup-gen` collects all users' commits pushed between the 18th (23:59:59) of the actual month and the 19th (00:00:00) of the past one. To qualify a commit, the user should be an author or co-author of it.\n\n## Installation\n\nVisit the [releases page](https://github.com/pPrecel/pkup-gen/releases) to download one of the pre-built binaries for your platform.\n\n### Homebrew\n\n1. Install the `pkup-gen` using the Homebrew:\n\n    ```bash\n    brew install pPrecel/tap/pkup-gen\n    ```\n\n    or\n\n    ```bash\n    brew tap pPrecel/tap\n    brew install pkup-gen\n    ```\n\n## Usage\n\nExample usage:\n\n![screen1](./assets/screenshot-main.png)\n\nFor more go to the [examples](https://github.com/pPrecel/pkup-gen/tree/main/examples) dir.\n\n## report\n\nBy default, the `pkup-gen` generates the `report.txt` files with all the info needed to fill a true report.\n\nThe `.docx` report template can be specified using the `--template` flag. The `pkup-gen` will replace any repeat of the following keywords with the true data:\n\n* `pkupGenPeriodFrom` - date of the first day for the actual period\n* `pkupGenPeriodTill` - date of the last day for the actual period\n* `pkupGenApprovalDate` - date of the last day of the period plus one day\n* `pkupGenResults` - list of all PullRequests if format \u003cPR_TITLE\u003e( DIFF_FILE_NAME )\n\nThe `pkup-gen` allows adding a new formula to replace the output `.docx` file. It can be achieved by adding a flag `--report-field` like in the following example:\n\n```bash\n--report-field \"pkupGenEmployeesName=John Wick\"\n```\n\n## Access Token\n\nThe `pkup-gen` needs credentials to connect with the GitHub API. There are two possible ways to pass such credentials:\n\n* By default, the `pkup-gen` will reach the [pkup-gen](https://github.com/apps/pkup-gen) app using the GitHub device API. The generated token will be saved on the local machine so next time, until the token expires, the user will be logged in. This flow is not working with the `--enterprise-url` flag.\n\n* The `--token` flag allows to pass a [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). For public projects, the generated token does not need to have any permissions.\n\n## Automation\n\nThe `pkup-gen` application supports more complex use cases to generate a report based on several different GitHub instances ( for example opensource and enterprise ) and for many usernames. The app allows one to compose many reports for the same orgs/repos for many people and send emails to them with zipped reports.\n\nFor more read [this](./examples/compose-and-send/README.md) article.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprecel%2Fpkup-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpprecel%2Fpkup-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprecel%2Fpkup-gen/lists"}