From b733f1860f00c61eb33ff33c4368201a4c8161d9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 2 Jul 2022 19:33:11 +0300 Subject: add new git options --- IDEA.md | 4 ---- README.md | 2 +- gemtexter | 17 ++++++++++++----- lib/git.source.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 lib/git.source.sh diff --git a/IDEA.md b/IDEA.md index 7b4c590..ba70c6a 100644 --- a/IDEA.md +++ b/IDEA.md @@ -1,9 +1,5 @@ # IDEAs -## Maybe don't store results in Git - -Just generate the output formats (such as html, md...) and use rsync to push the content to the server. No need to use Git here. Only keep the original .gmi files in git. - ## Parallel job processing queue Currently, in order to speed up, Gemtexter forks on certain functions and loops and joins (via `wait`) on the sub-processes. This however can be a problem once a user max process limit is reached. diff --git a/README.md b/README.md index 87c8baf..d0f73ac 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ You will find the `./extras/html/header.html.part` and `./extras/html/footer.htm ## Store all formats in Git -I personally have for each directory in `../foo.zone-content/` a separate Git repository configured. So whenever something changes I commit and push the content to git. +I personally have for each directory in `../foo.zone-content/` a separate Git repository configured. So whenever something changes I commit and push the content to git. Gemtexter automatically detects whether a content directory is in git or not (e.g. directories `../foo.zone-content/*/.git` exist). In this case you can use the `./gemtexter --git-add` command to add all files to git and `./gemtexter --git-sync` to sync all content files with the remote repository (which is a Git pull followed by a push). A `./gemtexter --git` will do both, adding and syncing. For a custom commit message can set the `GIT_COMMIT_MESSAGE` environment variable, e.g.: `GIT_COMMIT_MESSAGE='New blog post' ./gemtexter --git`. ## Publishing a blog post diff --git a/gemtexter b/gemtexter index 1bd5690..b3d4e46 100755 --- a/gemtexter +++ b/gemtexter @@ -29,11 +29,12 @@ fi source ./lib/assert.source.sh source ./lib/atomfeed.source.sh source ./lib/gemfeed.source.sh -source ./lib/notes.source.sh source ./lib/generate.source.sh +source ./lib/git.source.sh source ./lib/html.source.sh source ./lib/log.source.sh source ./lib/md.source.sh +source ./lib/notes.source.sh help () { cat <