Ejemplo n.º 1
0
    ShortDescription(
        'Forget the coffee, Capital gives you the perfect morning pick-me- up with a blend of the latest hits, travel news and incomparable morning banter.'
    ))

programme.genres.append(Genre('urn:tva:metadata:cs:ContentCS:2002:3.6.8'))
programme.genres.append(Genre('urn:tva:metadata:cs:IntentionCS:2002:1.1'))

programme.memberships.append(Membership('crid://www.capitalfm.com/4772', 4772))

programme.links.append(
    Link('mailto:[email protected]',
         description='Email the Capital Breakfast team!'))
programme.links.append(Link('http://www.capitalfm.com/on-air/breakfast-show/'))

event = ProgrammeEvent('crid://thisisglobal.com/4772/1190223/788946', 788946)
event.names.append(ShortName('Pun'))
event.names.append(MediumName('No.1 Pun'))
event.names.append(LongName('London\'s No. 1 Pun'))
event_location = Location(times=[
    RelativeTime(datetime.timedelta(hours=3, minutes=10),
                 datetime.timedelta(minutes=25))
])
event.locations.append(event_location)
event.descriptions.append(
    ShortDescription(
        'Can you come up with London\'s No.1 Pun for our story of the day?'))
programme.events.append(event)

schedule.programmes.append(programme)
print marshall(info, indent='\t')
Ejemplo n.º 2
0
               width=128,
               height=128,
               content='image/png'))
group.media.append(
    Multimedia('http://owdo.thisisglobal.com/2.0/id/25/logo/320x240.png',
               type=Multimedia.LOGO_UNRESTRICTED,
               width=320,
               height=240,
               content='image/png'))
group.media.append(
    Multimedia('http://owdo.thisisglobal.com/2.0/id/25/logo/800x600.png',
               type=Multimedia.LOGO_UNRESTRICTED,
               width=800,
               height=600,
               content='image/png'))
group.media.append(
    Multimedia('http://owdo.thisisglobal.com/2.0/id/25/logo/1024x768.png',
               type=Multimedia.LOGO_UNRESTRICTED,
               width=1024,
               height=768,
               content='image/png'))
group.links.append(
    Link('http://en.wikipedia.org/wiki/Capital_(radio_network)"',
         content='text/html',
         description='Capital on Wikipedia'))

group.services.append(service)
info.groups.append(group)

print marshall(info, ensemble=ensemble)
Ejemplo n.º 3
0
# Service
service = Service()
service.bearers.append(DabBearer(0xe1, 0xcfff, 0xc0fe))
service.names.append(ShortName('Capital'))
service.names.append(MediumName('Capital London'))
service.media.append(
    Multimedia('capital_32x32.png', Multimedia.LOGO_COLOUR_SQUARE))
service.media.append(
    Multimedia('capital_112x32.png', Multimedia.LOGO_COLOUR_RECTANGLE))
service.media.append(
    Multimedia('capital_128x128.png',
               Multimedia.LOGO_UNRESTRICTED,
               width=128,
               height=128,
               content='image/png'))
service.media.append(
    Multimedia('capital_320x240.png',
               Multimedia.LOGO_UNRESTRICTED,
               width=320,
               height=240,
               content='image/png'))

service.lookup = 'http://capitalfm.com/london'

info.services.append(service)

ensemble = Ensemble(0xe1, 0xcfff)

print(marshall(info, ensemble=ensemble))
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#===============================================================================

from spi import * 
from spi.binary import Ensemble, marshall
from spi.binary.bands import BAND_5A

info = ServiceInfo()

# Service
service = Service()
service.bearers.append(DabBearer(0xe1, 0xcfff, 0xc0fe))
service.names.append(ShortName('Capital'))
service.names.append(MediumName('Capital London'))
service.media.append(Multimedia('capital_32x32.png', Multimedia.LOGO_COLOUR_SQUARE))
service.media.append(Multimedia('capital_112x32.png', Multimedia.LOGO_COLOUR_RECTANGLE))
service.media.append(Multimedia('capital_128x128.png', Multimedia.LOGO_UNRESTRICTED, width=128, height=128, content='image/png'))
service.media.append(Multimedia('capital_320x240.png', Multimedia.LOGO_UNRESTRICTED, width=320, height=240, content='image/png'))

