| 1 |
<!--- |
| 2 |
SPDX-FileCopyrightText: © 2023 Christian BUHTZ <[email protected]> |
| 3 |
|
| 4 |
SPDX-License-Identifier: GPL-3.0-only |
| 5 |
|
| 6 |
This file is part of the program "Hyperorg" which is released under |
| 7 |
GNU General Public License v3 (GPLv3). See LICENSES directory |
| 8 |
or go to <https://spdx.org/licenses/GPL-3.0-only.html>. |
| 9 |
--> |
| 10 |
[](https://api.reuse.software/info/codeberg.org/buhtz/hyperorg) |
| 11 |
[![Mastodon @[email protected]](badge_mastodon.svg)](https://fosstodon.org/@buhtz) |
| 12 |
[](https://common-changelog.org) |
| 13 |
[](https://liberapay.com/buhtz) |
| 14 |
[](https://ko-fi.com/buhtz) |
| 15 |
|
| 16 |
# Hyperorg - An Org to HTML converter |
| 17 |
|
| 18 |
_Hyperorg_ converts [Org Mode](https://orgmode.org/) and |
| 19 |
[Org-roam](https://www.orgroam.com/) files into a navigable |
| 20 |
[HTML](https://en.wikipedia.org/wiki/HTML/) representation of a |
| 21 |
[Zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten/), preserving its |
| 22 |
link structure and backlinks. It is designed to make an Org-roam vault |
| 23 |
accessible without requiring [Emacs](https://www.gnu.org/software/emacs/) or a |
| 24 |
web server. |
| 25 |
|
| 26 |
The **project** is active. It is in constant development implementing [new |
| 27 |
features](https://codeberg.org/buhtz/hyperorg/issues?q=&state=open&labels=40047) |
| 28 |
and fixing |
| 29 |
[bugs](https://codeberg.org/buhtz/hyperorg/issues?q=&state=open&labels=40046). |
| 30 |
See the [development roadmap](#development-roadmap) and the |
| 31 |
[milestones](https://codeberg.org/buhtz/hyperorg/milestones) about what is |
| 32 |
coming and the |
| 33 |
[changelog](https://codeberg.org/buhtz/hyperorg/src/branch/latest/CHANGELOG.md) |
| 34 |
about what has been. Don't hesitate to voice your wishes and opinions by |
| 35 |
utilizing the [issue section](https://codeberg.org/buhtz/hyperorg/issues) or |
| 36 |
the Mastodon account [@[email protected]](https://fosstodon.org/@buhtz). |
| 37 |
|
| 38 |
The **Team** currently consists of a single person: the original author and |
| 39 |
sole maintainer, [buhtz](https://buhtz.codeberg.pages). |
| 40 |
[Donations](https://codeberg.org/buhtz/about-me#about-christian-buhtz) |
| 41 |
via |
| 42 |
<a href="https://liberapay.com/buhtz"> |
| 43 |
<img src="https://codeberg.org/buhtz/about-me/raw/branch/main/liberapay.svg" |
| 44 |
width="24px" height="24px" /> |
| 45 |
Liberapay</a> and |
| 46 |
<a href="https://ko-fi.com/buhtz"> |
| 47 |
<img src="https://codeberg.org/buhtz/about-me/raw/branch/main/kofi.png" |
| 48 |
width="24px" height="24px" /> |
| 49 |
Ko-fi</a> support the maintainer personally rather than this specific |
| 50 |
project, as he is involved in |
| 51 |
[several open-source |
| 52 |
projects](https://codeberg.org/buhtz/about-me#projects). Alternative donation |
| 53 |
methods are available on request. |
| 54 |
|
| 55 |
<sub>July 2026</sub> |
| 56 |
|
| 57 |
## Table of contents |
| 58 |
- [Installation](#installation) |
| 59 |
- [Usage](#usage) |
| 60 |
- [Feature List](#feature-list) |
| 61 |
- [Design Goals](#design-goals) |
| 62 |
- [Comparison to similar tools](#comparison-to-similar-tools) |
| 63 |
- [Motivation - Why _Hyperorg_ exists](#motivation-why-_hyperorg_-exists) |
| 64 |
- [Development roadmap](#development-roadmap) |
| 65 |
- [Contributing](#contributing) |
| 66 |
- [Example](#example) |
| 67 |
- [Technologies & Standards](#technologies-standards) |
| 68 |
|
| 69 |
# Installation |
| 70 |
> [!IMPORTANT] |
| 71 |
> Always prefer the **official repository** of your GNU/Linux distribution. |
| 72 |
> _Hyperorg_ is [available on Debian |
| 73 |
> GNU/Linux](https://tracker.debian.org/pkg/hyperorg) and therefore other |
| 74 |
> Debian-based distros. See [this list](https://repology.org/project/hyperorg) |
| 75 |
> about availability in other distros. |
| 76 |
|
| 77 |
**Regular installation for users**: |
| 78 |
|
| 79 |
See the [Releases](https://codeberg.org/buhtz/hyperorg/releases) section or |
| 80 |
run the following command to install the _latest stable release_ from upstream |
| 81 |
repository: |
| 82 |
|
| 83 |
``` |
| 84 |
$ pipx install https://codeberg.org/buhtz/hyperorg/archive/v0.2.0.zip |
| 85 |
``` |
| 86 |
|
| 87 |
If `pipx` is not available on your system check your GNU/Linux distributions |
| 88 |
package repository or install it from PyPi (`pip install pipx`). |
| 89 |
|
| 90 |
**Editable installation for developers to contribute**: |
| 91 |
|
| 92 |
First of all fork/clone/copy the repository to your local machine. |
| 93 |
```sh |
| 94 |
$ git clone https://codeberg.org/buhtz/hyperorg.git |
| 95 |
$ cd hyperorg |
| 96 |
``` |
| 97 |
|
| 98 |
Use a virtual environment and the extra `[develop]`. |
| 99 |
|
| 100 |
```sh |
| 101 |
# Create the environment |
| 102 |
$ python3 -m venv .venv |
| 103 |
|
| 104 |
# Activate the environment |
| 105 |
$ source .venv/bin/activate |
| 106 |
|
| 107 |
# Install |
| 108 |
$ pip3 install --editable .[develop] |
| 109 |
``` |
| 110 |
|
| 111 |
When you are finished with your working session, don't forget to deactivate the |
| 112 |
environment. |
| 113 |
|
| 114 |
```sh |
| 115 |
$ deactivate |
| 116 |
``` |
| 117 |
|
| 118 |
# Usage |
| 119 |
|
| 120 |
``` |
| 121 |
$ hyperorg ~/orgfolder ~/htmlfolder |
| 122 |
``` |
| 123 |
|
| 124 |
This will take all `*.org` files in the folder `~/orgfolder` and store them |
| 125 |
converted to HTML in `~/htmlfolder`. Open the `index.html` file in the |
| 126 |
output folder to see the result. |
| 127 |
|
| 128 |
These are all available options: |
| 129 |
``` |
| 130 |
usage: hyperorg [-h] [--hardlinks] [-s] [-v] [-d] [--version] inputdir outputdir |
| 131 |
|
| 132 |
positional arguments: |
| 133 |
inputdir Source directory with org-files. |
| 134 |
outputdir Destination directory for html-files. |
| 135 |
|
| 136 |
optional arguments: |
| 137 |
-h, --help show this help message and exit |
| 138 |
--hardlinks Use hardlinks instead of symlinks for images and other |
| 139 |
attachments in the input directory. |
| 140 |
-s, --show Open result in default browser. |
| 141 |
-v, --verbose Give detailed information. |
| 142 |
-d, --debug Debug output. |
| 143 |
--version show program's version number and exit |
| 144 |
``` |
| 145 |
|
| 146 |
# Feature List |
| 147 |
|
| 148 |
- Convert all nodes in an Org-roam vault (collection of org files) into HTML. |
| 149 |
- Preserves links between nodes. |
| 150 |
- Generates backlinks for each node. |
| 151 |
- Generates a comprehensive index of all nodes. |
| 152 |
- Not stopping on malformed nodes, or broken links, but emitting clear |
| 153 |
warnings. |
| 154 |
|
| 155 |
# Design Goals |
| 156 |
|
| 157 |
- Functions out of the box, no configuration needed. |
| 158 |
- Operates as a standalone application, eliminating the requirement for Emacs. |
| 159 |
- Serverless local use of HTML files. |
| 160 |
- Robust handling of parsing issues. |
| 161 |
- Adheres to World Wide Web Consortium (W3C) standards for HTML5 and CSS |
| 162 |
(`<!DOCTYPE html>`). |
| 163 |
- No JavaScript or other dynamic web techniques, except when really necessary |
| 164 |
(e.g. MathJax). |
| 165 |
|
| 166 |
# Comparison to similar tools |
| 167 |
|
| 168 |
_Hyperorg_ takes an existing Org-roam **link graph**, exports it |
| 169 |
**out-of-the-box** as a navigable HTML structure and does not require |
| 170 |
configuration. |
| 171 |
|
| 172 |
The Org-roam vault is treated as a graph of nodes, not just a collection of |
| 173 |
independent files. ID-based links are first-class, meaning that `id:` links are |
| 174 |
resolved as real graph edges between nodes, not treated as plain text |
| 175 |
links. Backlinks are generated as part of the regular output. Every page |
| 176 |
includes incoming references automatically. All of this works without |
| 177 |
configuration. |
| 178 |
|
| 179 |
Similar tools like `org-export`, `org-publish` or _Hugo_, do model files and |
| 180 |
publishing rules, while _Hyperorg_ models the org-roam graph itself as the |
| 181 |
direct basis for HTML generation. |
| 182 |
|
| 183 |
# Motivation - Why _Hyperorg_ exists |
| 184 |
|
| 185 |
The creation of _Hyperorg_ was initially driven by two aspects. First, there |
| 186 |
was the need to make an Org-roam vault accessible on systems without an Emacs |
| 187 |
available. Second, there was the experience that there is no known solution |
| 188 |
available to reliably handle the `id:` links in Org-roam nodes and to meet the |
| 189 |
requirements of a Zettelkasten scenario. |
| 190 |
|
| 191 |
In addition, the project was influcenced by practical constraints regarding the |
| 192 |
authors personal skill set and a lack of motivation and intent to learn or |
| 193 |
adapt to extensive configuration systems in other tools. Alternative tools |
| 194 |
doesn't meet all mentioned design goals and features, not because they are not |
| 195 |
good but they simply target on different use cases and design goals. |
| 196 |
|
| 197 |
# Development roadmap |
| 198 |
|
| 199 |
- **Short term** |
| 200 |
- Primary focus is on improving maintainability and testability of the grown |
| 201 |
codebase via rearanging and refactoring it. See meta issue |
| 202 |
[#195](https://codeberg.org/buhtz/hyperorg/issues/195). |
| 203 |
- **Medium term** |
| 204 |
- [Next release after `0.2.0`](https://codeberg.org/buhtz/hyperorg/milestone/5750). |
| 205 |
([#85](https://codeberg.org/buhtz/hyperorg/issues/i85)). |
| 206 |
- Implement feature: Table of content |
| 207 |
- Several more features. |
| 208 |
- Improve visual appearance and sexyness via color scheming and more. See |
| 209 |
[CSS-related issues](https://codeberg.org/buhtz/hyperorg/issues?labels=180551) and |
| 210 |
[#66](https://codeberg.org/buhtz/hyperorg/issues/66). |
| 211 |
- **Long term** |
| 212 |
- Integrate the necessary features of `orgparse` and remove that dependency. |
| 213 |
- Separate the parser component into its own project to make it accessible to |
| 214 |
others. |
| 215 |
|
| 216 |
# Contributing |
| 217 |
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details about how to |
| 218 |
contribute to the project. Details about the concecpt, code structure and |
| 219 |
design decisions can be found in |
| 220 |
[`examples/org/20250912150340-hyperorg_design_concept.org`](https://codeberg.org/buhtz/hyperorg/raw/example/org/20250912150340-hyperorg_design_concept.org). |
| 221 |
|
| 222 |
The following communities have supported this project with contributions to |
| 223 |
discussions, tips, other valuable contributions and also inspirations. |
| 224 |
|
| 225 |
- The communities around [Emacs](https://www.gnu.org/software/emacs/), |
| 226 |
[Org-roam](https://www.orgroam.com/), |
| 227 |
[Org-mode](https://orgmode.org/) and |
| 228 |
[ox-hugo](https://ox-hugo.scripter.co/). |
| 229 |
- [Regex101](https://regex101.com) |
| 230 |
- [StackOverflow](https://stackoverflow.com) |
| 231 |
- [debianforum.de](https://debianforum.de) |
| 232 |
- And others. |
| 233 |
|
| 234 |
# Example |
| 235 |
|
| 236 |
On the left side of this screenshot, an _Emac's_ window displaying an _Org_ |
| 237 |
buffer can be seen, while on the right side, the same content is prestend in |
| 238 |
_HTML_ format.  |
| 239 |
|
| 240 |
Here you can observe the identical content presented in both raw _Org_ and |
| 241 |
_HTML_ formats. |
| 242 |
|
| 243 |
<table> |
| 244 |
<tr> |
| 245 |
<th style="vertical-align:top;width:50%">Org</th> |
| 246 |
<th style="vertical-align:top;width:50%">HTML</th> |
| 247 |
</tr> |
| 248 |
<tr> |
| 249 |
<td> |
| 250 |
|
| 251 |
```Markdown |
| 252 |
:PROPERTIES: |
| 253 |
:ID: 13ec1e89-abc9-4d43-a4a4-3005a1c9dfc7 |
| 254 |
:END: |
| 255 |
#+title: Foo |
| 256 |
#+date: [2022-03-09 Mi 09:30] |
| 257 |
* Introduction |
| 258 |
This node is named "foo" and should link to "bar". |
| 259 |
This is the link: [[id:e4bd446b-216b-4e34-8d10-428b6fa5e257][bar]] |
| 260 |
|
| 261 |
* H1 Heading |
| 262 |
** H2 Heading |
| 263 |
Governments of the Industrial World, you weary giants of flesh and steel, I |
| 264 |
come from Cyberspace, the new home of Mind. On behalf of the future, I ask |
| 265 |
you of the past to leave us alone. |
| 266 |
|
| 267 |
- You are not welcome among us. |
| 268 |
- You have no sovereignty where we gather. |
| 269 |
|
| 270 |
We have no elected government, nor are we likely to have one, so I address |
| 271 |
you with no greater authority than that with which liberty itself always |
| 272 |
speaks. |
| 273 |
|
| 274 |
1. I declare the global social space we are building to be naturally |
| 275 |
independent |
| 276 |
2. of the tyrannies you seek to impose on us. |
| 277 |
|
| 278 |
Source: [[https://www.eff.org/de/cyberspace-independence]] |
| 279 |
|
| 280 |
** A https link |
| 281 |
|
| 282 |
[[https://codeberg.org/buhtz/hyperorg][The "hyperorg" repository]] |
| 283 |
|
| 284 |
* About backlinks |
| 285 |
See the autogenerated backlinks in the next section. The node "bar" does link |
| 286 |
to this node "foo". |
| 287 |
``` |
| 288 |
|
| 289 |
</td> |
| 290 |
<td> |
| 291 |
|
| 292 |
```html |
| 293 |
<!DOCTYPE html> |
| 294 |
<html lang="de"> |
| 295 |
<head> |
| 296 |
<meta name="generator" content="hyperorg" /> |
| 297 |
<meta name="generator_version" content="0.1.0" /> |
| 298 |
<meta name="generator_website" content="https://codeberg.org/buhtz/hyperorg" /> |
| 299 |
<meta charset="UTF-8" /> |
| 300 |
<link rel="stylesheet" href="style.css" /> |
| 301 |
<link rel="stylesheet" href="pygments.css" /> |
| 302 |
<title>Foo</title> |
| 303 |
</head> |
| 304 |
<body> |
| 305 |
<nav> |
| 306 |
<ul> |
| 307 |
<li><a href="index.html">Index</a> (1013)</li> |
| 308 |
<li><a href="index__filetag__no_tags_.html">(no tags)</a> (514)</li> |
| 309 |
<li><a href="index__filetag_Bib.html">Bib</a> (277)</li> |
| 310 |
<li><a href="index__filetag_Wiki.html">Wiki</a> (166)</li> |
| 311 |
<li><a href="index__filetag_Meta.html">Meta</a> (43)</li> |
| 312 |
<li><a href="index__filetag_Project.html">Project</a> (19)</li> |
| 313 |
</ul></nav> |
| 314 |
<main> |
| 315 |
<h1>Foo</h1> |
| 316 |
<section> |
| 317 |
<header><div><span class="label">date:</span> [2022-03-09 Mi 09:30]</div> </header> |
| 318 |
<h2>Introduction</h2> |
| 319 |
<p>This node is named "foo" and should link to "bar". This is the link: <a href="20240319084651-bar.html">bar</a></p> |
| 320 |
<h2>H1 Heading</h2> |
| 321 |
<h3>H2 Heading</h3> |
| 322 |
<p>Governments of the Industrial World, you weary giants of flesh and steel, I come from Cyberspace, the new home of Mind. On behalf of the future, I ask you of the past to leave us alone.</p> |
| 323 |
<ul> |
| 324 |
<li>You are not welcome among us.</li> |
| 325 |
<li>You have no sovereignty where we gather.</li> |
| 326 |
</ul> |
| 327 |
<p>We have no elected government, nor are we likely to have one, so I address you with no greater authority than that with which liberty itself always speaks.</p> |
| 328 |
<ol> |
| 329 |
<li>I declare the global social space we are building to be naturally independent</li> |
| 330 |
<li>of the tyrannies you seek to impose on us.</li> |
| 331 |
</ol> |
| 332 |
<p>Source: <a target="_blank" rel="noopener noreferrer" href="https://www.eff.org/de/cyberspace-independence">https://www.eff.org/de/cyberspace-independence</a></p> |
| 333 |
<h3>A https link</h3> |
| 334 |
<p><a target="_blank" rel="noopener noreferrer" href="https://codeberg.org/buhtz/hyperorg">The "hyperorg" repository</a></p> |
| 335 |
<h2>About backlinks</h2> |
| 336 |
<p>See the autogenerated backlinks in the next section. The node "bar" does link to this node "foo".</p> |
| 337 |
</section> |
| 338 |
<section> |
| 339 |
<hr /> |
| 340 |
<h2>Backlinks</h2> |
| 341 |
<ul> |
| 342 |
<li><a href="20240319084651-bar.html">bar</a></li> |
| 343 |
</ul> |
| 344 |
</section> |
| 345 |
</main> |
| 346 |
<footer> |
| 347 |
Generated with <a href="https://codeberg.org/buhtz/hyperorg">hyperorg</a> 0.1.0 on Di 19 Mär 2024 09:03:51 |
| 348 |
</footer> |
| 349 |
</body> |
| 350 |
</html> |
| 351 |
``` |
| 352 |
|
| 353 |
</td> |
| 354 |
</tr> |
| 355 |
</table> |
| 356 |
|
| 357 |
# Technologies & Standards |
| 358 |
|
| 359 |
- [Python 3](https://python.org) |
| 360 |
- [`orgparse`](https://orgparse.readthedocs.io/en/latest/) |
| 361 |
- [W3C](https://www.w3.org/) conform |
| 362 |
[HTML5](https://wikipedia.org/wiki/HTML5) |
| 363 |
& [CSS](https://wikipedia.org/wiki/CSS) |
| 364 |
- [Semantic Versioning](https://semver.org), |
| 365 |
[Common Changelog](https://common-changelog.org) and |
| 366 |
[Conventional Commits](https://www.conventionalcommits.org) |
| 367 |
- [REUSE Software](https://reuse.software) and |
| 368 |
[SPDX](https://spdx.github.io/spdx-spec) ([ISO/IEC 5962:2021](https://www.iso.org/obp/ui/en/#iso:std:iso-iec:5962)) specifications |