summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgemtexter5
-rw-r--r--lib/atomfeed.source.sh4
2 files changed, 6 insertions, 3 deletions
diff --git a/gemtexter b/gemtexter
index 9959c1e..3d695dc 100755
--- a/gemtexter
+++ b/gemtexter
@@ -138,9 +138,8 @@ main () {
template::generate
;;
--git)
- git::add_all "$GIT_COMMIT_MESSAGE"
- wait
- git::sync_all
+ $0 --git-add
+ $0 --git-sync
;;
--git-add)
git::add_all "$GIT_COMMIT_MESSAGE"
diff --git a/lib/atomfeed.source.sh b/lib/atomfeed.source.sh
index 10ec380..d614fe0 100644
--- a/lib/atomfeed.source.sh
+++ b/lib/atomfeed.source.sh
@@ -108,6 +108,10 @@ atomfeed::_entry () {
# Extract first paragraph from Gemtext as the summary.
local summary=$($SED -n '/^[A-Z]/ { p; q; }' "$gemfeed_dir/$gmi_file" | tr '"' "'")
+ if [ -z "$summary" ]; then
+ # No summary found, maybe there is only a quote...
+ summary=$($SED -n '/^>/ { s/> *//; p; q; }' "$gemfeed_dir/$gmi_file" | tr '"' "'")
+ fi
assert::not_empty summary "$summary"
# Extract the date from the file name.