aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-articles
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak-articles')
-rwxr-xr-xbin/ak-articles33
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