diff --git a/README.md b/README.md index f9d59bf..529880b 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ This repo is home to: -* [a gmi-to-html specification](#gmi-to-html) -* [the gmi-web(1) command-line tool](#gmi-web-1) -* [a gmi.css stylesheet](#gmi-css) +- [a gmi-to-html specification](#gmi-to-html) +- [the gmi-web(1) command-line tool](#gmi-web-1) +- [a gmi.css stylesheet](#gmi-css) # gmi-to-html @@ -19,7 +19,7 @@ The converted Gemini document should exist inside the `
`. Consider if shar↔ > ```` -List items must be wrapped with a `` tag. Empty lines should simply be represented as `
`. Take care to render `
` blocks with their original formatting, DO NOT indent the generated +List items must be wrapped with a `` tag. Empty lines should be represented as `
`. Take care to render `
` blocks with their original formatting, DO NOT indent the generated HTML for these tags. `` tags are considered [inline elements](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flow_Layout/Block_and_Inline_Layout_in_Normal_Flow) which has presentational implications—CSS 2.1's _Normal Flow_ renders inline elements vertically. Gemini only deals with horizontally flowing content, this can be addressed by either re-defining `a {display: block;}` at the CSS level or by wrapping `` tags in a "block" level element such as ``. [MDN: Changing Element Levels](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements#changing_element_levels) @@ -43,7 +43,7 @@ Additionally a `
` tag with at least the following must also be included: These may also be nice to have: ```html - + ``` @@ -56,7 +56,7 @@ Currently approaching a v1 release 🎉 Would you like to help test the RC? _You npm install --global gmi-web-cli ``` -```sh +``` gmi-web [files..] Convert text/gemini to text/html. diff --git a/cli.js b/cli.js index 74ff7c7..2a1e058 100755 --- a/cli.js +++ b/cli.js @@ -12,7 +12,9 @@ const cli = yargs(process.argv.slice(2)) .command("$0 [files..]", "Convert text/gemini to text/html.", (yargs) => yargs .example("$0 --html en $(find ~/my-capsule -name '*.gmi')") - .example("$0 --foreground '#000000' --background '#EEEEEE' --html en < doc.gmi") + .example( + "$0 --foreground '#000000' --background '#EEEEEE' --html en < doc.gmi" + ) .example("$0 --body < ~/my-capsule/index.gmi") .example("$0 --image jpg --audio mp3 --image png --body < doc.gmi") .epilog("See the gmi-web(1) man page for more information") diff --git a/gmi-web.1 b/gmi-web.1 index ceee27b..c65e5ad 100644 --- a/gmi-web.1 +++ b/gmi-web.1 @@ -5,15 +5,17 @@ .nh .ad l .\" Begin generated content: -.TH "gmi-web" "1" "2021-02-11" "1.0.7-rc.1" +.TH "gmi-web" "1" "2021-02-12" "1.0.0-rc.2" .P .SH NAME .P -gmi-web - A bridge between Gemini and HTML. +gmi-web - a bridge between Gemini and HTML .P .SH SYNOPSIS .P -\fBgmi-web\fR [--lang] <\fIOPTIONS\fR> [\fIFILES\fR] +\fBgmi-web\fR [--html|--body] <\fIOPTIONS\fR> < [\fIFILE\fR] +.P +\fBgmi-web\fR [--html|--body] <\fIOPTIONS\fR> [\fIFILES\fR] .P .SH DESCRIPTION .P @@ -22,67 +24,52 @@ and mobile-friendly fashion! .P .SH OPTIONS .P -\fB--lang\fR +\fB--html\fR \fILANG\fR .RS 4 -Required for +Generate a full HTML5 document with the provided \fILANG\fR. +.P +\fBgmi-web\fR --html en < doc.gmi .P .RE -\fBCSS Variables\fR +\fB--body\fR .RS 4 -Any variable documented in \fBgmi.css\fR(5) can be set via \fIOPTIONS\fR of the same -name. +Generate only the HTML for the lines of the Gemini document. .P -\fBgmi-web\fR --lang "en" --foreground "#FFFFF" --background "#00000" $(find . -name *.gmi) +\fBgmi-web\fR --body < doc.gmi .P .RE -\fB--images\fR \fB--audio\fR \fB--video\fR +\fB--css\fR \fIMODE\fR .RS 4 -Include the respective media inline. +By default this will be set to \fBgmi.css\fR. Choosing \fBbase\fR will use just what +is needed to fix issues with CSS 2.1's Normal Flow. Choosing \fBnone\fR will not +include any style information and inline elements will be wrapped in. .P .RE -\fB--no-css\fR +\fBgmi.css\fR .RS 4 -Use only the bare minimum