diff options
author | Case Duckworth | 2021-02-06 14:04:44 -0600 |
---|---|---|
committer | Case Duckworth | 2021-02-06 14:04:44 -0600 |
commit | 49f6fc03a42e7b875f691f7476e956923f731a62 (patch) | |
tree | 3db6cdb8536806664eed8ac93eb60b87bbf81a16 | |
parent | Add README (diff) | |
download | shatom-49f6fc03a42e7b875f691f7476e956923f731a62.tar.gz shatom-49f6fc03a42e7b875f691f7476e956923f731a62.zip |
Rename to shatom
-rw-r--r-- | README.md | 10 | ||||
-rwxr-xr-x | shatom (renamed from gemshimfeed) | 30 |
2 files changed, 20 insertions, 20 deletions
diff --git a/README.md b/README.md index c2c1bc6..92ab758 100644 --- a/README.md +++ b/README.md | |||
@@ -1,9 +1,9 @@ | |||
1 | # gemshimfeed | 1 | # shatom |
2 | ## an Atom feed generator in (mostly) POSIX shell | 2 | ## an Atom feed generator in (mostly) POSIX shell |
3 | 3 | ||
4 | Because of [this post in the Gemini mailing list](https://lists.orbitalfox.eu/archives/gemini/2020/003407.html), | 4 | Because of [this post in the Gemini mailing list](https://lists.orbitalfox.eu/archives/gemini/2020/003407.html), |
5 | which bemoans the inability to generate Atom feeds using bare-bones computers, | 5 | which bemoans the inability to generate Atom feeds using bare-bones computers, |
6 | I present `gemshimfeed`, a shell program that purports to do just that. | 6 | I present `shatom`, a shell program that purports to do just that. |
7 | 7 | ||
8 | It has minimal dependencies (see DEPENDENCIES, below), | 8 | It has minimal dependencies (see DEPENDENCIES, below), |
9 | and is completely modifiable by the user with the config file | 9 | and is completely modifiable by the user with the config file |
@@ -25,12 +25,12 @@ you're writing another script. | |||
25 | 25 | ||
26 | ## CONFIG | 26 | ## CONFIG |
27 | 27 | ||
28 | All of the functions and variables defined in `gemshimfeed` | 28 | All of the functions and variables defined in `shatom` |
29 | can be overwritten by a config file, by default | 29 | can be overwritten by a config file, by default |
30 | `gemshimfeed.conf.sh` in the current directory. | 30 | `shatom.conf.sh` in the current directory. |
31 | As may be obvious from the file's extension, it's a shell script, | 31 | As may be obvious from the file's extension, it's a shell script, |
32 | so you can redefine (and in fact, *should* redefine) | 32 | so you can redefine (and in fact, *should* redefine) |
33 | all the variables and functions in `gemshimfeed` to suit your needs. | 33 | all the variables and functions in `shatom` to suit your needs. |
34 | 34 | ||
35 | Here's a convenient list: | 35 | Here's a convenient list: |
36 | 36 | ||
diff --git a/gemshimfeed b/shatom index 3025182..48b99ff 100755 --- a/gemshimfeed +++ b/shatom | |||
@@ -8,12 +8,12 @@ usage() { | |||
8 | cat <<END | 8 | cat <<END |
9 | $0: generate an Atom feed from directories of files | 9 | $0: generate an Atom feed from directories of files |
10 | INVOCATION: | 10 | INVOCATION: |
11 | $0 [-h] [-c CONFIG] DIRECTORY... | 11 | $0 [-h] [-c CONFIG] DIRECTORY... |
12 | 12 | ||
13 | OPTIONS: | 13 | OPTIONS: |
14 | -h show this help | 14 | -h show this help |
15 | -c CONFIG change the CONFIG file. | 15 | -c CONFIG change the CONFIG file. |
16 | Default: $PWD/gemshimfeed.conf.sh | 16 | Default: $PWD/$0.conf.sh |
17 | END | 17 | END |
18 | } | 18 | } |
19 | 19 | ||
@@ -57,12 +57,12 @@ entry_url() { | |||
57 | } | 57 | } |
58 | 58 | ||
59 | entry_title() { | 59 | entry_title() { |
60 | awk '/^#+[ ]\S/{ | 60 | awk '/^#+[ ]\S/{ |
61 | for(i=2;i<=NF;i++) { | 61 | for(i=2;i<=NF;i++) { |
62 | printf $i; | 62 | printf $i; |
63 | if (i!=NF) printf " "; | 63 | if (i!=NF) printf " "; |
64 | } | 64 | } |
65 | printf "\n";exit}' "$1" | 65 | printf "\n";exit}' "$1" |
66 | } | 66 | } |
67 | 67 | ||
68 | entry_summary() { | 68 | entry_summary() { |
@@ -83,9 +83,9 @@ entry_updated() { | |||
83 | # possibly using ls(1). | 83 | # possibly using ls(1). |
84 | stat -c '%y' "$1" | | 84 | stat -c '%y' "$1" | |
85 | awk '{ | 85 | awk '{ |
86 | sub(/\..*/,"",$2); | 86 | sub(/\..*/,"",$2); |
87 | sub(/[0-9][0-9]/,"&:",$3); | 87 | sub(/[0-9][0-9]/,"&:",$3); |
88 | print $1"T"$2$3;}' | 88 | print $1"T"$2$3;}' |
89 | } | 89 | } |
90 | 90 | ||
91 | # ATOM FUNCTIONS | 91 | # ATOM FUNCTIONS |
@@ -99,7 +99,7 @@ atom_header() { | |||
99 | <link href="$FEED_URL" rel="self" /> | 99 | <link href="$FEED_URL" rel="self" /> |
100 | <link href="$SITE_URL" /> | 100 | <link href="$SITE_URL" /> |
101 | <id>$FEED_ID</id> | 101 | <id>$FEED_ID</id> |
102 | <generator uri="https://git.sr.ht/~acdw/gemshimfeed" version="infinite">GemShimFeed</generator> | 102 | <generator uri="https://git.sr.ht/~acdw/shatom" version="infinite">shatom</generator> |
103 | <rights>$FEED_COPYRIGHT</rights> | 103 | <rights>$FEED_COPYRIGHT</rights> |
104 | <updated>$FEED_UPDATED</updated> | 104 | <updated>$FEED_UPDATED</updated> |
105 | END | 105 | END |
@@ -132,7 +132,7 @@ END | |||
132 | } | 132 | } |
133 | 133 | ||
134 | main() { | 134 | main() { |
135 | CONFIGFILE="$PWD/gemshimfeed.conf.sh" | 135 | CONFIGFILE="$PWD/$0.conf.sh" |
136 | case "$1" in | 136 | case "$1" in |
137 | -h) | 137 | -h) |
138 | usage | 138 | usage |