summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rwxr-xr-xbuetow.org.sh10
-rw-r--r--packages/generate.source.sh12
3 files changed, 28 insertions, 9 deletions
diff --git a/README.md b/README.md
index 4d7261ae..dedc829f 100644
--- a/README.md
+++ b/README.md
@@ -14,11 +14,26 @@ This is the source code of my Gemini capsule. You can reach the site(s) here:
* Text editor: [Vim](https://www.vim.org)
* Gemini server: [a-h/gemini](https://github.com/a-h/gemini)
* Some Bash scripting (GNU Bash probably 5.x or higher required)
+* ShellCheck is also required to be installed.
## HTTP fallback software used
* Web server: [Apache HTTPD](https://httpd.apache.org)
+# Usage
+
+To get started just clone this repo (master branch) and run ./buetow.org.sh. You
+will will be prompted with further instructions.
+
+Once done, you can edit the Gemtext source and then use the buetow.org.sh script
+to generate the other output formats such as:
+
+* HTML
+* Markdown (works also with GitHub pages as you saw)
+* Meta (that's only generating meta info for the blog post, used for Atom feed generation)
+
+Do a ./buetow.org.sh --help for a list of all available arguments.
+
## TODO
These are things I want to do with this project in near future:
diff --git a/buetow.org.sh b/buetow.org.sh
index da8a99d7..ecb70711 100755
--- a/buetow.org.sh
+++ b/buetow.org.sh
@@ -27,10 +27,12 @@ source ./packages/md.source.sh
help () {
cat <<HELPHERE
$0's possible arguments:
- --feed
- --publish
- --test
- --help
+ --feed Generates Gemtext Atom feed and Gemfeed.
+ --generate Generates all known output formats (html, md, ...)
+ --publish Same as --generate, but also commits all files to git (and
+ removes obsolete files form git too).
+ --test Only runs some shellcheck and unit tests.
+ --help Prints this retty text.
HELPHERE
}
diff --git a/packages/generate.source.sh b/packages/generate.source.sh
index b28d9e8e..910d2502 100644
--- a/packages/generate.source.sh
+++ b/packages/generate.source.sh
@@ -134,14 +134,16 @@ generate::fromgmi () {
done
done
- if [[ -z "$GIT_COMMIT_MESSAGE" ]]; then
- GIT_COMMIT_MESSAGE='Publishing new version'
+ if [[ "$USE_GIT" == yes ]]; then
+ if [[ -z "$GIT_COMMIT_MESSAGE" ]]; then
+ GIT_COMMIT_MESSAGE='Publishing new version'
+ fi
+ git::commit gemtext "$GIT_COMMIT_MESSAGE"
+ git::commit meta "$GIT_COMMIT_MESSAGE"
fi
for format in "$@"; do
- git::commit "$format" "$GIT_COMMIT_MESSAGE"
+ test "$USE_GIT" == yes && git::commit "$format" "$GIT_COMMIT_MESSAGE"
log INFO "$format can be found in $CONTENT_BASE_DIR/$format now"
done
- git::commit gemtext "$GIT_COMMIT_MESSAGE"
- git::commit meta "$GIT_COMMIT_MESSAGE"
}