{"id":17280168,"url":"https://github.com/akuli/htmlthingy","last_synced_at":"2025-03-26T15:15:57.764Z","repository":{"id":81319155,"uuid":"107789844","full_name":"Akuli/htmlthingy","owner":"Akuli","description":"Thingy that converts non-standard but extensible markdown to HTML.","archived":false,"fork":false,"pushed_at":"2025-03-04T17:16:57.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T18:25:51.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Akuli.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}},"created_at":"2017-10-21T15:03:16.000Z","updated_at":"2025-03-04T17:16:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"101872f3-7507-4294-8912-c94e9a45992b","html_url":"https://github.com/Akuli/htmlthingy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2Fhtmlthingy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2Fhtmlthingy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2Fhtmlthingy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2Fhtmlthingy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akuli","download_url":"https://codeload.github.com/Akuli/htmlthingy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245678901,"owners_count":20654738,"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":[],"created_at":"2024-10-15T09:19:37.858Z","updated_at":"2025-03-26T15:15:57.759Z","avatar_url":"https://github.com/Akuli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTML Thingy\n\nThis thingy creates HTML from non-standard, Markdown-like and highly\ncustomizable markup. All you need to create a static website with this thingy\nis some Python and CSS experience. If you want to add custom syntax, experience\nwith regular expressions is also required (but `help('re')` is your friend).\n\nI created this thing because originally [my math\ntutorial](https://akuli.github.io/math-tutorial) was done with Sphinx, but\nwriting sphinx plugins was really difficult. The plugin API is huge and not\nvery well documented (which is kind of surprising, considering that Sphinx is\nmostly a documentation tool). Writing new Sphinx plugins took many hours, and\neven a simple thing is lots of boilerplate code.\n\n## Installation\n\nWindows:\n\n    py -m pip install --user https://github.com/Akuli/htmlthingy/archive/master.zip\n\nOther systems:\n\n    python3 -m pip install --user https://github.com/Akuli/htmlthingy/archive/master.zip\n\n## Hello World!\n\n**index.txt**:\n\n```\n# Hello World!\n\nThis is a test.\n```\n\n**build.py**:\n\n```python\nimport htmlthingy\n\nbuilder = htmlthingy.Builder()\nbuilder.run()\n```\n\nRun `build.py` with Python 3.4 or newer, and open `html/index.html` in your\nfavorite browser. It's minimal because we didn't do any CSS styling yet, but\nwe'll fix that in a moment.\n\n## Default Syntax\n\nThis file demonstrates most of the features available by default.\n\n**syntaxtest.txt**:\n\n```\n# Main Title\n\nBlah blah blah. **Bold**, *italic*, _underline_, ``some code``.\n\n## Subtitle\n\ncomment: One line comment.\n\ncomment: Multi-line comment.\n    Comments can be more than one line long.\n\n    This is still a part of the comment.\n\ncode: python3\n    print(\"Hello World!\")\n\n    print(\"This is still a part of the code.\")\n\n### Subsubtitle\n\nSubtitles are supported to at most 5 ``#`` characters.\n\n[This](index.html) is a link to our other file, and [this](#subtitle) is a link\nto a title in this file.\n\n(thing)\nThis section can be referred to as ``syntaxtest.html#thing``.\n\n\u003csmall\u003eThe markup may contain any HTML.\u003c/small\u003e\n\ncomment: TODO: show an image and aligning them\n```\n\nRun `build.py` again and open `html/syntaxtest.html`.\n\n## Custom Syntax\n\nThis is probably my favorite part about this whole thingy. Let's create a new\nbuild file and try it out.\n\n**build.py**:\n\n```python\nimport htmlthingy\n\n\nbuilder = htmlthingy.Builder()\n\n@builder.converter.add_inliner(r'\\B--(.+?)--\\B')\ndef uppercase(match, filename):\n    return '\u003cb\u003e%s!!!\u003c/b\u003e' % match.group(1).upper()\n\nbuilder.run()\n```\n\n**uppertest.txt**:\n\n```\n# Uppercase Test\n\n--hello world--\n```\n\nRun `build.py` again and open `html/uppertest.html`.\n\n## More stuff\n\nThere are many more things to be documented. I'll write more about them later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakuli%2Fhtmlthingy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakuli%2Fhtmlthingy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakuli%2Fhtmlthingy/lists"}