free software resistance

 the cost of computing freedom is eternal vigilance

### gemlist04.fig *originally posted:* dec 2024 this program is a list generator for gemini. its tailored for this website in that it searches first for "original date" then "originally posted" and if it finds neither it just uses stat -FL. version 0.3 has an optional feature to place spaces before new years and months, though this can result in a lot of blank lines for years and months that dont list files. that can be fixed by piping it through the following short program: ``` counter 0 p arrstdin forin each p isb each rtrim len not iftrue isb ifless counter 5 now "" print now counter plus 1 swap now counter next else now each print counter 0 next next ``` however, version 0.4 accomplishes similar by keeping track of consecutive prints- so the additional program is only needed for version 0.3. thats a perk of version 0.4, but thats not why version 0.4 was written. version 0.4 was written to add another feature, which is commented out, that prepends a "--" to the filename of any file that matches the previous listing with or without a .htm or .html extension. this website was created by making .html versions of everything- and the gemlist program is one of several optional tools for finding old or new files that havent been added to the website. it lists both files that are and are not added, but the "--" makes it easier to spot files that already have an html version made, so they can be (manually) excluded from the list. this new feature of version 0.4 makes the task of weeding through a years listing much, much easier. ``` proginf "gemlist 0.4" # original date: dec 2024 function nohtm p r4 p lcase right 4 r5 p lcase right 5 ifequal r4 ".htm" plen p len minus 4 now p left plen return now next ifequal r5 ".html" plen p len minus 5 now p left plen return now next now p return now next function odt each openf arropen each forin each openf ck instr each "original date:" iftrue ck ordt split each "original date:" mid 2 1 split ordt "*" join ordt "" ltrim rtrim plus " " now "original date: " plus ordt return now next next now "" return now next function op each openf arropen each forin each openf ck instr each "originally posted:" iftrue ck orp split each "originally posted:" mid 2 1 split orp "*" join orp "" ltrim rtrim plus " " now "originally posted: " plus orp return now next next now "" return now next function ost each q 34 chr qsp q plus " " plus q # mmm yyyy mmm d s st "stat -FL '" plus each plus "' | awk '{print $6 " plus qsp plus " $9 " plus qsp plus " $7 " plus qsp plus " $5}'" arrshell mid 1 1 lcase now return st next listbuf arr mid 1 0 counter 0 ycounter 0 mcounter 0 bl "" p "find . -type f" arrshell forin each p buf "" iftrue each orst = ost each ordt = odt each iftrue ordt try ordtrim split ordt " " mid 3 2 join ordtrim " " except ordtrim "" next buf ordtrim plus "=> " plus each plus " " plus ordt else orp = op each iftrue orp try orptrim split orp " " mid 3 2 join orptrim " " except orptrim "" next buf orptrim plus "=> " plus each plus " " plus orp else orstrim split orst " " mid 1 2 join orstrim " " buf orstrim plus "=> " plus each plus " " # now orst prints next next now buf plus "| " plus orst swap now buf listbuf plus buf next next mos "jan feb mar apr may jun jul aug sep oct nov dec" split mos " " yrs "2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024" split yrs " " forin y yrs ifequal ycounter 0 now "" print print print print print ycounter 1 next forin m mos ifequal mcounter 0 now "" print print mcounter 1 next forin each listbuf filedate split each "=>" mid 1 1 ck instr filedate " " iftrue ck yr split filedate " " mid 2 1 mo split filedate " " mid 1 1 ifequal y yr ifequal m mo eachlen each len eachlink instr each "=>" times -1 plus eachlen plus 1 noweach each right eachlink cklnk instr noweach "=> " iftrue cklnk ycounter 0 mcounter 0 eachlen noweach len minus 3 link noweach right eachlen loc split link " " mid 1 1 ckbl nohtm bl ckloc nohtm loc ifequal ckbl ckloc now "uncomment next line to activate match finder option" # now "--" plus loc swap now loc next bl loc now "=> " plus loc plus " " plus link print else now noweach print next now counter plus 1 swap now counter ifmore counter 4 now "" print counter 0 next next next next next next next ``` license: 0-clause bsd ``` # 2018, 2019, 2020, 2021, 2022, 2023, 2024 # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ``` => https://freesoftwareresistance.neocities.org