123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #### license: creative commons cc0 1.0 (public domain)
- #### http://creativecommons.org/publicdomain/zero/1.0/
- proginf = "tal 0.1, nov 2018 mn"
- function getsize p
- f split p " " mid 1 1
- try
- now f int
- except
- f 0
- resume
- now return f
- fig
- function gettype p
- fn split p "/" right 1 mid 1 1
- cdot instr fn "."
- iftrue cdot
- now split fn "." right 1 mid 1 1 reverse plus "." reverse return now
- else
- now return fn
- fig
- fig
- tal arr
- python
- tal = {}
- fig
- function taldo p t
- python
- global tal
- try: tal[p] = int(tal[p]) + t
- except: tal[p] = t
- fig
- fig
- now taldo "a" 1
- files arrstdin
- forin p files
- tab 9 chr
- ctab instr p tab
- csf instr p "/"
- iftrue ctab
- iftrue csf
- size getsize p
- filetype gettype p
- now taldo filetype size
- fig
- fig
- next
- talfig arr mid 0 1
- python
- for p in tal.keys():
- if int(tal[p]) > 32767: talfig += [(int(tal[p]), p)]
- talfig.sort()
- for p in talfig: print p[0], p[1]
- print
- fig
|