diff options
Diffstat (limited to 'bin/ak-categories')
-rwxr-xr-x | bin/ak-categories | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/bin/ak-categories b/bin/ak-categories index 6f2da6c..c0e1e77 100755 --- a/bin/ak-categories +++ b/bin/ak-categories @@ -1,12 +1,25 @@ #!/bin/bash +## +## -h, --help Prints this help message" +## +## index Prints an indexed table of your news files" +## +## import <file> #TODO" +## +## add <file> Creates a data file from the news file you point to" +## +## create Vim is going to pop up, you will write and save your" +## newsletter and it's going to be saved" +## AK_CATEGORIES="$AK_WORKDIR/categories" PROGRAM="$(basename $0)" descriptionString="A module for adding and refering zblocks to categories" -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 if [ ! -d $AK_CATEGORIES ]; then mkdir $AK_CATEGORIES @@ -41,9 +54,6 @@ _ak_modules_categories_index(){ let i+=1 done } -_ak_modules_categories_title(){ - description -} _ak_modules_categories_import(){ echo "#TODO" @@ -92,7 +102,7 @@ EOF logit "ERROR" "File $FILE doesn't exist"; exit 2 fi - ak-zblock-pack "news/add" $(pwd)/data + _ak_zblock_pack "news/add" $(pwd)/data if [ $? == 0 ] then logit "INFO" "News added successfully" @@ -102,25 +112,15 @@ EOF fi } -_ak_modules_categories_usage(){ - _ak_modules_categories_title - echo " -h, --help Prints this help message" - echo " index Prints an indexed table of your news files" - echo " import <file> #TODO" - echo " add <file> Creates a data file from the news file you point to" - echo " create Vim is going to pop up, you will write and save your" - echo " newsletter and it's going to be saved" - exit 0 -} if [ ! -z $1 ]; then case $1 in - -h | --help) _ak_modules_categories_usage; exit;; + -h | --help) _ak_usage; exit;; index) _ak_modules_categories_index; exit;; import) _ak_modules_categories_import $2; exit;; add) _ak_modules_categories_add $2; exit;; create) _ak_modules_categories_create; exit;; - * ) _ak_modules_categories_usage;; + * ) _ak_usage;; esac -else _ak_modules_categories_usage +else _ak_usage fi |