File: logo2ascii.pl

package info (click to toggle)
linuxlogo 6.01-0.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,104 kB
  • sloc: ansic: 4,604; sh: 380; makefile: 302; perl: 7
file content (18 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl -p
# logo2ascii
# Takes a logo and converts it to use only ASCII characters
# (used to convert to ascii some of the logos in the distribution
# so they can be introduced into parse_logo)
# (c) Javier Fernandez-Sanguino Pen~a <jfs@computer.org>
#
# Distributed under the terms of the GNU GPL license
# see http://www.gnu.org

s/\[\d+;\d+m//g;
s/\[\d+m//g;
s/\[[\d;]+m//g;
# special case: spaces
while ( /\[(\d)C/ ) {
	$spaces = " " x $1;
	s/\[$1C/$spaces/g;
}