{"id":50265108,"url":"https://github.com/lastunicorn/nn-toolkit","last_synced_at":"2026-05-28T14:00:43.690Z","repository":{"id":359525604,"uuid":"1246477414","full_name":"lastunicorn/nn-toolkit","owner":"lastunicorn","description":"A set of helpers to interact with files generated by NN.","archived":false,"fork":false,"pushed_at":"2026-05-25T12:54:06.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-27T13:13:43.243Z","etag":null,"topics":["csharp","insurance","nn"],"latest_commit_sha":null,"homepage":"","language":"C#","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/lastunicorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"lastunicorn","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2026-05-22T08:25:47.000Z","updated_at":"2026-05-25T12:53:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lastunicorn/nn-toolkit","commit_stats":null,"previous_names":["lastunicorn/nn-toolkit"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/lastunicorn/nn-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lastunicorn%2Fnn-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lastunicorn%2Fnn-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lastunicorn%2Fnn-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lastunicorn%2Fnn-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lastunicorn","download_url":"https://codeload.github.com/lastunicorn/nn-toolkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lastunicorn%2Fnn-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33611254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["csharp","insurance","nn"],"created_at":"2026-05-27T13:07:46.378Z","updated_at":"2026-05-28T14:00:43.651Z","avatar_url":"https://github.com/lastunicorn.png","language":"C#","funding_links":["https://ko-fi.com/lastunicorn"],"categories":[],"sub_categories":[],"readme":"# NN Toolkit\n\n`NN Toolkit` is a .NET library for working with files exported from NN (Nationale-Nederlanden), currently focused on\nparsing PDF contribution statements for the Romanian Mandatory Private Pension (Pilon II).\n\nNN Group reference:\n\n- https://en.wikipedia.org/wiki/NN_Group\n\nThe package is published as `DustInTheWind.NN.Toolkit`.\n\n## What The Library Does Today\n\nThe current public functionality is centered around one workflow:\n\n1. Load a PDF exported from the NN Direct mobile app.\n2. Parse the contributions table across all pages: `ContributionsDocument`\n3. Provide parsing diagnostics: `DocumentParsingDiagnostics`\n\n## Installation\n\nPackage Manager:\n\n```powershell\nInstall-Package DustInTheWind.NN.Toolkit\n```\n\n.NET CLI:\n\n```bash\ndotnet add package DustInTheWind.NN.Toolkit\n```\n\n## Runtime Requirements\n\n- Library target framework: `.NET 8.0` (`net8.0`)\n- The parser relies on PDF table extraction via `Tabula`.\n\nIf you are consuming the NuGet package, transitive dependencies are resolved automatically.\n\n## Quick Start\n\n### a) Export the Contributions PDF From NN Direct\n\nIn NN Direct mobile app:\n\n1. Log in.\n2. Open **Pensie privata obligatorie**.\n3. Open **Istoric contribuții**.\n4. Select the full interval you need.\n5. Use the menu (three dots) and tap **Descarcă raport**.\n\nYou will get a PDF containing contribution rows that can be parsed with this toolkit.\n\n### b) Parse the Exported Document\n\nCreate a small console app and parse your exported file:\n\n```csharp\nusing DustInTheWind.NN.Toolkit.MandatoryPrivatePension;\n\nDocumentLoadResult result = ContributionsDocument.LoadFromFile(\"contributions.pdf\");\nContributionsDocument document = result.Document;\n\nforeach (Contribution contribution in document)\n{\n\t...\n}\n```\n\n## `Contribution` Record\n\nEach row is mapped to:\n\n- `Month` (`MonthDate`)\n    - expects date in the `MM/YYYY` style.\n\n- `GrossValue` (`decimal`)\n- `AdministrationFee` (`decimal`)\n- `NetValue` (`decimal`)\n- `UnitValue` (`decimal`)\n- `UnitCount` (`decimal`)\n- `PaidInMonth` (`MonthDate`)\n    - expects date in the `MM/YYYY` style.\n\n## Parsing Diagnostics\n\nWhen a document is parsed using `ContributionsDocument.LoadFromFile()`, both the parsed data and parsing diagnostics are\nreturned.\n\n```csharp\nusing DustInTheWind.NN.Toolkit.MandatoryPrivatePension;\nusing DustInTheWind.NN.Toolkit.MandatoryPrivatePension.Pdf;\n\nDocumentLoadResult result = ContributionsDocument.LoadFromFile(\"contributions.pdf\");\n\nforeach (PageParsingDiagnostics page in result.Diagnostics.Pages)\n{\n\t...\n}\n```\n\n## End-To-End Example: Export To CSV\n\nThe repository includes a sample CLI project in `sources/NN.Toolkit.Cli` that demonstrates:\n\n- reading `contributions.pdf`\n- writing CSV files (`NN_transactions.csv`, `NN_cash_transactions.csv`)\n- printing parsed data and diagnostics.\n\nYou can use this project as a reference implementation for your own importer/exporter tools.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastunicorn%2Fnn-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flastunicorn%2Fnn-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastunicorn%2Fnn-toolkit/lists"}