-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildFromRandom.py
executable file
·620 lines (562 loc) · 22.8 KB
/
buildFromRandom.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
#!/usr/bin/python3
__author__ = "Gabriel Chandesris"
__copyright__ = "CC Gabriel Chandesris (2021)"
__credits__ = ""
__licence__ = "GNU GENERAL PUBLIC LICENSE v3"
__version__ = "1.0.0"
__maintainer__ = "Gabriel Chandesris"
__email__ = "gabywald[at]laposte.net"
__contact__ = "gabywald[at]laposte.net"
__status__ = "Development"
from Personnae import Personnae
import BiographicDataLoadAndSelect
from BiographicDataLoadAndSelect import BiographicDataLoad
from BiographicDataLoadAndSelect import selectRandomBiographic
from BiographicDataLoadAndSelect import selectBiographicElements
biotables = BiographicDataLoad.loadBiographicsTables()
jobs = BiographicDataLoad.loadJobsToSkills()
skills = BiographicDataLoad.loadSkills()
## numberOfResults = 10
## res = selectBiographicElements( numberOfResults )
## for elt in res :
## print( "%s " %( elt.contents[1] ) )
## Créer personnae + comparer avec script initial en Perl
personnaeToOuput = Personnae()
## Etape 1: Imaginer un concept
concept = None
while( (concept == None) or (concept == "") ):
print("\t **** Concept ***** ")
concept = str(input())
concept = concept.strip()
print("\t\t Concept: {", concept, "}")
personnaeToOuput.concept = concept
personnaeToOuput.title = concept
## Sexe / genre
print("\t **** Sexe ***** "); ## TODO externalize sexes in a configuration file !
sexes = ( "Indéterminé-e", "Femme", "Homme" );
i = 0;
for sex in sexes:
print("\t\t (", (i+1), ")-{", sex, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selection = sexes[choice-1];
print("\t\t Selected {", selection, "}")
personnaeToOuput.sexe = selection
## Nom
name = None
while( (name == None) or (name == "") ):
print("\t **** Nom ***** ")
name = str(input())
name = name.strip()
print("\t\t Nom: {", name, "}")
personnaeToOuput.name = name
## Etape 2: Scores de caractéristiques
## ## Caractéristiques Score Dérivée
## ## Apparence 3D6 Prestance = APP x5%
## ## Constitution 3D6 Endurance = CON x5%
## ## Dextérité 3D6 Agilité = DEX x5%
## ## Force 3D6 Puissance = FOR x5%
## ## Taille 2D6+6 Corpulence = TAI x5%
## ## Éducation 3D6+6 Connaissance = EDU x5%
## ## Intelligence 2D6+6 Intuition = INT x5%
## ## Pouvoir 3D6 Volonté = POU x5%
## NOTE XXX 'randomizer' avec tirage de dés
import re, random
def randomizer( whatdices ):
result = re.match("^([0-9])D([0-9]+)\+?([0-9]+)?$", whatdices)
multi = 0;
kind = 0;
adder = 0;
if (result != None):
multi = result.group(1);
kind = result.group(2);
adder = result.group(3);
value = 0
while (value <= 8):
for i in range(int(multi)):
value += random.randint(1, int(kind))
if (adder != None):
value += int(adder)
return value
else:
print("\t ??{", whatdices, "} ??")
return 0
APP = randomizer("3D6")
CON = randomizer("3D6")
DEX = randomizer("3D6")
FOR = randomizer("3D6")
TAI = randomizer("2D6+6")
EDU = randomizer("3D6+6")
INT = randomizer("2D6+6")
POU = randomizer("3D6")
print( "\t **** Attributs ***** " )
validateAttributes = None
while (validateAttributes == None):
print( "\t\t APP: (", APP, ")")
print( "\t\t CON: (", CON, ")")
print( "\t\t DEX: (", DEX, ")")
print( "\t\t FOR: (", FOR, ")")
print( "\t\t TAI: (", TAI, ")")
print( "\t\t EDU: (", EDU, ")")
print( "\t\t INT: (", INT, ")")
print( "\t\t POU: (", POU, ")")
print( "\t Valider ? [y/N]")
validateAttributes = str(input());
validateAttributes = validateAttributes.strip()
if ( (validateAttributes == "Y") or (validateAttributes == "y") ):
validateAttributes = "y"
else:
validateAttributes = "N"
print("\t\t Validation: {" + validateAttributes + "}")
attributesDetection = "(APP|CON|DEX|FOR|TAI|EDU|INT|POU)";
if ( validateAttributes != "y" ):
validateAttributes = None
print("\t Nouveau tirage ? [All|XXX|n]")
newTirage = str(input());
newTirage = newTirage.strip()
print("\t\t newTirage: {" + newTirage + "}")
resutirage = re.match(attributesDetection, newTirage)
if (newTirage == "All"):
APP = randomizer("3D6")
CON = randomizer("3D6")
DEX = randomizer("3D6")
FOR = randomizer("3D6")
TAI = randomizer("2D6+6")
EDU = randomizer("3D6+6")
INT = randomizer("2D6+6")
POU = randomizer("3D6")
elif (resutirage != None):
resutiragegroup1 = resutirage.group(1)
print("\t => {" + resutiragegroup1 + "}")
if (resutiragegroup1 == "APP"):
APP = randomizer("3D6")
elif (resutiragegroup1 == "CON"):
CON = randomizer("3D6")
elif (resutiragegroup1 == "DEX"):
DEX = randomizer("3D6")
elif (resutiragegroup1 == "FOR"):
FOR = randomizer("3D6")
elif (resutiragegroup1 == "TAI"):
TAI = randomizer("2D6+6")
elif (resutiragegroup1 == "EDU"):
EDU = randomizer("3D6+6")
elif (resutiragegroup1 == "INT"):
INT = randomizer("2D6+6")
elif (resutiragegroup1 == "POU"):
POU = randomizer("3D6")
else:
exchange = None;
resutirage = None
while ( resutirage == None ):
print("\t Echange valeurs [XXX:YYY:{0-9}+|n]")
exchange = str(input())
exchange = exchange.str()
print("\t\t exchange: {" + exchange + "}")
if ( (resutirage.group(1) != "N") and (resutirage.group(1) != "n") ):
first = resutirage.group(1)
secon = resutirage.group(2)
value = int(resutirage.group(3))
print("\t\t first: [" + first + "]")
print("\t\t secon: [" + secon + "]")
print("\t\t value: [" + value + "]")
if (first == "APP"):
APP -= value
elif (first == "CON"):
CON -= value
elif (first == "DEX"):
DEX -= value
elif (first == "FOR"):
FOR -= value
elif (first == "TAI"):
TAI -= value
elif (first == "EDU"):
EDU -= value
elif (first == "INT"):
INT -= value
elif (first == "POU"):
POU -= value
if (secon == "APP"):
APP += value
elif (secon == "CON"):
CON += value
elif (secon == "DEX"):
DEX += value
elif (secon == "FOR"):
FOR += value
elif (secon == "TAI"):
TAI += value
elif (secon == "EDU"):
EDU += value
elif (secon == "INT"):
INT += value
elif (secon == "POU"):
POU += value
personnaeToOuput.app = str(APP)
personnaeToOuput.con = str(CON)
personnaeToOuput.dex = str(DEX)
personnaeToOuput.force = str(FOR)
personnaeToOuput.tai = str(TAI)
personnaeToOuput.edu = str(EDU)
personnaeToOuput.int = str(INT)
personnaeToOuput.pou = str(POU)
## Etape 3: Autres valeurs
## ## Aplomb = 0
## ## Santé Mentale (SAN) = POU x5%
## ## Points de Vie = (CON + TAI) / 2, arrondi à l'entier supérieur
## ## Seuil de Blessure = Points de Vie / 2, arrondi à l'entier inférieur
## ## Points de Magie = POU
## ## Impact = voir la table ci-dessous
## ## ## ## FOR+TAI Impact
## ## ## ## 02 à 12 -4
## ## ## ## 13 à 16 -2
## ## ## ## 17 à 24 0
## ## ## ## 25 à 32 +2
## ## ## ## 33 à 40 +4
aplomb = 0;
SAN = POU*5;
print("\t\t SAN: {", SAN, "}")
PV = int( (CON + TAI) / 2 );
if ( (CON + TAI) % 2 == 1):
PV += 1
print("\t\t PV-: {", PV, "}")
seuilBL = int( PV / 2 )
print("\t\t sBL: {", seuilBL, "}")
impact = (FOR + TAI);
if ( (impact >= 2) and (impact <= 12) ):
impact = "-4"
elif ( (impact >= 13) and (impact <= 16) ):
impact = "-2"
elif ( (impact >= 17) and (impact <= 24) ):
impact = "0"
elif ( (impact >= 25) and (impact <= 32) ):
impact = "+2"
elif ( (impact >= 33) and (impact <= 40) ):
impact = "+4"
print("\t\t imp: {", impact, "}")
personnaeToOuput.san = str(SAN)
personnaeToOuput.pv = str(PV)
personnaeToOuput.impact = impact
## TODO ++ aplomb
## TODO ++ seuil de blessure ?
## ## ## Competences Métier : EDU*20 (%)
countJobTalent = 0;
countJobMaxims = EDU*20;
## ## ## Compétences intérêt perso : INT*10 (%)
countPersoTalent = 0;
countPersoMaxims = INT*10;
## Préparation Étape 4 : générer biographie
## ## ## quelques variables pour retenir des éléments supplémentaires liés à la biographie...
## ... preparing and function for biographic details
## Etape 4: Choisir une occupation : choix métier + répartir EDU*20 (et au moins une à 60%)
print("\t **** Age de base ***** ")
validateAge = None;
while ( validateAge == None ):
tirageAge = random.randint(1, 6)
if (tirageAge == 1):
age = 12 + random.randint(1, 16-12+1);
argent = random.randint(1, 6)*2000;
count4biog = 3;
elif ( (tirageAge == 2) or (tirageAge == 3) ):
age = 17 + random.randint(1, 30-17+1);
argent = random.randint(1, 6)*1000 + 10000;
count4biog = 6;
elif ( (tirageAge == 4) or (tirageAge == 5) ):
age = 30 + random.randint(1, 50-30+1);
argent = random.randint(1, 6)*2000 + 30000;
count4biog = 6;
elif (tirageAge == 6):
age = 50 + random.randint(1, 20);
argent = random.randint(1, 6)*2000 + 5000;
count4biog = 8;
print("\t\t Age: ", age, " ans. ")
print("\t\t Fortune: ", argent, " euros. ")
if (age < (EDU+6)):
print("\t WARN \"Age < (EDU+6)\" ! => [", age, "] < [", (EDU+6), "] WARN !")
print("\t Valider ? [y/N]")
validateAge = str(input()).strip()
if ( (validateAge == "Y") or (validateAge == "y") ):
validateAge = "Y"
else:
validateAge = None
personnaeToOuput.age = str(age)
personnaeToOuput.argent = str(argent) ## NOTE : can be modified later !!
print("\t **** Biographie ***** ");
biographicElements = [];
while (len(biographicElements) < count4biog):
tables = BiographicDataLoad.loadBiographicsTables()
beToShowKeep = selectRandomBiographic( tables ) ## BiographicDataLoad.getARandomElementBIOGRAPHIC()
print("\t\t ", beToShowKeep.toString() )
print("\t Conserver ? [Y/n]")
validateBio = str(input())
validateBio.strip()
if ( (validateBio != "N") and (validateBio != "n") ):
biographicElements.append( beToShowKeep )
bdl = BiographicDataLoad()
allowedJob = {}
metiers = bdl.loadJobsToSkills() ## {}
talents = bdl.loadSkills() ## {}
equipments = bdl.loadEquipmentTables() ## {}
godfathers = {}
greatTales = {}
cyberequips = []
cailloux = []
programmes = []
debtsToTo = []
debtsFrom = []
for metier in metiers.keys():
allowedJob[ metier ] = 0
godfathers[ metier ] = 0
print("\t **** Biographie ++ processing ***** ");
for bioELT in biographicElements:
print("\t\t ", bioELT.toString() )
personnaeToOuput.lightbio.append( bioELT.toString() );
addins = bioELT.addins
for addin in addins:
print("\t\t\t [", addin, "]" )
splitColon = addin.split(':')
if (len(splitColon) > 1):
first = splitColon[0];
second = splitColon[1];
if (first == "talent"):
competences = []
if (second == "*"):
competences = sorted(talents.keys())
else:
parse = second.split('=')
metier = parse[0];
select = parse[1];
print("\t\t => [", metier, "]")
if (metier in metiers.keys()):
if (select == "*"):
competences = metiers[ metier ].skills
elif (select == "all"):
for comp in competences:
greatTales[ comp ] = 50
## TODO affiner selection ?
else:
competences = metiers[ metier ]
else:
print("\t\t JOB [", metier, "] has NO talents DEFINED !!!!!" )
competences.append( "Connaissance du milleu -" + metier + "-" )
if (len(competences) > 0):
## Choix de compétence / talent...
print("\t\t ***** Choix parmi : ")
i = 0;
for comp in competences:
print("\t\t (", (i+1), ")-{", comp, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selection = competences[choice-1];
BiographicDataLoadAndSelect.addToGreatTalent(talents, greatTales, selection, 50, 10)
countPersoTalent += 50
elif (first == "debtTo"):
print("\t\t Debt TO {", second, "} added. ")
debtsToTo.append( second )
elif (first == "debtFrom"):
print("\t\t Debt FROM {", second, "} added. ")
debtsFrom.append( second )
elif (first == "credit"):
resSecond = re.match("^([+-]?)(\d+)$", second)
if (resSecond != None):
sum = int( resSecond.group(2) );
if (resSecond.group(1) == ""):
argent = sum
elif (resSecond.group(1) == "-"):
argent -= sum
elif (resSecond.group(1) == "+"):
argent += sum
print("\t\t Money is now [", argent, "]")
else:
print("\n\nUNKNOWN CREDIT FORM={[", second, "]}\n")
elif (first == "Parrain"):
print("\t\t Parrain {", second, "} added. ")
if (second in godfathers.keys()):
godfathers[ second ] += 1
else:
godfathers[ second ] = 1
elif (first == "logiciel"):
print("\t\t software {", second, "} added. ")
programmes.append( second )
elif (first == "métier"):
parse = second.split('=')
metier = parse[0]
if (metier in allowedJob.keys()):
allowedJob[ metier ] += int(parse[1])
else:
allowedJob[ metier ] = int(parse[1])
print("\t\t Job {", metier, "} at level [", allowedJob[ metier ], "]. ")
else:
print("\n\nUNKNOWN FIRST={[", first, "]}\n")
else:
if (addin == "EquipementCybernetique=*"):
be = None;
validateBE = None;
while( (validateBE == "N") or (validateBE == "n") ):
tables = BiographicDataLoad.loadEquipmentTables()
be = selectBiographicElements( tables ) ## BiographicDataLoad.getARandomElementBIOGRAPHIC()
print("\t Gain équipement: {", be.toString(), "}")
print("\t Conserver ? [Y/n]")
validateBE = str(input())
cyberequips.append( be )
elif (addin == "EquipementCybernetique=BrocheTypeC"):
cyberequips.append( "Broche de Type C" )
elif (addin == "cablage=*[except total]"):
cablages = []
cablages.extend( equipments[ "Cablage-de-combat" ].contents )
cablages.extend( equipments[ "Cablage-auditif"].contents )
print("\t\t ***** Choix parmi : ")
i = 0;
for comp in cablages:
print("\t\t (", (i+1), ")-{", comp, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selection = cablages[ choice - 1 ];
print("\t\t Selected {", selection, "}")
cyberequips.append( selection )
elif (addin == "Cailloux=Onirogramme[6]"):
cailloux.append("Onirogramme[6]")
elif (addin == "EquilibrePsychique-=1"):
SAN -= random.randint(1, 10)
personnaeToOuput.san = SAN
## TODO changer aplomb ?! => +1
elif (addin == "EquilibrePsychique=1"):
SAN = random.randint(1, 20)
personnaeToOuput.san = SAN
## TODO changer aplomb ?! => +2
elif (addin == "Esprit-=1"):
POU -= random.randint(1, 10);
personnaeToOuput.pou = pou
## TODO changer aplomb ?! => +2
elif (addin == "ConnaissanceMedias=+1"):
compet = "Connaissance des Médias";
BiographicDataLoadAndSelect.addToGreatTalent(talents, greatTales, compet, 30, 30)
countPersoTalent += 30;
elif (addin == "Onirisme=+1"):
compet = "Onirisme";
BiographicDataLoadAndSelect.addToGreatTalent(talents, greatTales, compet, 30, 30)
countPersoTalent += 30;
elif (addin == "Onirisme=+2"):
compet = "Onirisme";
BiographicDataLoadAndSelect.addToGreatTalent(talents, greatTales, compet, 60, 60)
countPersoTalent += 60;
else:
print("TODO PARSE {[", addin, "]} !!!!! ")
personnaeToOuput.cyberequipement = equipments
personnaeToOuput.cailloux = cailloux
personnaeToOuput.programs = programmes
divers = ""
for debtTo in debtsToTo:
divers += "Dette envers " + debtTo + ". "
for debtFr in debtsFrom:
divers += "Dette de " + debtFr + ". "
if (divers == ""):
divers = "---"
personnaeToOuput.divers = divers
personnaeToOuput.argent = str(argent)
print("\t **** Choix Parrain ***** ")
possibleGDs = [];
for keyGD in (sorted(godfathers.keys())):
localCount = godfathers[ keyGD ]
if (localCount > 0):
print("\t\t {", keyGD, "}\t(", godfathers[ keyGD], ")")
possibleGDs.append( keyGD )
if (len(possibleGDs) > 0):
possibleGDs.append("---")
i = 0;
for parrain in possibleGDs:
print("\t\t (", (i+1), ")-{", parrain, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selection = possibleGDs[ choice-1 ];
print("\t\t Selected {", selection, "}")
personnaeToOuput.parrain = selection
else:
print("\t Pas de choix possible !")
personnaeToOuput.parrain = "---"
## METIER
print("\t **** Choix métier + talents / compétences ***** ")
possibleJOBs = []
for keyJOB in (sorted(allowedJob.keys())):
localCount = allowedJob[ keyJOB ]
if (localCount > 0):
print("\t\t {", keyJOB, "} recommended (", localCount, "). ")
possibleJOBs.append( keyJOB )
elif (localCount < 0):
print("\t\t {", keyJOB, "} not permitted (", localCount, "). ")
if (len(possibleJOBs) == 0):
for keyJOB in (sorted(allowedJob.keys())):
localCount = allowedJob[ keyJOB ]
if (localCount >= 0):
possibleJOBs.append( keyJOB )
if (len(possibleJOBs) >= 0):
i = 0
for job in possibleJOBs:
print("\t\t (", (i+1), ")-{", job, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selection = possibleJOBs[choice-1];
print("\t\t Selected {", selection, "}")
personnaeToOuput.metier = selection
## appliquer talents (!! CyberTek : choisir compétences) choix de la compétence à 70% !
CTcomps = []
if (selection == "CyberTek"):
tmpComps = metiers[ selection ].skills
CTcomps = []
while (len(CTcomps) < 4):
print("\t **** CyberTek : Choisir quatre compétences ! (", len(CTcomps), "/4)")
i = 0;
for comp in tmpComps:
print("\t\t (", (i+1), ")-{", comp, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selectedComp = tmpComps[choice-1];
print("\t\t Selected {", selectedComp, "}")
CTcomps.append( selectedComp )
competences = []
if (selection == "CyberTek"):
competences = CTcomps
else:
competences = metiers[ selection ].skills
print("\t **** Compétence majeure ? ")
i = 0;
for comp in competences:
print("\t\t (", (i+1), ")-{", comp, "}")
i += 1
choice = BiographicDataLoadAndSelect.choiceWithIn(i)
selectedComp = competences[choice-1];
print("\t\t Selected {", selectedComp, "}")
BiographicDataLoadAndSelect.addToGreatTalent(talents, greatTales, selectedComp, 60, 60, 1) ## +20%
countJobTalent += 60;
## 'majeure' à 60% : autres à 50%
for comp in competences:
if (comp != selectedComp):
BiographicDataLoadAndSelect.addToGreatTalent(talents, greatTales, selectedComp, 50, 50, 1) ## +10%
countJobTalent += 50;
else:
print("...")
else:
print("\t Pas de choix possible !")
personnaeToOuput.metier( "--- ??" )
print("\t **** Compilation talents / compétences ***** ")
talentsProjection = []
for talentName in (sorted(greatTales.keys())):
talentsProjection.append(talentName + "\t" + str(greatTales[ talentName ]))
personnaeToOuput.talents.extend( talentsProjection )
## Etape 5: Les Compétences d'intérêts personnels (INT*10% ailleurs) => indiquer valeur
remain4job = "For Job, max was [" + str(countJobMaxims) + "] (EDU*20), used [" + str(countJobTalent) + "], remain [" + str(countJobMaxims - countJobTalent) + "]";
remain4per = "For Perso, max was [" + str(countPersoMaxims) + "] (INT*10), used [" + str(countPersoTalent) + "], remain [" + str(countPersoMaxims - countPersoTalent) + "]";
personnaeToOuput.addLightBiography( remain4job )
personnaeToOuput.addLightBiography( remain4per )
print( remain4job )
print( remain4per )
## Etape 6: Finitions
import os
if not os.path.exists("../generated"):
os.makedirs("../generated")
outputFile = concept + "-" + name;
outputFile = re.sub(" ", "", outputFile)
outputFile = "../generated/personnae" + outputFile + ".txt";
with open(outputFile, "w", encoding = "utf-8") as file:
file.write( personnaeToOuput.toStringPersonnae() )
os.system( "../convertLaTeXChars.pl " + outputFile);
## ## ## ...