diff options
-rwxr-xr-x | bin/ak-mine | 3 | ||||
-rwxr-xr-x | bin/ak-profile | 3 | ||||
-rwxr-xr-x | bin/ak-transactions | 3 | ||||
-rwxr-xr-x | lib/_ak_network_yggdrasil | 3 | ||||
-rwxr-xr-x | lib/_ak_utils | 12 | ||||
-rwxr-xr-x | lib/_ak_zblock | 15 | ||||
-rwxr-xr-x | lib/_ak_zchain | 5 | ||||
-rwxr-xr-x | modules/articles/main.sh | 3 | ||||
-rwxr-xr-x | modules/categories/main.sh | 3 | ||||
-rwxr-xr-x | modules/comments/main.sh | 3 | ||||
-rwxr-xr-x | modules/files/main.sh | 3 | ||||
-rwxr-xr-x | modules/folders/main.sh | 3 | ||||
-rwxr-xr-x | modules/mixtapes/lib.sh | 16 | ||||
-rwxr-xr-x | modules/news/lib.sh | 3 | ||||
-rwxr-xr-x | modules/reference/main.sh | 7 | ||||
-rwxr-xr-x | modules/repositories/main.sh | 1 | ||||
-rwxr-xr-x | modules/smfiles/lib.sh | 3 | ||||
-rwxr-xr-x | modules/todos/main.sh | 3 |
18 files changed, 60 insertions, 32 deletions
diff --git a/bin/ak-mine b/bin/ak-mine index 46e106d..00c7458 100755 --- a/bin/ak-mine +++ b/bin/ak-mine @@ -31,6 +31,7 @@ descriptionString="Sblock mining" source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_utils gather_zblocks(){ if [ "$(cat $AK_ZBLOCKSFILE | jq -r '.[].zblock' | wc -l)" -ne 0 ] @@ -56,7 +57,7 @@ proofofwork(){ i=1 l=1; while [ $l = 1 ] do - TIMESTAMP="$(date -u +%s)" + TIMESTAMP="$(_ak_datetime_unix)" SHA="$(echo -n $TEST'"nonce":"'$i'","previous":"'$PRE'","timestamp":"'$TIMESTAMP'","miner":"'$MINER'","reward":"40"}' | sha512sum | awk '{ print $1 }')" # Static difficulty for securing the sblock echo $SHA | grep -e '^000' diff --git a/bin/ak-profile b/bin/ak-profile index 97dcce3..a6ce3c8 100755 --- a/bin/ak-profile +++ b/bin/ak-profile @@ -45,6 +45,7 @@ ZPROFILEDIR="$AK_WORKDIR/profile" source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_utils source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_zblock @@ -202,7 +203,7 @@ _ak_modules_profile_add(){ FILE_SIGNATURE=$(_ak_ipfs_add $FILE_SIGN_FILE) cat > data <<EOF { - "datetime":"$(date -u +%s)", + "datetime":"$(_ak_datetime_unix)", "ipfs":"$FILE_IPFS_HASH", "detach":"$FILE_SIGNATURE" } diff --git a/bin/ak-transactions b/bin/ak-transactions index 683bb5b..037dbcf 100755 --- a/bin/ak-transactions +++ b/bin/ak-transactions @@ -25,6 +25,7 @@ PROGRAM=$(basename $0) descriptionString="Transactions module" source $AK_LIBDIR/_ak_log +source $AK_LIBDIR/_ak_utils source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg @@ -64,7 +65,7 @@ EOF cat > data <<EOF { - "timestamp":"$(date -u +%s)", + "timestamp":"$(_ak_datetime_unix)", "input":"$FROM_ADDRESS", "output":"$TO_ADDRESS", "amount":"$AMOUNT", diff --git a/lib/_ak_network_yggdrasil b/lib/_ak_network_yggdrasil index a551cd6..27fc0c8 100755 --- a/lib/_ak_network_yggdrasil +++ b/lib/_ak_network_yggdrasil @@ -18,6 +18,7 @@ ### along with this program. If not, see <http://www.gnu.org/licenses/>. ### source $AK_LIBDIR/_ak_log +source $AK_LIBDIR/_ak_utils function _ak_network_yggdrasil_scan_full(){ # This scan is using HIA resources to scan the whole cjdns network for peers @@ -65,7 +66,7 @@ function _ak_network_yggdrasil_scan_full(){ count="$(( $count + 1 ))" _ak_log_debug "Scanning [${count}/${max}] $ip..." node_fs_path="$AK_ZPEERSDIR/ygg/$(echo -n $ip| sed 's/://g')" - scan_ts="$(date -u +%s)" + scan_ts="$(_ak_datetime_unix)" if [ ! -d ${node_fs_path} ] then mkdir -p ${node_fs_path} diff --git a/lib/_ak_utils b/lib/_ak_utils index d437cb9..d9204e9 100755 --- a/lib/_ak_utils +++ b/lib/_ak_utils @@ -21,6 +21,18 @@ function _ak_datetime_unix(){ date -u +%s | tr -d '\n' } +function _ak_datetime_unix_nanosecs(){ + date -u +%s.%N | tr -d '\n' +} + +function _ak_datetime_human(){ + date -u +%Y%m%d_%H%M%S +} + +function _ak_datetime_human_date_only(){ + date -u +%Y%m%d +} + function _ak_datetime_unix_to_human(){ if [ ! -z $1 ] && [ -n "$1" ] && [ "$(echo $1 | sed -e 's/[0-9]\{10\}//g')" == "" ] then diff --git a/lib/_ak_zblock b/lib/_ak_zblock index b4a546b..1313127 100755 --- a/lib/_ak_zblock +++ b/lib/_ak_zblock @@ -20,6 +20,7 @@ #set -x source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_utils source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_html source $AK_LIBDIR/_ak_ipfs @@ -452,7 +453,7 @@ function _ak_zblock_show(){ # } function _ak_zblock_gen_html(){ - time_started=$(date -u +%s.%N) + time_started=$(_ak_datetime_unix_nanosecs) ss=$(echo $time_started | cut -d '.' -f 1) nss=$(echo $time_started | cut -d '.' -f 2) # Check if there are enough arguments @@ -475,11 +476,11 @@ function _ak_zblock_gen_html(){ _ak_zblock_show "$1" | jq > $arg _ak_generate_html_header > zblock-$1.html _ak_generate_html_zblock $arg >> zblock-$1.html - time_ended=$(date -u +%s.%N) + time_ended=$(_ak_datetime_unix_nanosecs) se=$(echo $time_ended | cut -d '.' -f 1) nse=$(echo $time_ended | cut -d '.' -f 2) printf ' <hr>\n' >> zblock-$1.html - printf ' <footer>Generated by %s on %s in %s.' "$PROGRAM" "$(datehuman)" "$(( $se - $ss ))">> zblock-$1.html + printf ' <footer>Generated by %s on %s in %s.' "$PROGRAM" "$(_ak_datetime_human)" "$(( $se - $ss ))">> zblock-$1.html if [ $nse -lt $nss ] then printf '%s seconds</footer>\n' "$(( 1$nse - $nss ))" >> zblock-$1.html @@ -591,7 +592,7 @@ function _ak_zblock_repack(){ PREVIOUS="$zblock_to_repack_at" _ak_log_debug "Previous: $PREVIOUS" # We create a block of json like this: - printf '{"timestamp":"%s","action":"%s","data":"%s","detach":"%s","gpg":"%s","previous":"%s"}' $(date -u +%s) $ACTION $MESSAGE_HASH $MESSAGE_SIGNATURE $GPG_PUB_KEY $PREVIOUS > block + printf '{"timestamp":"%s","action":"%s","data":"%s","detach":"%s","gpg":"%s","previous":"%s"}' $(_ak_datetime_unix) $ACTION $MESSAGE_HASH $MESSAGE_SIGNATURE $GPG_PUB_KEY $PREVIOUS > block BLOCK="block" BLOCK_SIG=$BLOCK".asc" # We have a block now, so we sign it @@ -614,7 +615,7 @@ function _ak_zblock_repack(){ # Optional or extending with # python send_as_ak_tx $ZBLOCK # or for "offline" use - archivaltime="$(date -u +%s)" + archivaltime="$(_ak_datetime_unix)" echo "${archivaltime} $(cat $AK_ZLATEST)" >> $AK_ZLATEST_HISTORY echo $ZBLOCK > $AK_ZLATEST _ak_ipfs_name_publish zchain /ipfs/$ZBLOCK #> /dev/null 2>&1 @@ -694,7 +695,7 @@ function _ak_zblock_pack(){ # Acquire last block of information, to chain this one with previous posted PREVIOUS="$(cat $AK_ZLATEST)" # We create a block of json like this: - printf '{"timestamp":"%s","action":"%s","data":"%s","detach":"%s","gpg":"%s","previous":"%s"}' "$(date -u +%s)" "$ACTION" "$MESSAGE_HASH" "$MESSAGE_SIGNATURE" "$GPG_PUB_KEY" "$PREVIOUS" > block + printf '{"timestamp":"%s","action":"%s","data":"%s","detach":"%s","gpg":"%s","previous":"%s"}' "$(_ak_datetime_unix)" "$ACTION" "$MESSAGE_HASH" "$MESSAGE_SIGNATURE" "$GPG_PUB_KEY" "$PREVIOUS" > block BLOCK="block" BLOCK_SIG="${BLOCK}.asc" # We have a block now, so we sign it @@ -717,7 +718,7 @@ function _ak_zblock_pack(){ # Optional or extending with # python send_as_ak_tx $ZBLOCK # or for "offline" use - archivaltime="$(date -u +%s)" + archivaltime="$(_ak_datetime_unix)" echo "${archivaltime} $(cat $AK_ZLATEST)" >> $AK_ZLATEST_HISTORY echo $ZBLOCK > $AK_ZLATEST _ak_ipfs_name_publish zchain /ipfs/$ZBLOCK > /dev/null 2>&1 diff --git a/lib/_ak_zchain b/lib/_ak_zchain index d015afd..547e773 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -17,6 +17,7 @@ ### You should have received a copy of the GNU General Public License ### along with this program. If not, see <http://www.gnu.org/licenses/>. ### +source $AK_LIBDIR/_ak_utils source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_zblock @@ -48,7 +49,7 @@ function _ak_zchain_reset(){ if [ $? -eq 0 ] then _ak_log_info "Archive the previous AK_ZLATEST" - _ak_ipfs_files_cp /zlatest /zarchive/$(date -u +%s)-$(_ak_ipfs_files_stat /zlatest | head -n 1) + _ak_ipfs_files_cp /zlatest /zarchive/$(_ak_datetime_unix)-$(_ak_ipfs_files_stat /zlatest | head -n 1) if [ $? -ne 0 ] then _ak_log_error "Failed to copy /zlatest to /zarchive" @@ -99,7 +100,7 @@ function _ak_zchain_rebase(){ _ak_ipfs_files_mkdir /zarchive if [ $? != 0 ]; then echo "Folder already there"; fi echo "Archive the previous ZLATEST" - _ak_ipfs_files_cp /zlatest /zarchive/$(date -u +%s)-$(_ak_ipfs_files_stat /zlatest | head -n 1) + _ak_ipfs_files_cp /zlatest /zarchive/$(_ak_datetime_unix)-$(_ak_ipfs_files_stat /zlatest | head -n 1) if [ $? != 0 ]; then exit 1; fi echo "Removing previous /zlatest entry" _ak_ipfs_files_rm /zlatest diff --git a/modules/articles/main.sh b/modules/articles/main.sh index c142725..9fa0304 100755 --- a/modules/articles/main.sh +++ b/modules/articles/main.sh @@ -31,6 +31,7 @@ descriptionString="Articles module for Arching Kaos" source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script +source $AK_LIBDIR/_ak_utils source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_zblock @@ -48,7 +49,7 @@ fi _ak_modules_articles_create(){ TEMP="$(_ak_make_temp_directory)" cd $TEMP - export ARTICLES_FILE="$(date +%Y%m%d_%H%M%S)" + export ARTICLES_FILE="$(_ak_datetime_human)" if [ -z $EDITOR ] then _ak_log_error "No $EDITOR found. Exiting..." diff --git a/modules/categories/main.sh b/modules/categories/main.sh index 68d3c12..ebb9e9e 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 @@ -46,7 +47,7 @@ fi _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)" diff --git a/modules/comments/main.sh b/modules/comments/main.sh index 1e88a52..c469ba6 100755 --- a/modules/comments/main.sh +++ b/modules/comments/main.sh @@ -33,6 +33,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 ZCOMMENTSDIR="$AK_WORKDIR/comments" TEMP="/tmp/aktmp" @@ -55,7 +56,7 @@ _ak_modules_comments_create(){ fi TEMP="$(_ak_make_temp_directory)" cd $TEMP - export COMMENTS_FILE="$(date -u +%s)" + export COMMENTS_FILE="$(_ak_datetime_unix)" vi $COMMENTS_FILE echo "Renaming..." TO_FILE=$COMMENTS_FILE diff --git a/modules/files/main.sh b/modules/files/main.sh index 72fb752..14cda6a 100755 --- a/modules/files/main.sh +++ b/modules/files/main.sh @@ -32,6 +32,7 @@ source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_utils if [ ! -d $ZFILESDIR ]; then mkdir $ZFILESDIR @@ -103,7 +104,7 @@ main(){ cat > $TEMPASSIN/data <<EOF { - "timestamp":"$(date -u +%s)", + "timestamp":"$(_ak_datetime_unix)", "filename":"$FILENAME", "ipfs":"$FILE_IPFS_HASH", "detach":"$SIGNATURE" diff --git a/modules/folders/main.sh b/modules/folders/main.sh index 4f4822a..345a0b1 100755 --- a/modules/folders/main.sh +++ b/modules/folders/main.sh @@ -33,6 +33,7 @@ source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_utils if [ ! -d $ZFOLDERSDIR ]; then mkdir $ZFOLDERSDIR @@ -75,7 +76,7 @@ _ak_modules_folders_main(){ fi _ak_log_warning "Folders are not signing..." - printf '{"timestamp":"%s","foldername":"%s","ipfs":"%s"}' $(date -u +%s) $FOLDERNAME $FOLDER_IPFS_HASH + printf '{"timestamp":"%s","foldername":"%s","ipfs":"%s"}' $(_ak_datetime_unix) $FOLDERNAME $FOLDER_IPFS_HASH echo "Printing data..." cat data diff --git a/modules/mixtapes/lib.sh b/modules/mixtapes/lib.sh index a0912dd..5e1f3ac 100755 --- a/modules/mixtapes/lib.sh +++ b/modules/mixtapes/lib.sh @@ -25,7 +25,7 @@ source $AK_LIBDIR/_ak_zblock # Should return current playlist, current mixtape and seek time on the mixtape _ak_modules_mixtapes_find_now(){ - current_timestamp="$(date -u +%s)" + current_timestamp="$(_ak_datetime_unix)" mixtapes_ord=$AK_WORKDIR/mixtapes_ord if [ ! -d $mixtapes_ord ] then @@ -61,7 +61,7 @@ _ak_modules_mixtapes_find_now(){ cat $AK_WORKDIR/mixtapes_index | while read TS ZB BL DB IF DUR do echo "$IF" > $mixtapes_playlists/1 - seek=$(( ($(date -u +%s) - $TS) % $DUR )) + seek=$(( ($(_ak_datetime_unix) - $TS) % $DUR )) index=$counter echo "$counter $index $seek" exit 0 @@ -70,8 +70,8 @@ _ak_modules_mixtapes_find_now(){ # watch -n 1 ' # TS=$(cat mixtapes_index | cut -d\ -f 1,6 | head -n 1 | cut -d\ -f 1) # DUR=$(cat mixtapes_index | cut -d\ -f 1,6 | head -n 1 | cut -d\ -f 2) - # echo $(( ($(date -u +%s) - $TS) / $DUR )) # Times played - # echo $(( ($(date -u +%s) - $TS) % $DUR )) # Seek time + # echo $(( ($(_ak_datetime_unix) - $TS) / $DUR )) # Times played + # echo $(( ($(_ak_datetime_unix) - $TS) % $DUR )) # Seek time # ' mixtapes_counter=1 @@ -79,7 +79,7 @@ _ak_modules_mixtapes_find_now(){ while [ $mixtapes_counter -le $total_number_of_mixtapes ] do _ak_log_debug "Counter: $mixtapes_counter" - # current_timestamp="$(date -u +%s)" + # current_timestamp="$(_ak_datetime_unix)" current_timestamp="$(cat $mixtapes_ord/$mixtapes_counter | cut -d ' ' -f 1)" current_duration="$(cat $mixtapes_ord/$mixtapes_counter | cut -d ' ' -f 6)" # diff_ts="$(( $current_timestamp - $timestamp ))" @@ -90,7 +90,7 @@ _ak_modules_mixtapes_find_now(){ then cat $mixtapes_ord/$mixtapes_counter > $mixtapes_playlists/$playlists_counter # Return playlist number, mixtape number and seek time - time_difference=$(( $(date -u +%s) - $current_timestamp)) + time_difference=$(( $(_ak_datetime_unix) - $current_timestamp)) seek_time=$(( $time_difference % $current_duration )) echo $playlists_counter $mixtapes_counter $seek_time # For this particular instance we would loop for ever in the @@ -151,7 +151,7 @@ _ak_modules_mixtapes_find_now(){ elif [ $mixtapes_counter -eq $total_number_of_mixtapes ] then - echo $(( ($(date -u +%s) - $current_timestamp) % $current_duration )) # Seek time + echo $(( ($(_ak_datetime_unix) - $current_timestamp) % $current_duration )) # Seek time fi mixtapes_counter=$(($mixtapes_counter + 1)) done @@ -197,7 +197,7 @@ _ak_modules_mixtapes_main(){ cat > data <<EOF { - "timestamp":"$(date -u +%s)", + "timestamp":"$(_ak_datetime_unix)", "artist":"$MIXTAPE_ARTIST", "title":"$MIXTAPE_TITLE", "ipfs":"$MIXTAPE_IPFS_HASH", diff --git a/modules/news/lib.sh b/modules/news/lib.sh index 44387fc..ef35492 100755 --- a/modules/news/lib.sh +++ b/modules/news/lib.sh @@ -22,6 +22,7 @@ source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_zblock source $AK_LIBDIR/_ak_zchain +source $AK_LIBDIR/_ak_utils ZNEWSDIR="$AK_WORKDIR/news" @@ -45,7 +46,7 @@ _ak_modules_news_create(){ cd $TEMP cd curpath="$(pwd)" - export NEWS_FILE="$(date +%Y%m%d_%H%M%S)" + export NEWS_FILE="$(_ak_datetime_human)" vi $NEWS_FILE echo "Renaming..." TITLE="$(head -n 1 $NEWS_FILE)" diff --git a/modules/reference/main.sh b/modules/reference/main.sh index 88c6e37..e730830 100755 --- a/modules/reference/main.sh +++ b/modules/reference/main.sh @@ -38,6 +38,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 $ZREFERENCESDIR ]; then mkdir $ZREFERENCESDIR @@ -50,10 +51,10 @@ fi _ak_modules_reference_create(){ TEMP="$(_ak_make_temp_directory)" cd $TEMP - export REFERENCEFILE="$(date -u +%s)" + export REFERENCEFILE="$(_ak_datetime_unix)" if [ ! -z $1 ] && [ ! -z $2 ] then - TO_FILE="$(date -u +%s)-$1-$2" + TO_FILE="$(_ak_datetime_unix)-$1-$2" cat > $REFERENCEFILE << EOF $1 $2 @@ -125,7 +126,7 @@ _ak_modules_reference_add(){ FILE_SIGNATURE=$(_ak_ipfs_add $FILE_SIGN_FILE) cat > data <<EOF { - "datetime":"$(date -u +%s)", + "datetime":"$(_ak_datetime_unix)", "reference":"$REFERENCE", "refer_to":"$REFER_TO", "ipfs":"$FILE_IPFS_HASH", diff --git a/modules/repositories/main.sh b/modules/repositories/main.sh index 9c65bf9..8794f59 100755 --- a/modules/repositories/main.sh +++ b/modules/repositories/main.sh @@ -18,6 +18,7 @@ ### along with this program. If not, see <http://www.gnu.org/licenses/>. ### source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_utils PROGRAM="ak-module-$(realpath $0 | rev |cut -d '/' -f 2 | rev)" REPODIR="$HOME/projects" BAREDIR="$HOME/bare" diff --git a/modules/smfiles/lib.sh b/modules/smfiles/lib.sh index 6e90964..f3418ff 100755 --- a/modules/smfiles/lib.sh +++ b/modules/smfiles/lib.sh @@ -23,6 +23,7 @@ source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_zblock source $AK_LIBDIR/_ak_smfiles +source $AK_LIBDIR/_ak_utils _ak_sm_files_add(){ FILENAME="$1" @@ -103,7 +104,7 @@ _ak_sm_files_main(){ cat > data <<EOF { - "timestamp":"$(date -u +%s)", + "timestamp":"$(_ak_datetime_unix)", "filename":"$FILENAME", "shamap":"$FILEMAP_SHA512_HASH", "shamapsig":"$SHAMAPSIGMAP", diff --git a/modules/todos/main.sh b/modules/todos/main.sh index 3970c3c..7825cf7 100755 --- a/modules/todos/main.sh +++ b/modules/todos/main.sh @@ -37,6 +37,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 ZTODOSDIR="$AK_WORKDIR/todos" TEMP="/tmp/aktmp" @@ -51,7 +52,7 @@ fi _ak_modules_todos_create(){ TEMP="$(_ak_make_temp_directory)" cd $TEMP - export TODOS_FILE="$(date -u +%s)" + export TODOS_FILE="$(_ak_datetime_unix)" vi $TODOS_FILE _ak_log_info "Renaming..." TITLE="$(head -n 1 $TODOS_FILE)" |