aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2024-10-31 21:31:57 +0100
committerJulian Hurst <ark@mansus.space>2024-10-31 21:37:28 +0100
commitdcaa3450430fec7ce23c4ed4f0b9fd480324d1ed (patch)
treeed3c670d8b9e8334496dfd03a5824c991933df04
parent141645bb9fd2b757e6d6ed4ad78ff14a8b737cc0 (diff)
downloaddistamp-dcaa3450430fec7ce23c4ed4f0b9fd480324d1ed.tar.gz
Update README.md and punctuation
-rw-r--r--README.md18
-rw-r--r--distamp.ha2
2 files changed, 18 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4b60a2d..e0905e7 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,26 @@ Creates discord format relative timestamps, i.e.: `<t:1725834045:R>`
## Usage
- ./distamp m[:s]
+ ./distamp: discord relative timestamp generator
+
+ Usage: ./distamp [-h] [-a <date>] [-d <days>] [-w <weeks>] m[:s]
+
+ -h: print this help text
+ -a <date>: Absolute date (this option is exclusive, any other options will be ignored)
+ -d <days>: Number of days
+ -w <weeks>: Number of weeks
Where m is number of minutes from now and s is number of seconds from now
+## Config
+
+A DOS-style INI format configuration can be created at XDG\_CONFIG\_HOME/distamp/config.ini. Quoted values are not supported.
+
+The current supported keys are:
+
+ tz: the value must be a valid timezone (i.e. tz=Europe/Paris). This is used to calculate the proper locality of the date when using the -a flag.
+
+
## Build
To build, install hare and run:
diff --git a/distamp.ha b/distamp.ha
index 0b908ed..fd865c4 100644
--- a/distamp.ha
+++ b/distamp.ha
@@ -12,7 +12,7 @@ type parseerror = !strconv::error;
export fn main() void = {
const cmd = getopt::parse(os::args,
"discord relative timestamp generator",
- ('a', "date", "Absolute date (this option is exclusive any other options will be ignored)"),
+ ('a', "date", "Absolute date (this option is exclusive, any other options will be ignored)"),
('d', "days", "Number of days"),
('w', "weeks", "Number of weeks"),
"m[:s]",