From c02c6474a874d188039e09ccdf4df46590dff4f2 Mon Sep 17 00:00:00 2001 From: Talon Poole Date: Tue, 16 Feb 2021 20:32:27 +0000 Subject: [PATCH] clean --- .editorconfig | 2 + .gitignore | 5 +- .prettierignore | 1 - README.md | 3 +- example/expected.html | 48 ----------------- example/test.gmi | 33 ------------ gmi-web.1 | 117 ------------------------------------------ gmi-web.1.scd | 4 +- package-lock.json | 10 +--- package.json | 6 +-- test.sh | 10 ---- 11 files changed, 9 insertions(+), 230 deletions(-) delete mode 100644 .prettierignore delete mode 100644 example/expected.html delete mode 100644 example/test.gmi delete mode 100644 gmi-web.1 delete mode 100755 test.sh diff --git a/.editorconfig b/.editorconfig index 4937613..0a29617 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,5 @@ indent_size = 2 indent_style = space [*.scd] indent_style = tab +[Makefile] +indent_style = tab diff --git a/.gitignore b/.gitignore index ef41b2d..42e9a13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ node_modules/ -capsule/ -gmi.js -gmi.min.js -example/test.html +gmi-web.1 diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 90c978b..0000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -example/ diff --git a/README.md b/README.md index 4863486..9fabf68 100644 --- a/README.md +++ b/README.md @@ -119,8 +119,7 @@ See the gmi-web(1) man page for more information # gmi.css -Optimized for readability, predictability and mobile-friendliness. -Ships with a handful of customizable variables. See `man 5 gmi.css`. +Optimized for readability, predictability and mobile-friendliness. Ships with a handful of customizable variables. The `--foreground` and `--background` variables will be inverted when `prefers-color-scheme` is "dark" which is a system-level preference on diff --git a/example/expected.html b/example/expected.html deleted file mode 100644 index b613160..0000000 --- a/example/expected.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - -heading 1 - - -

heading 1

-

heading 2

-

heading 3

-

checkout this empty line:

-


- -


-
here's what a blockquote is like
-


-
-preformatted text
-       means that it already has formatting
-  which means it should show
-
-
-
-                           as is
-
-


-

<b>watch out!</b> a gemtext line could have html in it that you'll need to escape!

-


-https://codeberg.org/talon/gmi-web -links can have text too - - - -


-

w/ no "titles"