service.lookup = 'http://capitalfm.com/london'

info.services.append(service)

ensemble = Ensemble(0xe1, 0xcfff)

print marshall(info, ensemble=ensemble)
programme.names.append(ShortName('B\'fast'))
programme.names.append(MediumName('Breakfast'))
programme.names.append(LongName('Capital Breakfast'))

location = Location()
location.times.append(Time(datetime.datetime(2014, 4, 25, 6, 0, 0, 0), datetime.timedelta(hours=4), 
                           actual_time=datetime.datetime(2014, 4, 25, 6, 0, 0, 0), actual_duration=datetime.timedelta(hours=4)))
programme.locations.append(location)

programme.descriptions.append(ShortDescription('Forget the coffee, Capital gives you the perfect morning pick-me- up with a blend of the latest hits, travel news and incomparable morning banter.'))

programme.genres.append(Genre('urn:tva:metadata:cs:ContentCS:2002:3.6.8'))
programme.genres.append(Genre('urn:tva:metadata:cs:IntentionCS:2002:1.1'))

programme.memberships.append(Membership('crid://www.capitalfm.com/4772', 4772))

programme.links.append(Link('mailto:[email protected]', description='Email the Capital Breakfast team!'))
programme.links.append(Link('http://www.capitalfm.com/on-air/breakfast-show/'))

event = ProgrammeEvent('crid://thisisglobal.com/4772/1190223/788946', 788946)
event.names.append(ShortName('Pun'))
event.names.append(MediumName('No.1 Pun'))
event.names.append(LongName('London\'s No. 1 Pun'))
event_location = Location(times=[RelativeTime(datetime.timedelta(hours=3, minutes=10), datetime.timedelta(minutes=25))])
event.locations.append(event_location)
event.descriptions.append(ShortDescription('Can you come up with London\'s No.1 Pun for our story of the day?'))
programme.events.append(event)

schedule.programmes.append(programme)
print marshall(info, indent='\t')
               height=128,
               content='image/png'))
group.media.append(
    Multimedia('http://owdo.thisisglobal.com/2.0/id/25/logo/320x240.png',
               type=Multimedia.LOGO_UNRESTRICTED,
               width=320,
               height=240,
               content='image/png'))
group.media.append(
    Multimedia('http://owdo.thisisglobal.com/2.0/id/25/logo/800x600.png',
               type=Multimedia.LOGO_UNRESTRICTED,
               width=800,
               height=600,
               content='image/png'))
group.media.append(
    Multimedia('http://owdo.thisisglobal.com/2.0/id/25/logo/1024x768.png',
               type=Multimedia.LOGO_UNRESTRICTED,
               width=1024,
               height=768,
               content='image/png'))
group.links.append(
    Link('http://en.wikipedia.org/wiki/Capital_(radio_network)"',
         content='text/html',
         description='Capital on Wikipedia'))

group.services.append(service)
info.groups.append(group)

import sys
sys.stdout.buffer.write(marshall(info, ensemble=ensemble))
Ejemplo n.º 7
0
programme.links.append(Link('http://www.capitalfm.com/on-air/breakfast-show/'))

event = ProgrammeEvent('crid://thisisglobal.com/4772/1190223/788946', 788946)
event.names.append(ShortName('Pun'))
event.names.append(MediumName('No.1 Pun'))
event.names.append(LongName('London\'s No. 1 Pun'))
event_location = Location(times=[
    RelativeTime(datetime.timedelta(hours=3, minutes=10),
                 datetime.timedelta(minutes=25))
])
event.locations.append(event_location)
event.descriptions.append(
    ShortDescription(
        'Can you come up with London\'s No.1 Pun for our story of the day?'))
event.descriptions.append(
    ShortDescription(
        'Pouvez-vous proposer le jeu de mots n ° 1 de Londres pour notre histoire du jour?',
        language='fr'))
event.descriptions.append(
    ShortDescription('今日の私たちの物語のためにロンドンのNo.1しゃれを思い付くことができますか?', language='jp'))
event.descriptions.append(
    ShortDescription(
        'შეგიძიათ გამოხვიდეთ ლონდონის No.1 პენრით ჩვენი დღის ამბისთვის?',
        language='ka'))
programme.events.append(event)

schedule.programmes.append(programme)

import sys
sys.stdout.buffer.write(marshall(info))