{"id":37036359,"url":"https://github.com/videlais/libtwee","last_synced_at":"2026-01-14T04:19:20.540Z","repository":{"id":270647097,"uuid":"911010511","full_name":"videlais/libtwee","owner":"videlais","description":"libtwee is a C# library for creating and parsing current and historic Twine file formats","archived":false,"fork":false,"pushed_at":"2026-01-01T21:57:55.000Z","size":348,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T08:13:41.365Z","etag":null,"topics":["c-sharp","parser","twine1","twine2"],"latest_commit_sha":null,"homepage":"https://videlais.github.io/libtwee/","language":"HTML","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/videlais.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-02T03:27:08.000Z","updated_at":"2026-01-01T21:57:53.000Z","dependencies_parsed_at":"2025-01-16T21:24:08.423Z","dependency_job_id":"d268df9a-ed6a-481f-8805-bbd6483fca6d","html_url":"https://github.com/videlais/libtwee","commit_stats":null,"previous_names":["videlais/libtwee"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/videlais/libtwee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videlais%2Flibtwee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videlais%2Flibtwee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videlais%2Flibtwee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videlais%2Flibtwee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/videlais","download_url":"https://codeload.github.com/videlais/libtwee/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videlais%2Flibtwee/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["c-sharp","parser","twine1","twine2"],"created_at":"2026-01-14T04:19:20.046Z","updated_at":"2026-01-14T04:19:20.533Z","avatar_url":"https://github.com/videlais.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n# libtwee\n\n[![.NET Build](https://github.com/videlais/libtwee/actions/workflows/dotnet.yml/badge.svg)](https://github.com/videlais/libtwee/actions/workflows/dotnet.yml)\n[![NuGet Version](https://img.shields.io/nuget/v/Videlais.libtwee)](https://www.nuget.org/packages/Videlais.libtwee/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/Videlais.libtwee)](https://www.nuget.org/packages/Videlais.libtwee/)\n[![Code Coverage](https://img.shields.io/badge/Coverage-90.5%25-brightgreen)](https://github.com/videlais/libtwee/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![.NET 9.0](https://img.shields.io/badge/.NET-9.0-blue.svg)](https://dotnet.microsoft.com/download/dotnet/9.0)\n\nA C# library for creating and parsing current and historic Twine file formats.\n\n## Table of Contents\n\n\u003col\u003e\n  \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#story-compilation\"\u003eStory Compilation\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#format-support\"\u003eFormat Support\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#support-functionality\"\u003eSupport Functionality\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\n## Installation\n\n### NuGet Package Manager\n```bash\nInstall-Package Videlais.libtwee\n```\n\n### .NET CLI\n```bash\ndotnet add package Videlais.libtwee\n```\n\n### Package Reference\n```xml\n\u003cPackageReference Include=\"Videlais.libtwee\" Version=\"1.0.0\" /\u003e\n```\n\n## Quick Start\n\n```csharp\nusing libtwee;\n\n// Parse a Twee 3 file\nvar story = Twee.Parse(tweeContent);\n\n// Convert to Twine 2 HTML\nvar html = story.ToTwine2HTML();\n\n// Generate a new IFID\nvar ifid = Babel.GenerateTwineIFID();\n```\n\n## Documentation\n\n📚 **[Complete Documentation](docs/index.md)** - Comprehensive guides and API reference\n\n- **[Getting Started Guide](docs/articles/getting-started.md)** - Installation and basic usage\n- **[Examples](docs/articles/examples.md)** - Practical code examples  \n- **[API Reference](docs/articles/api-reference.md)** - Complete API documentation\n- **[File Formats Guide](docs/articles/file-formats.md)** - Understanding Twine formats\n\n### Building Documentation Locally\n\n```bash\n# Install DocFX (if not already installed)\ndotnet tool install -g docfx\n\n# Build documentation\n./build-docs.sh\n\n# Or manually:\ncd docs \u0026\u0026 docfx docfx.json\n```\n\n## Requirements\n\n- .NET 9.0 or higher\n\n## Story Compilation\n\nThe process of *story compilation* converts human-readable content, what is generally called a *story*, into a playable format such as HyperText Markup Language (HTML). The result is then presented as links or other visual, interactive elements for another party to interact with to see its content.\n\nThe term *compilation* is used because different parts of code are put together in a specific arrangement to enable later play. As part of Twine-compatible HTML, this means combining JavaScript code (generally a \"story format\") with story HTML data.\n\nPlayable formats are the following and require external story formats[^1] to enable play:\n\n- Twine 2 HTML\n- Twine 1 HTML\n\nMore human-readable formats include:\n\n- Twee 3[^2]\n- Twine 2 JSON[^3]\n\nFrom 2009 to 2015, Twine 1 supported a now [historical format named TWS](https://github.com/iftechfoundation/twine-specs/blob/master/twine-1-twsoutput.md). libtwee does not support this.\n\nTwine 2 supports exporting a collection of stories (known as a *library*) in the [Twine 2 Archive HTML format](https://github.com/iftechfoundation/twine-specs/blob/master/twine-2-archive-spec.md).\n\n[^1]: Story formats can be found in the [Story Format Archive (SFA)](https://github.com/videlais/story-formats-archive).\n\n[^2]: Twee exists in three versions. The first existed between 2006 to 2009 and was part of Twine 1. The move to Twine 2 in 2009 dropped support and the story compilation tools [Twee2](https://dan-q.github.io/twee2/) and [Tweego](https://www.motoslave.net/tweego/) adopted their own extensions and modifications. Beginning in 2017, work was done to unite the different projects. This resulted in [Twee 3](https://github.com/iftechfoundation/twine-specs/blob/master/twee-3-specification.md) in March 2021.\n\n[^3]: In October 2023, JavaScript Object Notation (JSON) was added as a supported community format for story compilation tools.\n\n## Format Support\n\n| Format                                                                                                                           | Input           | Output           |\n|----------------------------------------------------------------------------------------------------------------------------------|-----------------|------------------|\n| [Twine 1 HTML (2006 - 2015)]( https://github.com/iftechfoundation/twine-specs/blob/master/twine-1-htmloutput-doc.md )          | Yes             | Partial support. |\n| [Twine 1 TWS (2009 - 2015)]( https://github.com/iftechfoundation/twine-specs/blob/master/twine-1-twsoutput.md )                | Not supported   | Not supported.   |\n| [Twine 2 HTML (2015 - Present)]( https://github.com/iftechfoundation/twine-specs/blob/master/twine-2-htmloutput-spec.md )      | Yes             | Yes              |\n| [Twine 2 Archive HTML (2015 - Present)]( https://github.com/iftechfoundation/twine-specs/blob/master/twine-2-archive-spec.md ) | Yes             | Yes              |\n| [Twee 3 (2021 - Present)]( https://github.com/iftechfoundation/twine-specs/blob/master/twee-3-specification.md )               | Yes             | Yes              |\n| [Twine 2 JSON (2023 - Present)]( https://github.com/iftechfoundation/twine-specs/blob/master/twine-2-jsonoutput-doc.md )       | Yes             | Yes              |\n\n**Note:** Round-trip translations can present problems because of required fields and properties per format. Some metadata may be added or removed based on the specification being followed.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Support Functionality\n\nMultiple Twine formats support using [an IFID](https://ifdb.org/help-ifid) to identify one work from another.\n\nThe `Babel` class contains methods for verifying and generating a Twine-compatible IFID:\n\n```csharp\n// Generate a new IFID\nstring ifid = Babel.GenerateIFID();\n\n// Validate an existing IFID\nbool isValid = Babel.ValidateIFID(\"12345678-1234-1234-1234-123456789ABC\");\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n### Development Setup\n\n1. Clone the repository\n2. Ensure you have .NET 9.0 SDK installed\n3. Run `dotnet restore` to install dependencies\n4. Run `dotnet build` to build the project\n5. Run `dotnet test` to run the test suite\n\n### Code Coverage\n\nThis project maintains high code coverage standards. Run the following to generate a coverage report:\n\n```bash\n./coverage.sh\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidelais%2Flibtwee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvidelais%2Flibtwee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidelais%2Flibtwee/lists"}