- - - - - diff --git a/example/test.gmi b/example/test.gmi deleted file mode 100644 index c0c5c8d..0000000 --- a/example/test.gmi +++ /dev/null @@ -1,33 +0,0 @@ -# heading 1 -## heading 2 -### heading 3 -checkout this empty line: - -* and -* this -* list - -> here's what a blockquote is like - -```pre tags can have title text -preformatted text - means that it already has formatting - which means it should show - - - - as is -``` - -watch out! a gemtext line could have html in it that you'll need to escape! - -=> https://codeberg.org/talon/gmi-web -=> https://codeberg.org/talon/gmi-web links can have text too -=> https://www.learningcontainer.com/wp-content/uploads/2020/07/Large-Sample-Image-download-for-Testing.jpg JPG image that can render inline! -=> https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3 MP3 audio that can render inline! -=> https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4 MP4 Video that can render inline! - -### w/ no "titles" -=> https://www.learningcontainer.com/wp-content/uploads/2020/07/Large-Sample-Image-download-for-Testing.jpg -=> https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3 -=> https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4 diff --git a/gmi-web.1 b/gmi-web.1 deleted file mode 100644 index a70adcc..0000000 --- a/gmi-web.1 +++ /dev/null @@ -1,117 +0,0 @@ -.\" Generated by scdoc 1.10.1 -.\" Complete documentation for this program is not available as a GNU info page -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.nh -.ad l -.\" Begin generated content: -.TH "gmi-web" "1" "2021-02-16" "1.0.4-rc.2" -.P -.SH NAME -.P -gmi-web - a bridge between Gemini and HTML -.P -.SH SYNOPSIS -.P -\fBgmi-web\fR \fIOPTIONS\fR < \fIFILE\fR -.P -\fBgmi-web\fR \fIOPTIONS\fR \fIFILES\fR -.P -.SH DESCRIPTION -.P -Convert Gemtext to semantic HTML styled in a readable, predictable and -mobile-friendly fashion! -.P -.SH OPTIONS -.P -\fB--body\fR -.RS 4 -Generate just the HTML for the lines of the Gemini document. -.P -.RE -\fB--html\fR \fILANG\fR -.RS 4 -Generate a full HTML5 document with the provided \fILANG\fR. \fB--dir\fR can be used -to adjust the document text direction from "ltr" to "rtl". -.P -Use \fB--descriptions\fR \fILIMIT\fR to apply the first non-empty text line of each -file as the description tag. \fILIMIT\fR will be used to truncate the text -with an ellipsis at that number of characters. -.P -Use \fB--author\fR \fINAME\fR to set the author tag on every file. -.P -.RE -\fB--css\fR [\fIMODE\fR|\fIFILE\fR] -.RS 4 -By default this will be set to \fBfull\fR enabling a handful of customizable -variables. See \fB--help\fR for the complete list. -.P -.RE -.nf -.RS 4 -gmi-web --html en \\ - --foreground "#555555" \\ - --background "#9EEBCF" < doc\&.gmi -.fi -.RE -.P -.RS 4 -Choosing \fBcore\fR will use just what is needed to fix vertical layout issues -with CSS 2.1's Normal Flow and inline elements. Pointing to a .css \fIFILE\fR -will use those styles. -.P -Choosing \fBnone\fR will not include any style information including when paired -with \fB--body\fR where it will not apply the core inline styles. -.P -.RE -\fB[--image|--audio|--video]\fR \fIEXTENSIONS\fR -.RS 4 -Include media extensions inline. You can provide multiple extensions per flag -or multiple flags per extension. -.P -.RE -.nf -.RS 4 -gmi-web --html en \\ - --image jpg \\ - --image png \\ - --audio mp3 ogg < doc\&.gmi -.fi -.RE -.P -\fB--config\fR \fIJSON\fR -.RS 4 -All the options documented here and by \fB--help\fR may be captured in a .json -file and passed to \fB--config\fR instead of as flags on the command-line. -.P -.RE -.SH AUTHORS -.P -Maintained by Talon Poole . Up-to-date sources can be -found at https://codeberg.org/talon/gmi-web -.P -.SH COPYRIGHT -This is free and unencumbered software released into the public domain. -.P -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. -.P -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. -.P -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. -.P -For more information, please refer to diff --git a/gmi-web.1.scd b/gmi-web.1.scd index a8ee32a..f1b1dbe 100644 --- a/gmi-web.1.scd +++ b/gmi-web.1.scd @@ -1,8 +1,8 @@ -gmi-web(1) "1.0.5-rc.2" +gmi-web(1) "1.0.7-rc.2" # NAME -gmi-web - a bridge between Gemini and HTML +gmi-web - A bridge between Gemini and HTML # SYNOPSIS diff --git a/package-lock.json b/package-lock.json index 0f5fb2d..3c37061 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gmi-web-cli", - "version": "1.0.4-rc.2", + "version": "1.0.6-rc.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -58,14 +58,6 @@ "get-intrinsic": "^1.0.2" } }, - "clean-css": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.0.1.tgz", - "integrity": "sha512-F1zAGOowUCg8yxT0O4UR+nmbMauf3YwbiUS60CPxpzJU7ulpamGzQomFrJSK4w/HqHtMmQKSHJUNue+dQQYQdg==", - "requires": { - "source-map": "~0.6.0" - } - }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", diff --git a/package.json b/package.json index 5c914d8..2d45c68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gmi-web-cli", - "version": "1.0.5-rc.2", + "version": "1.0.7-rc.2", "description": "A bridge between HTML and Gemini", "main": "html.js", "type": "module", @@ -8,8 +8,7 @@ "gmi-web": "cli.js" }, "man": [ - "./gmi-web.1", - "./gmi.css.5" + "./gmi-web.1" ], "files": [ "UNLICENSE", @@ -24,7 +23,6 @@ "prepare": "prettier --write ." }, "dependencies": { - "clean-css": "^5.0.1", "css": "^3.0.0", "escape-html": "^1.0.3", "map-stream": "0.0.7", diff --git a/test.sh b/test.sh deleted file mode 100755 index 50355ca..0000000 --- a/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -rm -rf "example/test.html" -./cli.js --image jpg --audio mp3 --video mp4 --html en "example/*.gmi" -if cmp -s "example/test.html" "example/expected.html"; then - printf "PASS: test.html matches expected.html!\n" -else - printf "FAIL: test.html DOES NOT match expected.html!\n" - cmp "example/test.html" "example/expected.html" - diff "example/test.html" "example/expected.html" - exit 1 -fi