-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsessbook.py
More file actions
28 lines (22 loc) · 805 Bytes
/
Copy pathsessbook.py
File metadata and controls
28 lines (22 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Generate a flip book for making tune sets
import time
from setsheets import *
import utils
class CEventBook(utils.CBook):
def __init__(self, event):
assert isinstance(event, utils.CEvent)
self.title = event.title
self.subtitle = ''
self.type_in_header = False
self.date = time.strftime("%d %B %Y", time.localtime())
self.contact = 'http://music.cambridgeny.net/event/%s' % event.name
self.name = 'event-%s' % event.name
self.url = 'event/%s' % event.name
self.pages = []
for tunes in event.sets:
page_tunes = tunes.split('&')
title = [self.title, self.date]
title = [t.strip() for t in title]
title = '%s - %s' % tuple(title)
tuneset = utils.CTuneSet(page_tunes, title, self.contact, '')
self.pages.append(tuneset)