{"id":23143429,"url":"https://github.com/xieyuheng/tangle-rs","last_synced_at":"2025-12-12T15:01:35.474Z","repository":{"id":57650363,"uuid":"151212556","full_name":"xieyuheng/tangle-rs","owner":"xieyuheng","description":"a collection of tools to do tangle in rust","archived":false,"fork":false,"pushed_at":"2019-07-24T16:16:15.000Z","size":64,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-08T07:42:51.470Z","etag":null,"topics":["literate-programming","org-mode","parsing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xieyuheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-02T06:53:41.000Z","updated_at":"2024-08-24T02:02:35.000Z","dependencies_parsed_at":"2022-09-09T02:51:08.162Z","dependency_job_id":null,"html_url":"https://github.com/xieyuheng/tangle-rs","commit_stats":null,"previous_names":["parsing-tech/org-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyuheng%2Ftangle-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyuheng%2Ftangle-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyuheng%2Ftangle-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyuheng%2Ftangle-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xieyuheng","download_url":"https://codeload.github.com/xieyuheng/tangle-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230136111,"owners_count":18178813,"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","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":["literate-programming","org-mode","parsing"],"created_at":"2024-12-17T15:13:27.050Z","updated_at":"2025-12-12T15:01:30.128Z","avatar_url":"https://github.com/xieyuheng.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tangle in rust\n\nA collection of tools to do tangle in rust.\n\n## Getting Start\n\nTo build the program, nightly rust toolchain is needed.\n\n`rustup` is the tool to help programmers install rust toolchains.\n- One can get rustup from :: https://rustup.rs\n\nThen do:\n\n```\nrustup install nightly\ncargo +nightly install tangle-cli --git https://github.com/xieyuheng/tangle-rs\n```\n\n## org-mode\n\nIn a `.org` file\n\n- Add tangle property-line\n\n```\n#+property: tangle lib.rs\n```\n\n- The following code block will be tangled into `lib.rs`\n\n```\n#+begin_src rust\nfn tangle (string: \u0026str) -\u003e Result \u003cString, TangleError\u003e {\n    let mut result = String::new ();\n    let mut lines = string.lines ();\n    while let Some (line) = lines.next () {\n        if block_begin_line_p (line) {\n            tangle_collect (\u0026mut result, \u0026mut lines)?;\n        }\n    }\n    Ok (result)\n}\n#+end_src\n```\n\n### Note About Restriction on org-mode\n\n- The use case is restricted to global tangle property-line\n  - code block level tangle property-line is NOT supported\n  - headline level tangle property-line is NOT supported\n\nCheck out https://github.com/OrgTangle for alternative tangle support.\n\n## Markdown\n\nIn a `.md` file\n\n- Add tangle property-line\n\n```\n---\ntangle: lib.rs\n---\n```\n\n- The following code block will be tangled into `lib.rs`\n\n````\n``` rust\nfn tangle (string: \u0026str) -\u003e Result \u003cString, TangleError\u003e {\n    let mut result = String::new ();\n    let mut lines = string.lines ();\n    while let Some (line) = lines.next () {\n        if block_begin_line_p (line) {\n            tangle_collect (\u0026mut result, \u0026mut lines)?;\n        }\n    }\n    Ok (result)\n}\n```\n````\n\n## Contributing\n\nWe enforce C4 as collaboration protocol :\n- [The C4 RFC](https://rfc.zeromq.org/spec:42/C4)\n- [Style Guide](STYLE-GUIDE.md) -- observe the style of existing code and respect it\n- CI [![Build Status](https://travis-ci.org/xieyuheng/tangle-rs.svg?branch=master)](https://travis-ci.org/xieyuheng/tangle-rs)\n\n## Code Of Conduct\n\n- [Contributor Covenant Code of Conduct](CODE-OF-CONDUCT.md)\n\n## License\n\n- [GPLv3](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxieyuheng%2Ftangle-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxieyuheng%2Ftangle-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxieyuheng%2Ftangle-rs/lists"}