From 638bc28e9d4294118b5484d2c22dd1d88e0d07fc Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 25 Jan 2024 20:17:58 +0300 Subject: [PATCH] bin: Remove outdated unused scripts --- bin/iconvxml.py | 28 --------- bin/latin1_to_ascii.py | 125 ----------------------------------------- bin/smplay | 22 -------- bin/smplay-gui | 1 - 4 files changed, 176 deletions(-) delete mode 100755 bin/iconvxml.py delete mode 100755 bin/latin1_to_ascii.py delete mode 100755 bin/smplay delete mode 120000 bin/smplay-gui diff --git a/bin/iconvxml.py b/bin/iconvxml.py deleted file mode 100755 index 2892a91..0000000 --- a/bin/iconvxml.py +++ /dev/null @@ -1,28 +0,0 @@ -#! /usr/bin/env python -"Recode using XML char references" - -import sys -from getopt import getopt -from m_lib.defenc import default_encoding - -from_charset = "utf-8" -to_charset = default_encoding - -options, arguments = getopt(sys.argv[1:], 'f:t:') -for option, value in options: - if option == '-f': - from_charset = value - elif option == '-t': - to_charset = value - -if arguments: - for file in arguments: - infile = open(file) - try: - for line in infile: - sys.stdout.write(line.decode(from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) - except: - infile.close() -else: - for line in sys.stdin: - sys.stdout.write(line.decode(from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) diff --git a/bin/latin1_to_ascii.py b/bin/latin1_to_ascii.py deleted file mode 100755 index a2f2145..0000000 --- a/bin/latin1_to_ascii.py +++ /dev/null @@ -1,125 +0,0 @@ -#! /usr/bin/env python - -# See http://code.activestate.com/recipes/251871/ - -import sys, os - -xlate = { - u'\N{ACUTE ACCENT}': "'", - u'\N{BROKEN BAR}': '|', - u'\N{CEDILLA}': '{cedilla}', - u'\N{CENT SIGN}': '{cent}', - u'\N{COPYRIGHT SIGN}': '{C}', - u'\N{CURRENCY SIGN}': '{currency}', - u'\N{DEGREE SIGN}': '{degrees}', - u'\N{DIAERESIS}': '{umlaut}', - u'\N{DIVISION SIGN}': '/', - u'\N{FEMININE ORDINAL INDICATOR}': '{^a}', - u'\N{INVERTED EXCLAMATION MARK}': '!', - u'\N{INVERTED QUESTION MARK}': '?', - u'\N{LATIN CAPITAL LETTER A WITH ACUTE}': 'A', - u'\N{LATIN CAPITAL LETTER A WITH CIRCUMFLEX}': 'A', - u'\N{LATIN CAPITAL LETTER A WITH DIAERESIS}': 'A', - u'\N{LATIN CAPITAL LETTER A WITH GRAVE}': 'A', - u'\N{LATIN CAPITAL LETTER A WITH RING ABOVE}': 'A', - u'\N{LATIN CAPITAL LETTER A WITH TILDE}': 'A', - u'\N{LATIN CAPITAL LETTER AE}': 'Ae', - u'\N{LATIN CAPITAL LETTER C WITH CEDILLA}': 'C', - u'\N{LATIN CAPITAL LETTER E WITH ACUTE}': 'E', - u'\N{LATIN CAPITAL LETTER E WITH CIRCUMFLEX}': 'E', - u'\N{LATIN CAPITAL LETTER E WITH DIAERESIS}': 'E', - u'\N{LATIN CAPITAL LETTER E WITH GRAVE}': 'E', - u'\N{LATIN CAPITAL LETTER ETH}': 'Th', - u'\N{LATIN CAPITAL LETTER I WITH ACUTE}': 'I', - u'\N{LATIN CAPITAL LETTER I WITH CIRCUMFLEX}': 'I', - u'\N{LATIN CAPITAL LETTER I WITH DIAERESIS}': 'I', - u'\N{LATIN CAPITAL LETTER I WITH GRAVE}': 'I', - u'\N{LATIN CAPITAL LETTER N WITH TILDE}': 'N', - u'\N{LATIN CAPITAL LETTER O WITH ACUTE}': 'O', - u'\N{LATIN CAPITAL LETTER O WITH CIRCUMFLEX}': 'O', - u'\N{LATIN CAPITAL LETTER O WITH DIAERESIS}': 'O', - u'\N{LATIN CAPITAL LETTER O WITH GRAVE}': 'O', - u'\N{LATIN CAPITAL LETTER O WITH STROKE}': 'O', - u'\N{LATIN CAPITAL LETTER O WITH TILDE}': 'O', - u'\N{LATIN CAPITAL LETTER THORN}': 'th', - u'\N{LATIN CAPITAL LETTER U WITH ACUTE}': 'U', - u'\N{LATIN CAPITAL LETTER U WITH CIRCUMFLEX}': 'U', - u'\N{LATIN CAPITAL LETTER U WITH DIAERESIS}': 'U', - u'\N{LATIN CAPITAL LETTER U WITH GRAVE}': 'U', - u'\N{LATIN CAPITAL LETTER Y WITH ACUTE}': 'Y', - u'\N{LATIN SMALL LETTER A WITH ACUTE}': 'a', - u'\N{LATIN SMALL LETTER A WITH CIRCUMFLEX}': 'a', - u'\N{LATIN SMALL LETTER A WITH DIAERESIS}': 'a', - u'\N{LATIN SMALL LETTER A WITH GRAVE}': 'a', - u'\N{LATIN SMALL LETTER A WITH RING ABOVE}': 'a', - u'\N{LATIN SMALL LETTER A WITH TILDE}': 'a', - u'\N{LATIN SMALL LETTER AE}': 'ae', - u'\N{LATIN SMALL LETTER C WITH CEDILLA}': 'c', - u'\N{LATIN SMALL LETTER E WITH ACUTE}': 'e', - u'\N{LATIN SMALL LETTER E WITH CIRCUMFLEX}': 'e', - u'\N{LATIN SMALL LETTER E WITH DIAERESIS}': 'e', - u'\N{LATIN SMALL LETTER E WITH GRAVE}': 'e', - u'\N{LATIN SMALL LETTER ETH}': 'th', - u'\N{LATIN SMALL LETTER I WITH ACUTE}': 'i', - u'\N{LATIN SMALL LETTER I WITH CIRCUMFLEX}': 'i', - u'\N{LATIN SMALL LETTER I WITH DIAERESIS}': 'i', - u'\N{LATIN SMALL LETTER I WITH GRAVE}': 'i', - u'\N{LATIN SMALL LETTER N WITH TILDE}': 'n', - u'\N{LATIN SMALL LETTER O WITH ACUTE}': 'o', - u'\N{LATIN SMALL LETTER O WITH CIRCUMFLEX}': 'o', - u'\N{LATIN SMALL LETTER O WITH DIAERESIS}': 'o', - u'\N{LATIN SMALL LETTER O WITH GRAVE}': 'o', - u'\N{LATIN SMALL LETTER O WITH STROKE}': 'o', - u'\N{LATIN SMALL LETTER O WITH TILDE}': 'o', - u'\N{LATIN SMALL LETTER SHARP S}': 'ss', - u'\N{LATIN SMALL LETTER THORN}': 'th', - u'\N{LATIN SMALL LETTER U WITH ACUTE}': 'u', - u'\N{LATIN SMALL LETTER U WITH CIRCUMFLEX}': 'u', - u'\N{LATIN SMALL LETTER U WITH DIAERESIS}': 'u', - u'\N{LATIN SMALL LETTER U WITH GRAVE}': 'u', - u'\N{LATIN SMALL LETTER Y WITH ACUTE}': 'y', - u'\N{LATIN SMALL LETTER Y WITH DIAERESIS}': 'y', - u'\N{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}': '<<', - u'\N{MACRON}': '_', - u'\N{MASCULINE ORDINAL INDICATOR}': '{^o}', - u'\N{MICRO SIGN}': '{micro}', - u'\N{MIDDLE DOT}': '*', - u'\N{MULTIPLICATION SIGN}': '*', - u'\N{NOT SIGN}': '{not}', - u'\N{PILCROW SIGN}': '{paragraph}', - u'\N{PLUS-MINUS SIGN}': '{+/-}', - u'\N{POUND SIGN}': '{pound}', - u'\N{REGISTERED SIGN}': '{R}', - u'\N{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}': '>>', - u'\N{SECTION SIGN}': '{section}', - u'\N{SOFT HYPHEN}': '-', - u'\N{SUPERSCRIPT ONE}': '{^1}', - u'\N{SUPERSCRIPT THREE}': '{^3}', - u'\N{SUPERSCRIPT TWO}': '{^2}', - u'\N{VULGAR FRACTION ONE HALF}': '{1/2}', - u'\N{VULGAR FRACTION ONE QUARTER}': '{1/4}', - u'\N{VULGAR FRACTION THREE QUARTERS}': '{3/4}', - u'\N{YEN SIGN}': '{yen}' -} - -def latin1_to_ascii(uinput): - if isinstance(uinput, bytes): - uinput = uinput.decode(sys.getfilesystemencoding()) - out = [] - for c in uinput: - i = ord(c) - if i in xlate: - out.append(xlate[i]) - elif i >= 0x80: - pass - else: - out.append(str(c)) - return ''.join(out) - -if __name__ == '__main__': - if len(sys.argv) == 1: - sys.exit('Usage: %s filename\n' % sys.argv[0]) - for name in sys.argv[1:]: - plain_ascii = latin1_to_ascii(name) - if plain_ascii != name: - os.rename(name, plain_ascii) diff --git a/bin/smplay b/bin/smplay deleted file mode 100755 index 8561299..0000000 --- a/bin/smplay +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh - -(xscreensaver-command -exit -xset -dpms s off) & - -b="`basename $0`" - -if [ "$b" = smplay ]; then - GUI="-minigui" -elif [ "$b" = smplay-gui ]; then - GUI="-defaultgui" -else - echo "Bad script name, aborted" 1>&2 - exit 1 -fi - -cgmem_nice 500 smplayer "$GUI" "$@" -"$HOME"/admin/prog/audio-cdr-video/audio/pa-volume - -cd "$HOME" -xset +dpms s on -xscreensaver & diff --git a/bin/smplay-gui b/bin/smplay-gui deleted file mode 120000 index 8c13708..0000000 --- a/bin/smplay-gui +++ /dev/null @@ -1 +0,0 @@ -smplay \ No newline at end of file -- 2.39.5