diff --git a/cmd/web/kaku/LICENSE b/cmd/web/kaku/LICENSE new file mode 100644 index 0000000..8da4a12 --- /dev/null +++ b/cmd/web/kaku/LICENSE @@ -0,0 +1,21 @@ +ANTI-CAPITALIST SOFTWARE LICENSE (v 1.4) + +Copyright © 2026 Thomasorus + +This is anti-capitalist software, released for free use by individuals and organizations that do not operate by capitalist principles. + +Permission is hereby granted, free of charge, to any person or organization (the "User") obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, merge, distribute, and/or sell copies of the Software, subject to the following conditions: + +1. The above copyright notice and this permission notice shall be included in all copies or modified versions of the Software. + +2. The User is one of the following: +a. An individual person, laboring for themselves +b. A non-profit organization +c. An educational institution +d. An organization that seeks shared profit for all of its members, and allows non-members to set the cost of their labor + +3. If the User is an organization with owners, then all owners are workers and all workers are owners with equal equity and/or equal vote. + +4. If the User is an organization, then the User is not law enforcement or military, or working for or under either. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cmd/web/kaku/README.md b/cmd/web/kaku/README.md new file mode 100644 index 0000000..eb1cd90 --- /dev/null +++ b/cmd/web/kaku/README.md @@ -0,0 +1,234 @@ +# Kaku 書く + +Kaku (write) is my own markup language. It's inspired by Markdown with a few modification for quotes, links, images and lists handling, and more. It was created to fit my needs. This repositoty contains a parser for Kaku. + +## License + +Kaku 書く is a free to use by individuals and organizations that do not operate by capitalist principles. For more information see the [license](LICENSE) file. + +--- + +## Headings + +`#` through `######` for heading levels 1 through 6. Each heading gets an +auto-generated `id` and a clickable permalink anchor. + +``` +# Heading level 1 +## Heading level 2 +###### Heading level 6 +``` + +Renders as: +```html +

Heading level 1#

+``` + +--- + +## Basic inline formatting + +| Syntax | Result | +|---|---| +| `*bold*` | **bold** → `` | +| `_emphasis_` | *emphasis* → `` | +| `~strike~` | ~~strike~~ → `` | +| `` `code` `` | `code` → `` | + +``` +This is *bold*, this is _emphasis_, this is ~strikethrough~, and this is `inline code`. +``` + +Inline formatting can be combined with links and images (see below). + +--- + +## Horizontal rule + +Four dashes on their own line: + +``` +---- +``` + +Renders as `
`. + +--- + +## Code blocks + +Triple backticks, with an optional language right after the opening fence: + +```` +```go +func main() { + fmt.Println("hello") +} +``` +```` + +Renders as: +```html +
func main() {
+    fmt.Println("hello")
+}
+``` + +Content inside a code block is never parsed for other Kaku syntax — everything +stays literal. + +--- + +## Lists + +### Bullet list +``` +- First item +- Second item +- Third item +``` + +### Ordered list +``` ++ First item ++ Second item ++ Third item +``` + +### Definition list +``` +? Term one : Its definition +? Term two : Its definition +``` + +List item text supports inline formatting (bold, links, etc.): +``` +- Check out (link: https://example.com text: this link) +``` + +--- + +## Links + +``` +(link: https://example.com text: Click here) +(link: https://example.com text: Click here title: Hover tooltip) +(link: https://example.com text: Click here label: Accessible label) +``` + +Fields: `link` (required), `text`, `label`, `title` — order doesn't matter, +all except `link` are optional. + +Links also work **inline**, inside a paragraph or list item: +``` +Check out (link: https://example.com text: this) for more info. +``` + +--- + +## Images + +``` +(image: photo.jpg alt: A description of the photo) +(image: photo.jpg alt: A description figcaption: An optional caption) +``` + +Fields: `image` (required), `alt`, `figcaption`. + +Images work inline too, and can be made clickable by nesting inside a link: +``` +(link: https://example.com text: (image: photo.jpg alt: A photo)) +``` + +--- + +## Video + +``` +(video: clip.mp4) +(video: clip.mp4 autoplay) +``` + +Plain video gets standard playback controls. Adding `autoplay` makes it behave +like a looping, muted, GIF-style clip instead (`autoplay loop muted playsinline`). + +--- + +## Audio + +``` +(audio: track.mp3) +``` + +Renders as an `