{"id":29182634,"url":"https://github.com/verkaro/editml-clean","last_synced_at":"2026-01-20T16:30:33.492Z","repository":{"id":301822121,"uuid":"1010409972","full_name":"verkaro/editml-clean","owner":"verkaro","description":"Processes EditML from files or standard input and outputs \"cleaned up\" text.","archived":false,"fork":false,"pushed_at":"2025-06-29T02:57:07.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T01:30:15.950Z","etag":null,"topics":["editml","golang","text-processor"],"latest_commit_sha":null,"homepage":"","language":"Go","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/verkaro.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}},"created_at":"2025-06-29T02:26:37.000Z","updated_at":"2025-06-29T02:57:10.000Z","dependencies_parsed_at":"2025-06-29T03:43:19.513Z","dependency_job_id":"ada4b504-f1d1-4192-9689-f7c35e773f6b","html_url":"https://github.com/verkaro/editml-clean","commit_stats":null,"previous_names":["verkaro/editml-clean"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/verkaro/editml-clean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verkaro%2Feditml-clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verkaro%2Feditml-clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verkaro%2Feditml-clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verkaro%2Feditml-clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verkaro","download_url":"https://codeload.github.com/verkaro/editml-clean/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verkaro%2Feditml-clean/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: 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":["editml","golang","text-processor"],"created_at":"2025-07-01T20:07:02.083Z","updated_at":"2026-01-20T16:30:33.472Z","avatar_url":"https://github.com/verkaro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# editml-clean\n\n`editml-clean` is a command-line utility written in Go that parses text formatted with EditML (Editorial Markup Language) and outputs a clean, human-readable version. It processes additions, deletions, comments, highlights, and structural edits (moves/copies) to produce the final \"Clean View\" of a document.\n\nThis tool is a reference implementation based on the `github.com/verkaro/editml-go` library.\n\n---\n\n## Specification Note\n\nThis application adheres to the v0.1 version of the EditML specification as implemented by the underlying `verkaro/editml-go` library. It supports all specified core features but may not handle all advanced nesting or error conditions found in the full EditML specification.\n\n---\n\n## Features\n\n-   Processes EditML from files or standard input (`stdin`).\n-   Outputs clean plain text to files or standard output (`stdout`).\n-   Supports all standard EditML operations:\n    -   **Additions:** `{+text+}`\n    -   **Deletions:** `{-text-}`\n    -   **Highlights:** `{=text=}`\n    -   **Comments:** `{\u003etext\u003c}`\n    -   **Moves:** `{move~text~TAG}` and `{move:TAG}`\n    -   **Copies:** `{copy~text~TAG}` and `{copy:TAG}`\n-   Command-line flags for controlling output, debugging, and strictness.\n\n---\n\n## Installation\n\nTo use `editml-clean`, you need to have Go (version 1.21 or later) installed on your system.\n\n1.  **Clone the repository (or download the source files):**\n    Ensure you have `main.go`, `go.mod`, etc., in a local directory.\n\n2.  **Build the binary:**\n    Navigate to the project's root directory in your terminal and run the `go build` command. This will create the `editml-clean` executable in your current directory.\n\n    ```bash\n    go build -o editml-clean .\n    ```\n\n3.  **Run the tool:**\n    You can now run the tool directly from that directory. For system-wide access, you can move the `editml-clean` binary to a directory in your system's `PATH` (e.g., `/usr/local/bin`).\n\n    ```bash\n    ./editml-clean --version\n    ```\n\n---\n\n## Usage\n\nThe tool can read from `stdin` or a file and write to `stdout` or a file.\n\n### Command-Line Interface\n\n```\nUsage:\n  editml-clean [flags] [input-file]\n```\n\n### Flags\n\n| Flag                | Shorthand | Description                                                   |\n| ------------------- | --------- | ------------------------------------------------------------- |\n| `--version`         |           | Print the application version and exit.                       |\n| `--output \u003cfile\u003e`   | `-o \u003cfile\u003e` | Write output to the specified file instead of stdout.         |\n| `--debug`           |           | Emit any parse/transform issues (warnings/errors) to stderr.  |\n| `--strict`          |           | Treat any warnings as fatal errors (exits with a non-zero code).|\n| `--help`            | `-h`      | Show usage information.                                       |\n\n### Positional Argument\n\n-   `input-file` (optional): The path to an EditML file to process. If this argument is omitted, the tool will read from `stdin`.\n\n---\n\n## Examples\n\n### 1. Cleaning a File\n\nGiven a file named `draft.editml` with the content:\n```editml\nThis is a{- really-} {=great=} document.{\u003eOr is it?\u003c}\n```\n\nRun the following command:\n\n```bash\n./editml-clean draft.editml\n```\n\n**Output:**\n```\nThis is a great document.\n```\n\n### 2. Using stdin and stdout\n\nYou can pipe content directly into the tool.\n\n```bash\necho \"Testing a choice{\u003ecomment\u003c} and{move~ text to move~t1} here is{move:t1}.\" | ./editml-clean\n```\n\n**Output:**\n```\nTesting a choice and here is text to move.\n```\n\n### 3. Writing to an Output File\n\nTo save the cleaned content to a new file:\n\n```bash\n./editml-clean --output final.txt draft.editml\n```\nThis will create a file named `final.txt` with the cleaned output.\n\n### 4. Debugging a File\n\nIf you have a file that isn't processing correctly, the `--debug` flag can provide more information.\n\n```bash\n# Assuming a file with an unclosed tag\necho \"Here is an unclosed addition {+\" | ./editml-clean --debug\n```\n\n**Example Stderr Output:**\n```\n[Error] Parsing error: unclosed edit tag (L0:C0)\n```\n\n---\n\n## Development \u0026 Testing\n\nThe project includes a full suite of unit and integration tests. To run them, navigate to the project root and execute:\n\n```bash\ngo test\n```\n\n---\n\n## Acknowledgements\n\nThis utility was implemented by Google's Gemini based on an initial specification. The final, robust application was achieved through a collaborative process of iterative development, testing, and refinement.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverkaro%2Feditml-clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverkaro%2Feditml-clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverkaro%2Feditml-clean/lists"}