{"id":19841293,"url":"https://github.com/codelenny/fit-writer","last_synced_at":"2026-03-03T18:31:31.923Z","repository":{"id":90327360,"uuid":"173831582","full_name":"CodeLenny/fit-writer","owner":"CodeLenny","description":"Write fit exercise files","archived":false,"fork":false,"pushed_at":"2019-03-25T18:52:48.000Z","size":140,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T22:28:18.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeLenny.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-03-04T22:28:56.000Z","updated_at":"2019-03-25T17:50:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa4a5291-f31b-4643-93e7-f376f5d7d52b","html_url":"https://github.com/CodeLenny/fit-writer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodeLenny/fit-writer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ffit-writer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ffit-writer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ffit-writer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ffit-writer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeLenny","download_url":"https://codeload.github.com/CodeLenny/fit-writer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ffit-writer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30054571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-12T12:29:56.039Z","updated_at":"2026-03-03T18:31:31.905Z","avatar_url":"https://github.com/CodeLenny.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= Fit Writer\n:toc:\n:toc-placement!:\n:fitwriter: fit-writer\n:fit: link:https://www.thisisant.com/resources/fit[FIT]\nifdef::env-github[]\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\nendif::[]\n\nA TypeScript-powered library to write {fit} files.\n\ntoc::[]\n\n== Features\n\n{fitwriter} uses the pairing of definition messages with one or more data messages (the foundation of the {fit} format) to drive the API design.\n\n[source,typescript]\n----\nconst file = new FitFile();\n\nconst header = new FitRecordDefinition\u003c[\n    FitFields.file_id.type, FitFields.file_id.manufacturer,\n    FitFields.file_id.product, FitFields.file_id.serial_number,\n]\u003e(\n    FitFields.file_id.type.createDefinition(),\n    FitFields.file_id.manufacturer.createDefinition(),\n    FitFields.file_id.product.createDefinition(),\n    FitFields.file_id.serial_number.createDefinition(),\n);\nfile.add(header);\nfile.add(header.create(\n    FitFields.file_id.type.activity(),\n    FitFields.file_id.manufacturer.development(),\n    new FitNumber(22),\n    new FitNumber(1234),\n));\n----\n\nRe-use the same definition messages::\nProvide a single definition message, then create multiple data messages from that definition.\nStrongly typed definition and data messages::\nThe parameters when creating a new `FitRecordDefinition` or creating data messages must match the defined format.\nThis means that your IDE and compiler can both complain if you don't provide all the fields defined, or if the fields aren't in the correct order.\nField values are strongly typed::\nYou can't pass a string to a number field.  Enum fields require specific members.\nRecord structure is enforced::\nYou can't use fields only allowed in the `file_id` record inside activity records.\nEditor support for parameters::\nYour editor may be able to describe the desired parameters, and perform smart autocompletion with variables that match the desired types.\n+++\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\u003cp\u003e+++\nimage:doc/img/autocomplete-fields.png[Example of autocompletion in an IDE]\n+++\u003c/p\u003e\u003c/details\u003e+++\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelenny%2Ffit-writer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelenny%2Ffit-writer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelenny%2Ffit-writer/lists"}