Skip to content

Commit

Permalink
Start YnO9. Need to move this to config ((
Browse files Browse the repository at this point in the history
  • Loading branch information
Himura2la committed Aug 29, 2019
1 parent 6e0def0 commit 4e80b2b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions etc/tickets-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@

types = {
'01': {
'descr': 'Билет\n"Тануки"',
'image': 'tanuki.jpg',
'start': 397,
'total': 108
'descr': 'Билет «Тануки»',
'image': '1. Тануки.jpg',
'start': 300,
'total': 60
},
'02': {
'descr': 'Билет\n"Кицунэ"',
'image': 'kitsune.jpg',
'start': 346,
'total': 72
'descr': 'Билет «Кицунэ»',
'image': '2. Кицунэ.jpg',
'start': 300,
'total': 30
},
'03': {
'descr': 'VIP Билет\n"Ооками"',
'image': 'ookami.jpg',
'start': 337,
'total': 36
'descr': 'VIP Билет «Ооками»',
'image': '3. Оками.jpg',
'start': 300,
'total': 50
}
}

image_base_path = r'D:\Clouds\YandexDisk\Fests\Yuki no Odori 8\design\Tickets\krol'
target_csv_path = f'D:\Clouds\YandexDisk\Fests\Yuki no Odori 8\design\Tickets\Print5\\tickets-%s.csv'
image_base_path = r'D:\Clouds\YandexDisk\Fests\Yuki no Odori\Кроли\Билетные кроли'
target_csv_path = r'D:\Clouds\YandexDisk\Fests\Yuki no Odori 9\Tickets\%s.csv'
pool = ['A', 'B', 'D', 'E', 'F', 'H', 'K', 'L', 'M', 'P', 'R', 'S', 'T', 'U', 'V', 'X', 'Y', 'Z'] + \
[chr(ord('1') + i) for i in range(9)]

Expand All @@ -40,11 +40,11 @@ def make_codes(how_many):
target_csv_path = target_csv_path % datetime.now().strftime('%y%m%d%H%M%S')
report = {}

with open(target_csv_path, 'w', encoding='utf-8', newline='') as f:
with open(target_csv_path, 'w', encoding='utf-16', newline='') as f:
w = csv.writer(f, delimiter=',', quotechar='"')
w.writerow([
'ds'
, 'code'
# 'ds',
'code'
, 'ser'
, 'num'
, 'descr'
Expand All @@ -55,8 +55,8 @@ def make_codes(how_many):
for i, code in enumerate(make_codes(data['total'])):
num = data['start'] + i
row = [
f"{ser}-{num}"
, code
# f"{ser}-{num}",
code
, ser
, num
, data['descr']
Expand Down

0 comments on commit 4e80b2b

Please sign in to comment.