digital literacy for everyone


[lit]

[generate-title]

[lit] [figplus] #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ # tally size of each uploads folder on techrights # http://techrights.org/wp-content/uploads/2006/12/ 4 files, 57344 bytes # 2006 total: 56 kbytes # ... # http://techrights.org/wp-content/uploads/2019/01/ 196 files, 148477016 bytes # http://techrights.org/wp-content/uploads/2019/02/ 168 files, 57507112 bytes # http://techrights.org/wp-content/uploads/2019/03/ 198 files, 22149103 bytes # http://techrights.org/wp-content/uploads/2019/04/ 468 files, 92646467 bytes # http://techrights.org/wp-content/uploads/2019/05/ 220 files, 24895471 bytes # http://techrights.org/wp-content/uploads/2019/06/ 376 files, 30223046 bytes # http://techrights.org/wp-content/uploads/2019/07/ 151 files, 11323071 bytes # http://techrights.org/wp-content/uploads/2019/08/ cant process, might not exist # http://techrights.org/wp-content/uploads/2019/09/ cant process, might not exist # http://techrights.org/wp-content/uploads/2019/10/ cant process, might not exist # http://techrights.org/wp-content/uploads/2019/11/ cant process, might not exist # http://techrights.org/wp-content/uploads/2019/12/ cant process, might not exist # 2006 total: 56 kbytes # 2007 total: 12664.28 kbytes # 2008 total: 197228.51 kbytes # 2009 total: 449105.85 kbytes # 2010 total: 642072.18 kbytes # 2011 total: 260229.39 kbytes # 2012 total: 144118.01 kbytes # 2013 total: 488982.62 kbytes # 2014 total: 989773.26 kbytes # 2015 total: 1059716.12 kbytes # 2016 total: 1710233.09 kbytes # 2017 total: 1929602.52 kbytes # 2018 total: 1145149.14 kbytes # 2019 total: 378145.78 kbytes base "http://techrights.org/wp-content/uploads/" function doubledec p proc = p inproc = instr proc "." iftrue inproc procwhere = inproc plus 2 p = proc ; left procwhere fig now return p fig function unitfilter p lp = p lcase findk = instr lp "k" findm = instr lp "m" findg = instr lp "g" iftrue findk change = split lp "k" ; join change "" p = change val times 1024 ; int ; str fig iftrue findm change = split lp "m" ; join change "" p = change val times 1024 times 1024 ; int ; str fig iftrue findg change = split lp "g" ; join change "" p = change val times 1024 times 1024 times 1024 ; int ; str fig now = p ; val ; return now fig function processtot p tally = 0 now = p len minus 1 ; prints ; " files, " ; prints forin each p try tallyitem = unitfilter each now = tally plus tallyitem ; swap now tally except now resume next now = tally ; prints ; " bytes" ; print now return tally fig year = date ; right 4 ; int mo = date ; left 2 ; int outputtot = "" for eachyear 2006 year 1 yeartally = 0 months = "01 02 03 04 05 06 07 08 09 10 11 12" ; split months " " forin eachmo months eachyeartext = eachyear ; str url = base plus eachyeartext plus "/" plus eachmo plus "/" ; prints now = " " ; prints try up = arrcurl url tot = arr ; mid 1 0 forin each up eachleft = each ; left 4 ; lcase ifequal eachleft "<tr>" now = split each "</td>" ; mid 4 1 ; split now ">" ; mid 2 1 ; ltrim tot.plus now # append array (the . is optional) fig next tally = processtot tot now = yeartally plus tally ; swap now yeartally except now = "cant process, might not exist" ; print resume next yeartallyk = yeartally divby 1024 ; str ; doubledec yeartallyk eachyeartext = eachyear ; str nl = 10 ; chr now = outputtot plus eachyeartext plus " total: " plus yeartallyk plus " kbytes" plus nl outputtot = now ; print next
back to figplus page: [lit]https://codeinfig.neocities.org/figplus/[lit] home: [lit]https://codeinfig.neocities.org[lit]