diff options
Diffstat (limited to 'modules/categories/main.sh')
-rwxr-xr-x | modules/categories/main.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/categories/main.sh b/modules/categories/main.sh index 68d3c12..30e84aa 100755 --- a/modules/categories/main.sh +++ b/modules/categories/main.sh @@ -34,6 +34,7 @@ source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_utils if [ ! -d $AK_CATEGORIES ]; then mkdir $AK_CATEGORIES @@ -43,10 +44,10 @@ else _ak_log_info "AK_CATEGORIES found" fi -_ak_modules_categories_create(){ +function _ak_modules_categories_create(){ TEMP="$(_ak_make_temp_directory)" cd $TEMP - export NEWS_FILE="$(date +%Y%m%d_%H%M%S)" + export NEWS_FILE="$(_ak_datetime_human)" vi $NEWS_FILE _ak_log_info "Renaming..." TITLE="$(head -n 1 $NEWS_FILE)" @@ -57,7 +58,7 @@ _ak_modules_categories_create(){ _ak_modules_categories_add $AK_CATEGORIES/$TO_FILE cd $AK_CATEGORIES } -_ak_modules_categories_index(){ +function _ak_modules_categories_index(){ FILES="$(ls -1 $AK_CATEGORIES)" i=0 for FILE in $FILES @@ -69,7 +70,7 @@ _ak_modules_categories_index(){ done } -_ak_modules_categories_import(){ +function _ak_modules_categories_import(){ echo "#TODO" if [ ! -z $1 ] then @@ -91,7 +92,7 @@ _ak_modules_categories_import(){ fi exit 224 } -_ak_modules_categories_add(){ +function _ak_modules_categories_add(){ TEMP="$(_ak_make_temp_directory)" cd $TEMP if [ -f $1 ]; then |