Ejemplo n.º 1
0
 def test_genre(self):
     from dabepg.binary import encode_genre
     from dabepg import Genre
     
     genre = Genre('urn:tva:metadata:cs:ContentCS:2002:3.6.9', 'World/Traditional/Ethnic/Folk Music')
     print 'genre', genre, 'encodes as'
     bits = encode_genre(genre)
     print bitarray_to_binary(bits)
     print bitarray_to_hex(bits)
Ejemplo n.º 2
0
class Intention:
    
    ENTERTAIN = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.1', 'ENTERTAIN')
    INFORM = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.2', 'INFORM')
    Infotainment = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.2.3', 'Infotainment')
    Advice = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.2.4', 'Advice')
    EDUCATE = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.3"', 'EDUCATE')
    ENRICH = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.8', 'ENRICH')
    Inspirational_enrichment = Genre('urn:tva:metadata:cs:IntentionCS:2005:1.8.2', 'Inspirational enrichment')
Ejemplo n.º 3
0
 class Cultural(Genre):
     
     def __init__(self):
         Genre.__init__(self, 'urn:tva:metadata:cs:ContentCS:2009:3.1.1.10', 'Cultural')
         
     Arts = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.1', 'Arts')
     Entertainment = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.2', 'Entertainment')
     Film = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.3', 'Film')
     Music = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.4', 'Music')
     Radio = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.5', 'Radio')
     TV = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.6', 'TV')
Ejemplo n.º 4
0
     class News(Genre):
          
          def __init__(self):
              Genre.__init__(self, 'urn:tva:metadata:cs:ContentCS:2009:3.1.1', 'News')
              
 
          Daily_News = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.1', 'Daily news')
          Special_News = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.2', 'Special news/edition')
          Special_Report = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.3', 'Special Report')
          Commentary = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.4', 'Commentary')
          Periodical = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.5', 'Periodical')
          National_Politics = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.6', 'National politics/National assembly')
          Economy = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.7', 'Economy/Market/Financial/Business')
          International = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.8', 'Foreign/International')
          Sports = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.9', 'Sports')
          
          class Cultural(Genre):
              
              def __init__(self):
                  Genre.__init__(self, 'urn:tva:metadata:cs:ContentCS:2009:3.1.1.10', 'Cultural')
                  
              Arts = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.1', 'Arts')
              Entertainment = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.2', 'Entertainment')
              Film = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.3', 'Film')
              Music = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.4', 'Music')
              Radio = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.5', 'Radio')
              TV = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.10.6', 'TV')
              
          Local = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.11', 'Local/Regional')
          Traffic = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.12', 'Traffic')
          Weather = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.13', 'Weather forecasts')
          Service_information = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.14', 'Service information')
          Public_affairs = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.15', 'Public affairs')
          Current_affairs = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.16', 'Current affairs')
          Consumer_affairs = Genre('urn:tva:metadata:cs:ContentCS:2009:3.1.1.17', 'Consumer affairs')