{"id":24302902,"url":"https://github.com/digipolitan/code-writer","last_synced_at":"2025-09-14T16:14:52.459Z","repository":{"id":98675140,"uuid":"100468123","full_name":"Digipolitan/code-writer","owner":"Digipolitan","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-06T20:23:41.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-06T14:31:38.746Z","etag":null,"topics":["base","builder","source-code","writer"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Digipolitan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-08-16T08:44:39.000Z","updated_at":"2019-01-06T20:23:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"78095cbc-0c89-44ad-a74f-6dd31994134a","html_url":"https://github.com/Digipolitan/code-writer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Digipolitan/code-writer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fcode-writer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fcode-writer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fcode-writer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fcode-writer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Digipolitan","download_url":"https://codeload.github.com/Digipolitan/code-writer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fcode-writer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267150471,"owners_count":24043473,"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-07-26T02:00:08.937Z","response_time":62,"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":["base","builder","source-code","writer"],"created_at":"2025-01-17T00:20:01.377Z","updated_at":"2025-07-26T10:33:27.716Z","avatar_url":"https://github.com/Digipolitan.png","language":"Swift","readme":"CodeWriter\n=================================\n\n[![Swift Version](https://img.shields.io/badge/swift-4.2-orange.svg?style=flat)](https://developer.apple.com/swift/)\n[![Swift Package Manager](https://rawgit.com/jlyonsmith/artwork/master/SwiftPackageManager/swiftpackagemanager-compatible.svg)](https://swift.org/package-manager/)\n[![Twitter](https://img.shields.io/badge/twitter-@Digipolitan-blue.svg?style=flat)](http://twitter.com/Digipolitan)\n\nHelper library cross platform to write \u0026 build source code\n\n## Installation\n\n### SPM\n\nTo install CodeWriter with SwiftPackageManager, add the following lines to your `Package.swift`.\n\n```swift\nlet package = Package(\n    name: \"XXX\",\n    products: [\n        .library(\n            name: \"XXX\",\n            targets: [\"XXX\"]),\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/Digipolitan/code-writer.git\", from: \"1.1.0\")\n    ],\n    targets: [\n        .target(\n            name: \"XXX\",\n            dependencies: [\"CodeWriter\"])\n    ]\n)\n```\n\n## The Basics\n\n- Builders\n\n```swift\nlet builder = CodeBuilder()\nbuilder.add(line: \"if test {\")\n    .rightTab()\n    .add(line: \"print(\\\"ok\\\")\")\n    .leftTab()\n    .add(line: \"}\")\nlet res = builder.build()\nprint(\"\\(res)\")\n```\n\n**Output**\n```\nif test {\n    print(\"ok\")\n}\n```\n\n- Writers\n\nThe write interface provide the method to override in sub project\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more details!\n\nThis project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code. Please report\nunacceptable behavior to [contact@digipolitan.com](mailto:contact@digipolitan.com).\n\n## License\n\nCodeWriter is licensed under the [BSD 3-Clause license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigipolitan%2Fcode-writer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigipolitan%2Fcode-writer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigipolitan%2Fcode-writer/lists"}