---------------------------------------- | |
Easy dated files for sorting | |
November 27th, 2018 | |
---------------------------------------- | |
For those of you out there using gophernicus and forcing | |
yourselves to write your posts with cumbersome file-name prefixes | |
for proper sorting, let me help you out. | |
Gophernicus allows you to execute in-line scripts in your | |
gophermaps. That means you can do something like this: | |
=ls -1r | grep -v 'gophermap' | awk '{printf "0%s\t%s\n", $1, $1}' | |
It will grab all the files in your directory, flip the order, and | |
print them out into a pretty gophermap for you. Tada! Just drop | |
files in place and name them with the date, YYYY-MM-DD. You'll | |
sort just fine. |