From 1d536430c41bad11ed36afeba8ab0219fe9cb36d Mon Sep 17 00:00:00 2001 From: LarsAC Date: Sun, 6 Mar 2005 12:34:19 +0000 Subject: Merged changes for 0.1.4 git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@542 e10066b5-e1e2-0310-b819-94efdf66514b --- scripts/COPYRIGHT | 29 +- scripts/createtables.mysql | 5 + scripts/genres.txt | 116 ++- scripts/gentables | 47 + scripts/iso639tab.py | 81 ++ scripts/iso_639.xml | 2072 ++++++++++++++++++++++++++++++++++++++++++++ scripts/languages.txt | 27 +- 7 files changed, 2317 insertions(+), 60 deletions(-) create mode 100755 scripts/gentables create mode 100755 scripts/iso639tab.py create mode 100644 scripts/iso_639.xml mode change 100755 => 100644 scripts/languages.txt (limited to 'scripts') diff --git a/scripts/COPYRIGHT b/scripts/COPYRIGHT index 9b0e8cb..05339ef 100644 --- a/scripts/COPYRIGHT +++ b/scripts/COPYRIGHT @@ -1,16 +1,17 @@ -# the content of languages.txt is taken from the file -# iso_639.tab which contains this copyright: +the content of languages.txt is generated from the file +iso_639.xml which contains this copyright: + + + + + + + + + + + + + -## iso-639.tab -## -## Copyright (C) 2004 Alastair McKinstry -## Released under the GNU License; see file COPYING for details -## -## Last update: 2004-03-29 -## -## This file gives a list of all languages in the ISO-639 -## standard, and is used to provide translations (via gettext) -## -## Status: ISO 639-2:1998 + additions and changes until 2003-03-05 -## Source: http://lcweb.loc.gov/standards/iso639-2/englangn.html diff --git a/scripts/createtables.mysql b/scripts/createtables.mysql index 079b3bd..708bdd2 100755 --- a/scripts/createtables.mysql +++ b/scripts/createtables.mysql @@ -224,6 +224,11 @@ CREATE TABLE tracks ( channels tinyint(3) unsigned default NULL, id int(11) NOT NULL auto_increment, + folder1 varchar(255), + folder2 varchar(255), + folder3 varchar(255), + folder4 varchar(255), + PRIMARY KEY (id), KEY title (title(10)), KEY mp3file (mp3file(10)), diff --git a/scripts/genres.txt b/scripts/genres.txt index 43124e9..25655e4 100755 --- a/scripts/genres.txt +++ b/scripts/genres.txt @@ -1,20 +1,20 @@ b 20 Alternative -ba 40 Alternative General +ba 40 Alt. Rock bb \N Art Rock -bc 90 Avant Rock +bc 90 Avantgarde be \N Experimental bh 6 Grunge -bi \N Indie -bm 12 Unclassifiable -bn \N Crossover +bi 131 Indie +bm 12 Other +bn 139 Crossover c \N Books & Spoken ca \N Short Stories cb 57 Comedy -cc 77 Musicals/Broadway +cc 77 Musical cd \N Poetry -ce \N Cabaret / Satire +ce 65 Cabaret cf \N Religion -cg 101 Spoken Word +cg 101 Speech ch \N Stories/Fairytales ci \N Radio Play cia \N Literary Radio Play @@ -28,7 +28,7 @@ eca \N Contemp. Crossover ecb \N Electronic Classical ecc \N Experimental Classical ecd \N Minimal Music -ed \N Film Music +ed 24 Soundtrack ee 33 Instrumental ef \N Period Music efa \N Baroque @@ -40,12 +40,11 @@ eg \N Solo Instruments ega \N Guitar egb \N Percussion egc \N Piano -eh 106 Symphonic -ei 28 Classic Vocal -eia 97 Choral +eh 106 Symphony +ei 28 Vocal +eia 97 Chorus eib \N Ensembles eic 103 Opera -ej \N Baroque f 2 Country fa \N Alternative Country fb 89 Bluegrass @@ -58,7 +57,7 @@ fi \N Rockabilly g 98 Easy Listening gb \N Lounge gc \N Love Songs -gca 116 Ballads +gca 116 Ballad gd \N Mood Music ge 10 New Age gf \N Soft Rock @@ -69,7 +68,7 @@ gi 45 Meditative gj \N Pair Dance gja \N Walz gjb \N Tango -h 102 Songs/Chansons +h 102 Chanson ha \N Singer-Songwriter hb 65 Children's Music i 52 Electronic @@ -80,33 +79,35 @@ ica \N Breakbeat icb \N Darkside icc 63 Jungle icd \N Ragga -ice 27 Trip Hop +ice 27 Trip-Hop id 3 Dance -ie \N Drum n' Bass +ie 127 Drum & Bass if \N Electronica ig \N Envir. Soundscapes ih \N Experimental Elect. iha \N Minimal Experimental ihb 39 Noise -ii 37 Game Soundtracks +ii 37 Sound Clip ij 35 House ija \N Acid House ijb \N Funk House ijc \N Hard House ijd \N Progressive House +ije 124 Euro-House +ijf 128 Club-House ik 19 Industrial il 18 Techno ilb \N Dub -ild \N Goa +ild 126 Goa ile \N Hardcore Techno ilf \N Illbient ilg \N Minimal -ilh 25 Old Skool Techno +ilh 25 Euro-Techno ili 68 Rave ilj 31 Trance im 44 Space Music j \N Hip Hop/Rap -ja 7 Hip Hop +ja 7 Hip-Hop jb 15 Rap jbb 61 Christian Rap jbd \N Hardcore Rap @@ -124,8 +125,8 @@ kd 14 R&B ke 42 Soul kea \N Sweet Soul l 8 Jazz -la 73 Acid Jazz -lb 85 Bebop +la 73 Acid Punk +lb 85 Bebob lc \N Dancefloor Jazz lf 30 Jazz Fusion lh \N Jazz Vocals @@ -152,14 +153,14 @@ mcc 22 Death Metal mcd \N Doom Metal mcf \N Hard Core Metal mcg \N Heavy Metal -mck \N Thrash/Speed Metal +mck \N Thrash Metal md 13 Pop mda 99 Acoustic mdb \N Synthesizer Pop mdd \N Latin Pop -mdg 123 A capella/Pop Vocals +mdg 123 A Capella mdh \N Neue Deutsche Welle -mdi \N Disco +mdi 4 Disco mdj \N Dance Pop mdja \N Twist mdk \N Doo-Wop @@ -170,15 +171,15 @@ mec \N Old School Punk med 21 Ska mf 17 Rock mfb \N Acid Rock -mfe 81 Folk Rock +mfe 81 Folk/Rock mfg \N Groove Rock mfh \N Guitar Rock mfha 1 Classic Rock mfhb \N Improv Rock -mfhc 47 Instrumental Rock +mfhc 47 Instrum. Rock mfhf \N Surf Rock mfj 66 New Wave -mfk 67 Psychedelic +mfk 67 Psychadelic mfl 78 Rock & Roll mfm 94 Symphonic Rock mg \N Rock En Espanol @@ -194,7 +195,7 @@ nce \N Arabian Pop ncf \N European Ethnopop ncg \N Latin Pop nch \N Caribbean Pop -nd 82 World Traditions +nd 82 National Folk nda \N African ndaa \N Mali Blues ndb \N Arabic @@ -202,7 +203,7 @@ ndc \N Asian ndd \N Bossa Nova nde \N Caribbean ndf 88 Celtic -ndg 53 European Folk/Pop +ndg 53 Pop-Folk ndga \N Jodel ndh \N France ndi \N Germany @@ -212,8 +213,8 @@ ndl 86 Latin ndlb \N Flamenco ndlc \N Mambo ndld \N Mariachi -ndle \N Meringue -ndlg \N Salsa +ndle 142 Merengue +ndlg 143 Salsa ndlh 114 Samba ndm 64 Native American ndn \N Quebecois @@ -221,4 +222,53 @@ ndo \N Russian ndp \N South/Cent. American ndq \N Spain ndr 113 Tango +y 11 Oldies +y2 49 Gothic +y6 23 Pranks +y9 29 Jazz+Funk +y12 46 Instrum. Pop +y14 48 Ethnic +y15 50 Darkwave +y16 51 Techno-Indust. +y18 54 Eurodance +y19 55 Dream +y20 56 Southern Rock +y21 58 Cult +y22 60 Top 40 +y23 62 Pop/Funk +y25 69 Showtunes +y26 70 Trailer +y27 72 Tribal +y29 75 Polka +y30 79 Hard Rock +y34 87 Revival +y36 91 Gothic Rock +y37 92 Progress. Rock +y38 93 Psychadel. Rock +y39 95 Slow Rock +y41 100 Humour +y42 107 Booty Bass +y43 108 Primus +y44 109 Porn Groove +y45 111 Slow Jam +y46 112 Club +y47 115 Folklore +y48 117 Power Ballad +y49 118 Rhythmic Soul +y50 119 Freestyle +y51 120 Duet +y52 122 Drum Solo +y55 125 Dance Hall +y58 130 Terror +y59 132 BritPop +y60 133 Negerpunk +y61 134 Polsk Punk +y62 135 Beat +y63 136 Christian Gangsta Rap +y64 138 Black Metal +y65 140 Contemporary Christian +y66 141 Christian Rock +y69 145 Anime +y70 146 Jpop +y71 147 Synthpop NULL diff --git a/scripts/gentables b/scripts/gentables new file mode 100755 index 0000000..f7fcc89 --- /dev/null +++ b/scripts/gentables @@ -0,0 +1,47 @@ + +( + echo " +//autogenerated by `pwd -P`/$0 + +genres_t genres[] = {" + +cat scripts/genres.txt | while read gdid id3 name +do + test "$id3" = N && id3=-1 + test "$gdid" = NULL && break + echo ' { "'$gdid'", '$id3', "'$name'" },' +done +echo '}; +' + +echo "lang_t languages[] = {" + +scripts/iso639tab.py scripts/iso_639.xml | + grep -v '^#' | + grep -v '^$' | + while read iso1 iso2 iso3 name +do + echo ' { "'$iso2'", "'$name'" },' +done +echo '}; +' + +echo "musictypes_t musictypes[] = {" + +cat scripts/musictypes.txt | while read mtype +do + echo ' { "'$mtype'"},' +done +echo '}; +' + +echo "sources_t sources[] = {" + +cat scripts/sources.txt | while read stype +do + echo ' { "'$stype'"},' +done +echo '};' +) >mg_tables.h + + diff --git a/scripts/iso639tab.py b/scripts/iso639tab.py new file mode 100755 index 0000000..b2739c9 --- /dev/null +++ b/scripts/iso639tab.py @@ -0,0 +1,81 @@ +#!/usr/bin/python +# +# Read iso-codes iso_639.xml data file and output a .tab file +# +# Copyright (C) 2005 Alastair McKinstry +# Released under the GPL. +# $Id: iso639tab.py,v 1.1 2005/03/02 07:24:51 mckinstry Exp $ + +from xml.sax import saxutils, make_parser, saxlib, saxexts, ContentHandler +from xml.sax.handler import feature_namespaces +import sys, os, getopt, urllib2 + +class printLines(saxutils.DefaultHandler): + def __init__(self, ofile): + self.ofile = ofile + + def startElement(self, name, attrs): + if name != 'iso_639_entry': + return + t_code = attrs.get('iso_639_2T_code', None) + if t_code == None: + raise RunTimeError, "Bad file" + if type(t_code) == unicode: + t_code = t_code.encode('UTF-8') + b_code = attrs.get('iso_639_2B_code', None) + if b_code == None: + raise RunTimeError, "Bad file" + if type(b_code) == unicode: + b_code = b_code.encode('UTF-8') + name = attrs.get('name', None) + if name == None: + raise RunTimeError, " BadFile" + short_code=attrs.get('iso_639_1_code','XX') + short_code=short_code.encode('UTF-8') + if type(name) == unicode: + name = name.encode('UTF-8') + self.ofile.write (t_code + '\t' + b_code + '\t' + short_code + '\t' + name + '\n') + + +## +## MAIN +## + + +ofile = sys.stdout +ofile.write(""" +## iso-639.tab +## +## Copyright (C) 2005 Alastair McKinstry +## Released under the GNU License; see file COPYING for details +## +## PLEASE NOTE: THIS FILE IS DEPRECATED AND SCHEDULED TO BE REMOVED. +## IT IS FOR BACKWARD-COMPATIBILITY ONLY: PLEASE USE THE ISO-639.XML +## FILE INSTEAD. +## +## This file gives a list of all languages in the ISO-639 +## standard, and is used to provide translations (via gettext) +## +## Status: ISO 639-2:1998 + additions and changes until 2003-03-05 +## Source: http://lcweb.loc.gov/standards/iso639-2/englangn.html +## +## Columns: +## iso-639-2 terminology code +## iso-639-2 bibliography code +## iso-639-1 code (XX if none exists) +## Name (English) +## +## +""") +p = make_parser() +p.setErrorHandler(saxutils.ErrorPrinter()) +try: + dh = printLines(ofile) + p.setContentHandler(dh) + p.parse(sys.argv[1]) +except IOError,e: + print in_sysID+": "+str(e) +except saxlib.SAXException,e: + print str(e) + +ofile.close() diff --git a/scripts/iso_639.xml b/scripts/iso_639.xml new file mode 100644 index 0000000..ed6fc73 --- /dev/null +++ b/scripts/iso_639.xml @@ -0,0 +1,2072 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/languages.txt b/scripts/languages.txt old mode 100755 new mode 100644 index d623f6c..6378dcc --- a/scripts/languages.txt +++ b/scripts/languages.txt @@ -10,8 +10,6 @@ afr Afrikaans aka Akan akk Akkadian alb Albanian -ale Aleut -alg Algonquian languages amh Amharic ang English, Old (ca.450-1100) apa Apache languages @@ -95,12 +93,10 @@ crh Crimean Turkish; Crimean Tatar crp Creoles and pidgins (Other) csb Kashubian cus Cushitic (Other) -cus Portuguese-based (Other) cze Czech dak Dakota dan Danish dar Dargwa -dsb Lower Sorbian del Delaware den Slave (Athapascan) dgr Dogrib @@ -108,6 +104,7 @@ din Dinka div Divehi doi Dogri dra Dravidian (Other) +dsb Lower Sorbian dua Duala dum Dutch, Middle (ca. 1050-1350) dut Dutch @@ -127,6 +124,7 @@ fan Fang fao Faroese fat Fanti fij Fijian +fil Filipino; Pilipino fin Finnish fiu Finno-Ugrian (Other) fon Fon @@ -262,12 +260,12 @@ mao Maori map Austronesian (Other) mar Marathi mas Masai -mal Malay +may Malay mdf Moksha mdr Mandar men Mende mga Irish, Middle (900-1200) -mic Micmac +mic Mi'kmaq; Micmac min Minangkabau mis Miscellaneous languages mkh Mon-Khmer (Other) @@ -282,6 +280,7 @@ mos Mossi mul Multiple languages mun Munda languages mus Creek +mwl Mirandese mwr Marwari myn Mayan languages myv Erzya @@ -300,15 +299,16 @@ nia Nias nic Niger-Kordofanian (Other) niu Niuean nno Norwegian Nynorsk -nob Bøkmal, Norwegian +nob Bokmål, Norwegian nog Nogai non Norse, Old nor Norwegian -nso Sotho, Northern +nso Northern Sotho; Pedi; Sepedi nub Nubian languages +nym Nyamwezi nwc Classical Newari; Old Newari nya Chewa; Chichewa; Nyanja -nym Nyankole +nyn Nyankole nyo Nyoro nzi Nzima oci Occitan (post 1500) @@ -335,7 +335,7 @@ pol Polish por Portuguese pon Pohnpeian pra Prakrit languages -pro Proveçal, Old (to 1500) +pro Provençal, Old (to 1500) pus Pushto que Quechua raj Rajasthani @@ -357,6 +357,7 @@ san Sanskrit sas Sasak sat Santali scc Serbian +scn Sicilian sco Scots scr Croatian sel Selkup @@ -365,7 +366,7 @@ sga Irish, Old (to 900) sgn Sign languages shn Shan sid Sidamo -sin Sinhalese +sin Sinhala; Sinhalese sio Siouan languages sit Sino-Tibetan (Other) sla Slavic (Other) @@ -385,7 +386,7 @@ sog Sogdian som Somali son Songhai sot Sotho, Southern -spa Spanish (Castilian) +spa Spanish srd Sardinian srr Serer ssa Nilo-Saharan (Other) @@ -413,8 +414,8 @@ tib Tibetan tig Tigre tir Tigrinya tiv Tiv -tkl Tokelau tlh Klingon; tlhIngan-Hol +tkl Tokelau tli Tlinglit tmh Tamashek tog Tonga (Nyasa) -- cgit v1.2.3