getting closeeee
This commit is contained in:
parent
8ea7873403
commit
6ec48f2605
|
@ -70,15 +70,13 @@ npm install -g git+https://codeberg.org/talon/gmi-web.git
|
||||||
man gmi-web
|
man gmi-web
|
||||||
```
|
```
|
||||||
|
|
||||||
### example
|
|
||||||
|
|
||||||
Render .html for all the .gmi files in the current directory
|
Render .html for all the .gmi files in the current directory
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gmi-web $(find . -name *.gmi)
|
gmi-web --lang en $(find . -name *.gmi)
|
||||||
```
|
```
|
||||||
|
|
||||||
## gmi.css
|
### gmi.css
|
||||||
|
|
||||||
Optimized for readability, predictability, mobile-friendliness and
|
Optimized for readability, predictability, mobile-friendliness and
|
||||||
ships with a handful of customizable variables. See `man 5 gmi.css`.
|
ships with a handful of customizable variables. See `man 5 gmi.css`.
|
||||||
|
@ -96,7 +94,7 @@ Any of the variables can be customized by adding a style to the `<html>` elemen
|
||||||
When using `gmi-web(1)` they can be customized by providing _OPTIONS_ of the same name as the CSS variable.
|
When using `gmi-web(1)` they can be customized by providing _OPTIONS_ of the same name as the CSS variable.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gmi-web --foreground "#FFFFF" --background "#00000" *.gmi
|
gmi-web --lang en --foreground "#FFFFF" --background "#00000" *.gmi
|
||||||
```
|
```
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
3
cli.js
3
cli.js
|
@ -31,7 +31,7 @@ const GMI_CSS_VARS = [
|
||||||
require("yargs")
|
require("yargs")
|
||||||
.scriptName("gmi-web")
|
.scriptName("gmi-web")
|
||||||
.command(
|
.command(
|
||||||
"$0 [files..]",
|
"$0 [--lang] [files..]",
|
||||||
"Convert .gmi to .html. See gmi-web(1) for more details.",
|
"Convert .gmi to .html. See gmi-web(1) for more details.",
|
||||||
(yargs) =>
|
(yargs) =>
|
||||||
yargs
|
yargs
|
||||||
|
@ -67,7 +67,6 @@ require("yargs")
|
||||||
"gmi.css is included by default. Use --no-css to for the bare-minimum <style>",
|
"gmi.css is included by default. Use --no-css to for the bare-minimum <style>",
|
||||||
}),
|
}),
|
||||||
(argv) => {
|
(argv) => {
|
||||||
console.log(argv)
|
|
||||||
const override = GMI_CSS_VARS.reduce((style, key) => {
|
const override = GMI_CSS_VARS.reduce((style, key) => {
|
||||||
if (argv[key]) {
|
if (argv[key]) {
|
||||||
style += `--${key}: ${argv[key]};`;
|
style += `--${key}: ${argv[key]};`;
|
||||||
|
|
11
gmi-web.1
11
gmi-web.1
|
@ -13,7 +13,7 @@ gmi-web - A bridge between Gemini and HTML.
|
||||||
.P
|
.P
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.P
|
.P
|
||||||
\fBgmi-web\fR <\fIOPTIONS\fR> [\fIFILES\fR]
|
\fBgmi-web\fR [--lang] <\fIOPTIONS\fR> [\fIFILES\fR]
|
||||||
.P
|
.P
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.P
|
.P
|
||||||
|
@ -22,12 +22,17 @@ and mobile-friendly fashion!
|
||||||
.P
|
.P
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.P
|
.P
|
||||||
|
\fB--lang\fR
|
||||||
|
.RS 4
|
||||||
|
Required for <meta languge="">
|
||||||
|
.P
|
||||||
|
.RE
|
||||||
\fBCSS Variables\fR
|
\fBCSS Variables\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Any variable documented in \fBgmi.css\fR(5) can be set via \fIOPTIONS\fR of the same
|
Any variable documented in \fBgmi.css\fR(5) can be set via \fIOPTIONS\fR of the same
|
||||||
name.
|
name.
|
||||||
.P
|
.P
|
||||||
\fBgmi-web\fR --foreground "#FFFFF" --background "#00000" $(find . -name *.gmi)
|
\fBgmi-web\fR --lang "en" --foreground "#FFFFF" --background "#00000" $(find . -name *.gmi)
|
||||||
.P
|
.P
|
||||||
.RE
|
.RE
|
||||||
\fB--images\fR \fB--audio\fR \fB--video\fR
|
\fB--images\fR \fB--audio\fR \fB--video\fR
|
||||||
|
@ -46,7 +51,7 @@ Render .html for all the .gmi files in the current directory
|
||||||
.P
|
.P
|
||||||
.nf
|
.nf
|
||||||
.RS 4
|
.RS 4
|
||||||
gmi-web $(find \&. -name *\&.gmi)
|
gmi-web --lang en $(find \&. -name *\&.gmi)
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
.P
|
.P
|
||||||
|
|
|
@ -6,7 +6,7 @@ gmi-web - A bridge between Gemini and HTML.
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
|
|
||||||
*gmi-web* <_OPTIONS_> [_FILES_]
|
*gmi-web* [--lang] <_OPTIONS_> [_FILES_]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
|
@ -15,14 +15,14 @@ and mobile-friendly fashion!
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
|
||||||
*--languge*
|
*--lang*
|
||||||
Required for <meta languge="">
|
Required for <meta languge="">
|
||||||
|
|
||||||
*CSS Variables*
|
*CSS Variables*
|
||||||
Any variable documented in *gmi.css*(5) can be set via _OPTIONS_ of the same
|
Any variable documented in *gmi.css*(5) can be set via _OPTIONS_ of the same
|
||||||
name.
|
name.
|
||||||
|
|
||||||
*gmi-web* --foreground "#FFFFF" --background "#00000" $(find . -name \*.gmi)
|
*gmi-web* --lang "en" --foreground "#FFFFF" --background "#00000" $(find . -name \*.gmi)
|
||||||
|
|
||||||
*--images* *--audio* *--video*
|
*--images* *--audio* *--video*
|
||||||
Include the respective media inline.
|
Include the respective media inline.
|
||||||
|
@ -35,7 +35,7 @@ and mobile-friendly fashion!
|
||||||
Render .html for all the .gmi files in the current directory
|
Render .html for all the .gmi files in the current directory
|
||||||
|
|
||||||
```
|
```
|
||||||
gmi-web $(find . -name \*.gmi)
|
gmi-web --lang en $(find . -name \*.gmi)
|
||||||
```
|
```
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
|
@ -44,7 +44,9 @@ function head(file, title, options) {
|
||||||
}${
|
}${
|
||||||
!options.canonical
|
!options.canonical
|
||||||
? ""
|
? ""
|
||||||
: `<link rel="canonical" href="gemini://${options.canonical}/${file.replace(TOKENS_EXT, ".gmi")}">`
|
: `<link rel="canonical" href="gemini://${
|
||||||
|
options.canonical
|
||||||
|
}/${file.replace(TOKENS_EXT, ".gmi")}">`
|
||||||
}
|
}
|
||||||
<title>${title}</title>
|
<title>${title}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue