documentation

I think I need to write some actual code now...
pull/3/head
Talon Poole 2 years ago
parent 2cdf287808
commit d8c518a575
  1. 8
      .editorconfig
  2. 33
      README.md
  3. 24
      UNLICENSE
  4. 22
      cli.js
  5. 2
      example.html
  6. 56
      gmi-web.1.scd
  7. 1
      gmi.css
  8. 2
      package.json

@ -0,0 +1,8 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
[*.scd]
indent_style = tab

@ -1,7 +1,5 @@
# gmi-web
![CC0](https://licensebuttons.net/p/zero/1.0/80x15.png)
**Vision**: Provide the lowest common denominator between HTML/CSS/JS and Gemini.
## HTML spec
@ -23,7 +21,7 @@ The `<a>` for a link should be presented without any parent elements. Many imple
### inline media
Optionally, if a link is consumable by `<img>`, `<audio>` or `<video>` you may insert the media inline. Images and video should be styled to have `max-width: 100%` so they don't overflow the body. It's a good idea to also include the "controls" attribute for videos and audio. `<audio>` tags require `display: block;` just like `<a>`.
Optionally, if a link is consumable by `<img>`, `<audio>` or `<video>` you may insert the media inline. Images and video should be styled to have `max-width: 100%;` so they don't overflow the body. It's a good idea to also include the "controls" attribute for videos and audio. `<audio>` tags require `display: block;` just like `<a>`.
### contenteditable
@ -74,6 +72,31 @@ gmi.css will respect system dark mode preferences by inverting `--foreground` an
<html style="--foreground:#555555; --background:#9EEBCF;">
```
## gmi-web(1)
```
gmi-web [--out path] [--no-css] [files]
A bridge between Gemini and HTML. See gmi-web(1) for more details.
Positionals:
files .gmi files to convert to .html
Options:
--version Show version number
--help Show help
--out Write .html files to a seperate directory located at path.
--no-css Do not include gmi.css in the rendered HTML markup.
```
*You will need*:
- [node(1) (w/ npm(1))](https://nodejs.org/en/) (to build/run the cli)
- [scdoc(1)](https://git.sr.ht/~sircmpwn/scdoc) (for the man pages)
```sh
make install
```
<!-- TODO
### gmi.js
@ -118,3 +141,7 @@ window.gmi.foreground = background
window.gmi.background = foreground
```
-->
### License
gmi-web is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, 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.
For more information, please refer to <http://unlicense.org/>

@ -1,12 +1,24 @@
#!/usr/bin/env node
require("yargs")
.scriptName("gmi-web")
.command(
"$0",
"A bridge between Gemini and HTML",
(yargs) => yargs,
// TODO
"$0 [--out path] [--no-css] [files]",
"A bridge between Gemini and HTML. See gmi-web(1) for more details.",
(yargs) =>
yargs
.positional("files", {
describe: ".gmi files to convert to .html",
})
.required("files", true)
.option("out", {
type: "string",
description:
"Write .html files to a seperate directory located at path.",
})
.option("no-css", {
type: "boolean",
description: "Do not include gmi.css in the rendered HTML markup.",
}),
(argv) => {
// TODO
}

@ -38,7 +38,7 @@ including newlines
<video controls src="https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4"></video>
<audio controls src="https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3"></audio>
<p><br></p>
<h3>in the browser:</h3>
<h3>contenteditable</h3>
<p>
While Gemini does not support newlines on a regular text line when editing a "p" tag in the browser
the default behavior for "enter" will create a "br" and not a new "p".

@ -1,15 +1,67 @@
gmi-web(1)
gmi-web(1) "1.0.0"
# NAME
gmi-web - a bridge between Gemini and HTML
gmi-web - A bridge between Gemini and HTML
# SYNOPSIS
*gmi-web* [--out _path_] [--no-css] _files_
# DESCRIPTION
Convert your Gemini files to semantic HTML styled in a readable, predictable
and mobile-friendly fashion!
# OPTIONS
*--out* _path_
Write .html files to a seperate directory located at _path_.
*--no-css*
Do not include gmi.css in the rendered HTML markup.
# EXAMPLES
The following example will create .html converted files next to their .gmi counterparts on the filesystem.
```
$ gmi-web gmi/*.gmi
```
If you would like to seperate the .html files out to their own folder use the *--out* flag.
```
$ gmi-web --out html gmi/*.gmi
```
# AUTHORS
Maintained by Talon Poole <code@talon.computer>. Up-to-date sources can be
found at https://codeberg.org/talon/gmi-web
# COPYRIGHT
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, 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.
For more information, please refer to <http://unlicense.org/>

@ -1,4 +1,3 @@
/* gmi.css is CCO */
:root {
--foreground: black;
--background: white;

@ -24,5 +24,5 @@
"gmi"
],
"author": "Talon Poole",
"license": "CC0-1.0"
"license": "UNLICENSE"
}

Loading…
Cancel
Save