{"id":37429488,"url":"https://github.com/cradloff/text2epub","last_synced_at":"2026-01-16T06:33:48.716Z","repository":{"id":45845206,"uuid":"133177776","full_name":"cradloff/text2epub","owner":"cradloff","description":"Text to EPUB converter","archived":false,"fork":false,"pushed_at":"2025-12-15T17:34:55.000Z","size":424,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-18T20:37:16.332Z","etag":null,"topics":["ebook","epub-converter","java","text-to-epub-converter"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cradloff.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":"2018-05-12T19:37:55.000Z","updated_at":"2025-12-15T17:34:58.000Z","dependencies_parsed_at":"2024-02-05T17:50:03.892Z","dependency_job_id":"e2cf31b3-7e22-4018-9555-8e81a06edc07","html_url":"https://github.com/cradloff/text2epub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cradloff/text2epub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cradloff%2Ftext2epub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cradloff%2Ftext2epub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cradloff%2Ftext2epub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cradloff%2Ftext2epub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cradloff","download_url":"https://codeload.github.com/cradloff/text2epub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cradloff%2Ftext2epub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["ebook","epub-converter","java","text-to-epub-converter"],"created_at":"2026-01-16T06:33:48.641Z","updated_at":"2026-01-16T06:33:48.697Z","avatar_url":"https://github.com/cradloff.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Text to EPUB converter\n\n`text2epub` is a simple but powerful tool to convert text to ebooks in EPUB \nformat. It converts text from the following formats:\n\n* [Markdown](https://daringfireball.net/projects/markdown/) (\\*.txt, \\*.md)\n* [Textile](https://txstyle.org/) (*.textile)\n* Wiki / [MediaWiki](https://www.mediawiki.org/wiki/MediaWiki) (*.wiki)\n* [Trac](https://trac.edgewall.org/) (*.trac)\n* [Confluence](https://www.atlassian.com/software/confluence) (*.confluence)\n* [Asciidoc](http://asciidoctor.org/) (*.adoc)\n\nIf your content is already in XHTML-Format (*.xhtml), it will also be included.\n\nWhen first called, it creates a template `epub.xml` and exits. You just fill out\nthis file with the metadata (author, title, etc.) and the next time you call\n`text2epub`, it will scan for content and create a ebook from it. The files are \nadded alphabetically, so you should add a prefix to sort it (e.g. `01_index.txt`, \n`02_chapter_one.txt`, ...). The cover has to be named `cover.jpg` (or \n`cover.png`, `cover.gif` or `cover.svg`) and will be embedded in a html file.\n\nFilenames with special character such as whitespace, accents or umlauts will be renamed so the\nebook contains only valid filenames in Ascii. This support is somewhat limited, e.g.\ncyryllic or greek letters wont be replaced. In these cases, rename your files so\nthat they conform to the epub standard.\n\n## Stylesheet\nYou can provide a stylesheet for the complete book or for each content file. The \nglobal stylesheet must be named `book.css`, the other stylesheets \n`\u003cbasename\u003e.css`. If you don't provide a stylesheet, a default one is embedded.\n\n## Table of contents\nA table of contents is created by default. `text2epub` scans for header tags, \ndefault is `h1`, other tags can be specified in the properties.\n\n## Internationalization\n`text2epub` has builtin support for english and german. To add support for \nanother language, extract the file `Text2Epub_en.properties` and rename it to \nmatch you language (e.g. `Text2Epub_es.properties` for spanish). Put that file \nin the directory where the jar archive is installed. Please send me your \ntranslation so I can include it.\n\n## Scripting\n`text2epub` uses [FreeMarker](https://freemarker.apache.org/) to create the ebook.\nYou can also use it for scripting. Just place your script inside the content and\n`text2epub` will execute it before converting to XHTML. To disable that \nfeature, set the `freemarker` property to `false`. There are already some\npredefined macros you can use:\n\n\u003cdl\u003e\n\u003cdt\u003epagebreak\u003c/dt\u003e\n\u003cdd\u003eThis macro can be used to place pagebreaks in you ebook, these are references to \nactual page numbers in the printed version of the book. The first call in each file \nhas to specify the starting page (e.g. \u0026lt;@pagebreak 1/\u0026gt;) in the following calls \nthe page number is automatically increased an can be omitted (\u0026lt;@pagebreak\u0026gt;). \nIf there is at least one pagebreak, \u003ccode\u003etext2epub\u003c/code\u003e \ncreates a pagemap for the book.\u003c/dd\u003e\n\n\u003cdt\u003elink\u003c/dt\u003e\n\u003cdd\u003eCreates a link to another file in the ebook. The macro gets the filename as parameter. \nThe filename is automatically resolved, i.e. you can specify the filename of the source file \n(e.g. chapter.md) which will be replaced with the filename in the ebook (chapter.xhtml).\u003c/dd\u003e\n\n\u003cdt\u003erefnote\u003c/dt\u003e\n\u003cdd\u003eCreates a link to a footnote in another file (default \u003ccode\u003e99_footnotes.xhtml\u003c/code\u003e).\nThe macro has three parameters:\u003cdl\u003e\n\u003cdt\u003enote\u003c/dt\u003e\u003cdd\u003ethe id of the footnote (if omitted it gets automatically increased)\u003c/dd\u003e\n\u003cdt\u003elinktext\u003c/dt\u003e\u003cdd\u003ethe text shown in the link (default is note)\u003c/dd\u003e\n\u003cdt\u003efile\u003c/dt\u003e\u003cdd\u003efilename containing footnotes (default \u003ccode\u003e99_footnotes.md\u003c/code\u003e).\u003c/dd\u003e\n\u003c/dl\u003e\nExample: \u003ccode\u003e\u0026lt;@refnote 1 \"*\"/\u0026gt;\u003c/code\u003e\u003c/dd\u003e\n\n\u003cdt\u003efootnote\u003c/dt\u003e\n\u003cdd\u003eCreates a footnote with a back link to the refnote entry. The macro has three parameters:\u003cdl\u003e\n\u003cdt\u003enote\u003c/dt\u003e\u003cdd\u003eid of the footnote (if omitted it gets automatically increased)\u003c/dd\u003e\n\u003cdt\u003efile\u003c/dt\u003e\u003cdd\u003efilename which contains the reference (default current file)\u003c/dd\u003e\n\u003cdt\u003elinktext\u003c/dt\u003e\u003cdd\u003ethe text shown in the link (default \u003ccode\u003e↑\u003c/code\u003e)\u003c/dd\u003e\n\u003c/dl\u003e\nExample: \u003ccode\u003e\u0026lt;@footnote 1 \"chapter01.md\" \"^\"\u0026gt;Here is the text\u0026lt;/@footnote\u0026gt;\u003c/code\u003e\u003c/dd\u003e\n\n\u003cdt\u003espacer\u003c/dt\u003e\n\u003cdd\u003eCreates an empty line. If specified, more lines can be created: \n\u003ccode\u003e\u0026lt;@spacer 3/\u0026gt;\u003c/code\u003e creates three empty lines\u003c/dd\u003e\n\n\u003cdt\u003eresolve(srcFilename)\u003c/dt\u003e\n\u003cdd\u003eResolves the given filename of a source file and returns the filename in the ebook. If \u003ccode\u003esrcFilename\u003c/code\u003e \nis not known, it will be returned. Example: \u003ccode\u003e${resolve(\"chapter.md\")}\u003c/code\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\nYou can access the properties from `epub.xml` with the expression \n`${property.\u003cname\u003e}` e.g. `${property.title}` for the book title.\n\n## Customization\nMost files are created from FreeMarker templates which are contained in the jar \narchive. If you want to change these templates, just extract them from the jar \nusing some zip tool and put them in the local directory. Here you can customize \nthem as you wish.\n\nResources (but not content!) are searched in the following locations:\n1. First they are searched in the local directory where your content resides\n2. Next, all parent directories are scanned\n3. Last the classpath is used\n\nSo, if you want to customize a certain resource for all of your books, put the\ncorresponding template in a common base directory or in the same directory where \nthe jar archive is installed.\n\n## Prerequisites\n`text2epub` is written in Java, so you have to install a JRE (version 17 or higher).\nThe JRE can be downloaded from here: \n[https://java.com/en/download/](https://java.com/en/download/)\n\n## Installation\nJust unzip the Jar and the shell script somewhere where it can be accessed. You can \nput it in its own directory or in an existing one. Add this directory to your \n`PATH` variable.\n\nThats all!\n\n## Usage\nThe shell script has two optional parameters:\n1. Directory containing the content. Defaults to current working directory.\n2. Output file name. Defaults to the filename specified in `epub.xml`, if \nnot specified `\"\u003cTitle\u003e - \u003cAuthor\u003e.epub\"` is used.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcradloff%2Ftext2epub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcradloff%2Ftext2epub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcradloff%2Ftext2epub/lists"}