File: supported-types.sh

package info (click to toggle)
filetype.py 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,560 kB
  • sloc: python: 1,841; makefile: 42; sh: 21
file content (26 lines) | stat: -rwxr-xr-x 911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#/bin/bash

#cat ../README.rst | grep "Supported types" -A 2000 | grep -v Supported | \
#    egrep -v '^(\.\.| )' | cut -d"-" -f2 | tr -d '[*^]' | xargs | \
#    sed s'/ /, /g' | \
#    sed 's/Image,/Image:/' | \
#    sed 's/, Video,/\n\nVideo:/' | \
#    sed 's/, Audio,/\n\nAudio:/' | \
#    sed 's/, Archive,/\n\nArchive:/' | \
#    sed 's/, Font,/\n\nFont:/' | \
#    sed 's/$/./'

cat ../README.rst | grep "Supported types" -A 2000 | grep -v Supported | \
    egrep -v '^(\.\.| )' | cut -d"-" -f2 | tr -d '[*^]' | xargs | \
    sed 's/Image/Image:/' | \
    sed 's/ Video/\nVideo:/' | \
    sed 's/ Audio/\nAudio:/' | \
    sed 's/ Archive/\nArchive:/' | \
    sed 's/ Font/\nFont:/' > types.tmpfile

for i in Image Video Audio Archive Font
do
    printf "   - $i: "
    cat types.tmpfile | grep $i | cut -d: -f2 | tr ' ' '\n' | sort -n | \
        xargs | sed 's/ /, /g' | sed 's/$/./' | fold -sw 69
done