X-Git-Url: https://plomlompom.com/repos/?p=redo-blog;a=blobdiff_plain;f=processor%2Findex.html.do;h=031029404ade82260ccb369b63f345d9961cb82f;hp=105bc74309cc2e177fafd508fb52da4829c70e71;hb=ff5b37d8bc4cfba8f1db69a279da887accaa0296;hpb=6b5631096b03f1c985bc40c4d2e244315280c686 diff --git a/processor/index.html.do b/processor/index.html.do index 105bc74..0310294 100644 --- a/processor/index.html.do +++ b/processor/index.html.do @@ -17,21 +17,22 @@ tmp_snippets_dir=.tmp_index_snippets mkdir -p "$tmp_snippets_dir" for file in ./*.rst ./*.md; do if [ -e "$file" ]; then - uuid_file="${metadata_dir}/${file%.*}.uuid" - redo-ifchange "$uuid_file" - published=`stat -c%y "${uuid_file}"` - published_unix=$(date -u "+%s%N" -d "${published}") + meta_file="${metadata_dir}/${file%.*}.automatic_metadata" + redo-ifchange "$meta_file" + published=$(get_creation_date_from_meta_file_nanoseconds "$meta_file") snippet_file="${metadata_dir}/${file%.*}.index_snippet" redo-ifchange "$snippet_file" - ln -s "$srcdir/$snippet_file" "./${tmp_snippets_dir}/${published_unix}" + ln -s "$srcdir/$snippet_file" "./${tmp_snippets_dir}/${published}" fi done # Write link list. for file in ./${tmp_snippets_dir}/*; do - touch ./${tmp_snippets_dir}/list - cat "$file" ./${tmp_snippets_dir}/list > ./${tmp_snippets_dir}/tmp - mv ./${tmp_snippets_dir}/tmp ./${tmp_snippets_dir}/list + if [ -e "$file" ]; then + touch ./${tmp_snippets_dir}/list + cat "$file" ./${tmp_snippets_dir}/list > ./${tmp_snippets_dir}/tmp + mv ./${tmp_snippets_dir}/tmp ./${tmp_snippets_dir}/list + fi done if [ -e "./${tmp_snippets_dir}/list" ]; then list=$(cat ./${tmp_snippets_dir}/list | prep_sed)