diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-03-31 12:00:59 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-03-31 12:00:59 +0300 |
commit | e4f18be94261b39544ef3bc50321f6aedeb45bd6 (patch) | |
tree | 2c79daf0bdc91beb91846f00bb3d3f51236967cf /bin/ak-articles | |
parent | 23a61661f03c03a357ad8aa47ba3595fabe24de1 (diff) | |
download | arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.tar.gz arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.tar.bz2 arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.zip |
huge refactor, might breaking things
Diffstat (limited to 'bin/ak-articles')
-rwxr-xr-x | bin/ak-articles | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/bin/ak-articles b/bin/ak-articles index ba45309..97a8e8d 100755 --- a/bin/ak-articles +++ b/bin/ak-articles @@ -1,12 +1,21 @@ #!/bin/bash - +## +## -h, --help Prints this help message +## index Prints an indexed table of your articles files +## import <file> TODO +## add <file> Creates a data file from the articles file you point to +## create Vim is going to pop up, you will write and save your +## articlesletter and it's going to be saved +## +fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="Articles module for Arching Kaos" -source $AK_LIBDIR/_ak_logit -source $AK_LIBDIR/_ak_script_description +source $AK_LIBDIR/_ak_log +source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg +source $AK_LIBDIR/_ak_zblock ZARTICLESDIR="$AK_WORKDIR/articles" TEMP="/tmp/aktmp" @@ -108,7 +117,7 @@ EOF echo "File $FILE doesn't exist"; exit 2 fi - ak-zblock-pack "articles/add" $(pwd)/data + _ak_zblock_pack "articles/add" $(pwd)/data if [ $? == 0 ] then echo "Articles added successfully" @@ -117,24 +126,14 @@ EOF exit 1 fi } -_ak_modules_articles_usage(){ - echo " -h, --help Prints this help message" - echo " index Prints an indexed table of your articles files" - echo " import <file> #TODO" - echo " add <file> Creates a data file from the articles file you point to" - echo " create Vim is going to pop up, you will write and save your" - echo " articlesletter and it's going to be saved" - exit 0 -} -_ak_modules_articles_title if [ ! -z $1 ]; then case $1 in - -h | --help) _ak_modules_articles_usage; exit;; + -h | --help) _ak_usage; exit;; index) _ak_modules_articles_index; exit;; import) _ak_modules_articles_import $2; exit;; add) _ak_modules_articles_add $2; exit;; create) _ak_modules_articles_create; exit;; - * ) _ak_modules_articles_usage;; + * ) _ak_usage;; esac -else _ak_modules_articles_usage +else _ak_usage fi |