Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OrchestralLily
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Edition Kainhofer
OrchestralLily
Commits
ff48f796
Commit
ff48f796
authored
12 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Create definitions file for my webshop script
parent
0ad22691
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Templates/EK_Full/webshop_descriptions.def
+17
-0
17 additions, 0 deletions
Templates/EK_Full/webshop_descriptions.def
generate_oly_score.py
+54
-24
54 additions, 24 deletions
generate_oly_score.py
oly_defs.py
+70
-0
70 additions, 0 deletions
oly_defs.py
with
141 additions
and
24 deletions
Templates/EK_Full/webshop_descriptions.def
0 → 100644
+
17
−
0
View file @
ff48f796
{
"title": u"<<shortcomposer|default(composer)>>: << title >>, << subtitle >>",
"Short_Description_en": u"",
"Short_Description_de": u"",
"Description_de": u'''<p></p>''',
"Description_en": u'''<p></p>''',
"Category": u"",
"Child_Products": {
<$- for e in webshop_editions $>
"<< e.sku >>": {"ismn": "<<e.ismn>>", "comment": "<<e.comment>>", "price": <<e.price|default(0.00)>>}, # << e.type >>
<$- endfor $>
},
}
This diff is collapsed.
Click to expand it.
generate_oly_score.py
+
54
−
24
View file @
ff48f796
...
@@ -41,6 +41,29 @@ def help (text):
...
@@ -41,6 +41,29 @@ def help (text):
def
import_file
(
filename
):
res
=
{}
try
:
in_f
=
codecs
.
open
(
filename
,
"
r
"
,
"
utf-8
"
)
s
=
in_f
.
read
()
in_f
.
close
()
res
=
eval
(
s
);
except
IOError
:
print
(
"
Unable to load file
'
%s
'
. Exiting...
"
%
filename
)
exit
(
-
1
);
except
SyntaxError
as
ex
:
print
ex
;
print
(
"
Unable to interpret settings file
'
%s
'
, it
'
s syntax is invalid. Exiting...
"
%
filename
);
exit
(
-
1
);
return
res
# Load the score type/number definitions from the oly directory
score_types
=
import_file
(
os
.
path
.
join
(
sys
.
path
[
0
],
"
oly_defs.py
"
));
######################################################################
######################################################################
# Settings
# Settings
######################################################################
######################################################################
...
@@ -144,18 +167,7 @@ class Settings:
...
@@ -144,18 +167,7 @@ class Settings:
return
"
oly_structure.def
"
;
return
"
oly_structure.def
"
;
def
load
(
self
,
filename
):
def
load
(
self
,
filename
):
try
:
self
.
raw_data
=
import_file
(
filename
)
in_f
=
codecs
.
open
(
filename
,
"
r
"
,
"
utf-8
"
)
s
=
in_f
.
read
()
in_f
.
close
()
self
.
raw_data
=
eval
(
s
);
except
IOError
:
print
(
"
Unable to load settings file
'
%s
'
. Exiting...
"
%
file_name
)
exit
(
-
1
);
except
SyntaxError
as
ex
:
print
ex
;
print
(
"
Unable to interpret settings file
'
%s
'
, it
'
s syntax is invalid. Exiting...
"
%
filename
);
exit
(
-
1
);
if
not
self
.
out_dir
:
if
not
self
.
out_dir
:
self
.
out_dir
=
self
.
raw_data
.
get
(
"
output_dir
"
,
self
.
out_dir
)
+
"
/
"
;
self
.
out_dir
=
self
.
raw_data
.
get
(
"
output_dir
"
,
self
.
out_dir
)
+
"
/
"
;
...
@@ -514,18 +526,34 @@ def generate_make_files (settings, lily_files, tex_files):
...
@@ -514,18 +526,34 @@ def generate_make_files (settings, lily_files, tex_files):
# movements = settings.get ("parts", {});
#
######################################################################
# replacements["instruments"] = string.join (settings.get ("instruments", []));
# Creating webshop_descriptions.def
# replacements["scores"] = string.join (settings.get ("scores", []))## + " Instruments";
######################################################################
# replacements["srcfiles"] = string.join (src_files);
#
def
generate_webshop_files
(
settings
,
lily_files
,
tex_files
):
# write_file (output_dir + "Makefile", templates["Makefile"] % replacements);
webshop_settings
=
settings
.
raw_data
.
copy
();
#
template
=
settings
.
get_template
(
"
webshop_descriptions.def
"
);
# del replacements["instruments"]
#basename = tex_settings.get ("basename", "");
# del replacements["scores"]
#print pp.pprint(settings.raw_data);
# del replacements["srcfiles"]
#print pp.pprint(settings.score_names ())
# return;
scores
=
[];
noscore_instruments
=
webshop_settings
.
get
(
"
noscore_instruments
"
,
[])
for
s
in
settings
.
score_names
():
score_settings
=
settings
.
get_score_settings
(
s
);
for
i
in
score_settings
.
get
(
"
scores
"
,
[])
+
[
"
Instruments
"
]
+
score_settings
.
get
(
"
instruments
"
,
[]):
if
i
in
noscore_instruments
:
continue
;
score_info
=
score_types
.
get
(
i
,
{});
score_type
=
score_info
.
get
(
"
Name
"
,
""
);
score_id
=
score_info
.
get
(
"
Number
"
,
"
XXX
"
);
scores
.
append
({
"
sku
"
:
score_settings
.
get
(
"
scorenumber
"
)
+
"
-
"
+
score_id
,
"
type
"
:
score_type
});
webshop_settings
[
"
webshop_editions
"
]
=
scores
;
file
=
write_file
(
settings
.
out_dir
,
"
webshop_descriptions.def
"
,
template
.
render
(
webshop_settings
));
######################################################################
######################################################################
...
@@ -557,6 +585,8 @@ def main ():
...
@@ -557,6 +585,8 @@ def main ():
tex_files
=
generate_tex_files
(
settings
,
lily_files
);
tex_files
=
generate_tex_files
(
settings
,
lily_files
);
print
(
"
Creating OrchestralLily package link
"
)
print
(
"
Creating OrchestralLily package link
"
)
generate_oly_link
(
settings
);
generate_oly_link
(
settings
);
print
(
"
Creating webshop_descriptions.def
"
)
generate_webshop_files
(
settings
,
lily_files
,
tex_files
);
print
(
"
Creating Makefile
"
)
print
(
"
Creating Makefile
"
)
generate_make_files
(
settings
,
lily_files
,
tex_files
);
generate_make_files
(
settings
,
lily_files
,
tex_files
);
...
...
This diff is collapsed.
Click to expand it.
oly_defs.py
0 → 100644
+
70
−
0
View file @
ff48f796
{
"
Original
"
:
{
"
Name
"
:
"
Originalpartitur
"
,
"
Number
"
:
"
0
"
},
"
Full
"
:
{
"
Name
"
:
"
Partitur / Full score
"
,
"
Number
"
:
"
1
"
},
"
Long
"
:
{
"
Name
"
:
"
Partitur / Full score
"
,
"
Number
"
:
"
1a
"
},
"
Organ
"
:
{
"
Name
"
:
"
Orgelauszug / Organ score
"
,
"
Number
"
:
"
2
"
},
"
Vocal
"
:
{
"
Name
"
:
"
Klavierauszug / Vocal score
"
,
"
Number
"
:
"
2
"
},
"
Particell
"
:
{
"
Name
"
:
"
Vokalparticell / Vocal particell
"
,
"
Number
"
:
"
3
"
},
"
Choral
"
:
{
"
Name
"
:
"
Chorstimmen / Choral score
"
,
"
Number
"
:
"
10
"
},
"
SoloChoral
"
:
{
"
Name
"
:
"
Chorstimmen mit Soli / Choral score with solo parts
"
,
"
Number
"
:
"
15a
"
},
"
Solo
"
:
{
"
Name
"
:
"
Solostimmen / Solo parts
"
,
"
Number
"
:
"
15
"
},
"
Instruments
"
:{
"
Name
"
:
"
Orchesterstimmen
"
,
"
Number
"
:
"
25
"
},
"
Harmoniestimmen
"
:{
"
Name
"
:
"
Harmoniestimmen
"
,
},
"
Fl
"
:
{
"
Name
"
:
"
Flauti
"
,
"
Short
"
:
"
Fl.
"
,
"
Number
"
:
"
40
"
,
"
Type
"
:
""
},
"
FlI
"
:
{
"
Name
"
:
"
Flauto I
"
,
"
Short
"
:
"
Fl. I
"
,
"
Number
"
:
"
40
"
,
"
Type
"
:
""
},
"
FlII
"
:
{
"
Name
"
:
"
Flauto II
"
,
"
Short
"
:
"
Fl. II
"
,
"
Number
"
:
"
41
"
,
"
Type
"
:
""
},
"
Ob
"
:
{
"
Name
"
:
"
Oboi
"
,
"
Short
"
:
"
Ob.
"
,
"
Number
"
:
"
42
"
,
"
Type
"
:
""
},
"
ObI
"
:
{
"
Name
"
:
"
Oboe I
"
,
"
Short
"
:
"
Ob. I
"
,
"
Number
"
:
"
42
"
,
"
Type
"
:
""
},
"
ObII
"
:
{
"
Name
"
:
"
Oboe II
"
,
"
Short
"
:
"
Ob. II
"
,
"
Number
"
:
"
43
"
,
"
Type
"
:
""
},
"
Cl
"
:
{
"
Name
"
:
"
Clarinetti
"
,
"
Short
"
:
"
Cl.
"
,
"
Number
"
:
"
44
"
,
"
Type
"
:
""
},
"
ClI
"
:
{
"
Name
"
:
"
Clarinetto I
"
,
"
Short
"
:
"
Cl.I
"
,
"
Number
"
:
"
44
"
,
"
Type
"
:
""
},
"
ClII
"
:
{
"
Name
"
:
"
Clarinetto II
"
,
"
Short
"
:
"
Cl.II
"
,
"
Number
"
:
"
45
"
,
"
Type
"
:
""
},
"
Fag
"
:
{
"
Name
"
:
"
Fagotti
"
,
"
Short
"
:
"
Fag.
"
,
"
Number
"
:
"
46
"
,
"
Type
"
:
""
},
"
FagI
"
:
{
"
Name
"
:
"
Fagotto I
"
,
"
Short
"
:
"
Fag. I
"
,
"
Number
"
:
"
46
"
,
"
Type
"
:
""
},
"
FagII
"
:
{
"
Name
"
:
"
Fagotto II
"
,
"
Short
"
:
"
Fag. II
"
,
"
Number
"
:
"
47
"
,
"
Type
"
:
""
},
"
CFag
"
:
{
"
Name
"
:
"
Contrafagotto
"
,
"
Short
"
:
"
Cfag.
"
,
"
Number
"
:
"
48
"
,
"
Type
"
:
""
},
"
Cor
"
:
{
"
Name
"
:
"
Corni
"
,
"
Short
"
:
"
Cor.
"
,
"
Number
"
:
"
50
"
,
"
Type
"
:
""
},
"
CorI
"
:
{
"
Name
"
:
"
Corno I
"
,
"
Short
"
:
"
Cor.I
"
,
"
Number
"
:
"
50
"
,
"
Type
"
:
""
},
"
CorII
"
:
{
"
Name
"
:
"
Corno II
"
,
"
Short
"
:
"
Cor.II
"
,
"
Number
"
:
"
51
"
,
"
Type
"
:
""
},
"
Trb
"
:
{
"
Name
"
:
"
Tromboni
"
,
"
Short
"
:
"
Trb.
"
,
"
Number
"
:
"
54
"
,
"
Type
"
:
""
},
"
TrbI
"
:
{
"
Name
"
:
"
Trombone I
"
,
"
Short
"
:
"
Trb. I
"
,
"
Number
"
:
"
54
"
,
"
Type
"
:
""
},
"
TrbII
"
:
{
"
Name
"
:
"
Trombone II
"
,
"
Short
"
:
"
Trb. II
"
,
"
Number
"
:
"
55
"
,
"
Type
"
:
""
},
"
TrbIII
"
:
{
"
Name
"
:
"
Trombone III
"
,
"
Short
"
:
"
Trb. III
"
,
"
Number
"
:
"
56
"
,
"
Type
"
:
""
},
"
Tbe
"
:
{
"
Name
"
:
"
Trombe
"
,
"
Short
"
:
"
Tbe.
"
,
"
Number
"
:
"
52
"
,
"
Type
"
:
""
},
"
TbeI
"
:
{
"
Name
"
:
"
Tromba I
"
,
"
Short
"
:
"
Tbe.I
"
,
"
Number
"
:
"
52
"
,
"
Type
"
:
""
},
"
TbeII
"
:
{
"
Name
"
:
"
Tromba II
"
,
"
Short
"
:
"
Tbe.II
"
,
"
Number
"
:
"
53
"
,
"
Type
"
:
""
},
"
Clni
"
:
{
"
Name
"
:
"
Clarini
"
,
"
Short
"
:
"
Clni.
"
,
"
Number
"
:
"
52
"
,
"
Type
"
:
""
},
"
ClnoI
"
:
{
"
Name
"
:
"
Clarino I
"
,
"
Short
"
:
"
Clno.I
"
,
"
Number
"
:
"
52
"
,
"
Type
"
:
""
},
"
ClnoII
"
:
{
"
Name
"
:
"
Clarino II
"
,
"
Short
"
:
"
Clno.II
"
,
"
Number
"
:
"
53
"
,
"
Type
"
:
""
},
"
Tim
"
:
{
"
Name
"
:
"
Timpani
"
,
"
Short
"
:
"
Tim.
"
,
"
Number
"
:
"
60
"
,
"
Type
"
:
""
},
"
V
"
:
{
"
Name
"
:
"
Violino
"
,
"
Short
"
:
"
Vl.
"
,
"
Number
"
:
"
30
"
,
"
Type
"
:
""
},
"
VI
"
:
{
"
Name
"
:
"
Violino I
"
,
"
Short
"
:
"
V.I
"
,
"
Number
"
:
"
30
"
,
"
Type
"
:
""
},
"
VII
"
:
{
"
Name
"
:
"
Violino II
"
,
"
Short
"
:
"
V.II
"
,
"
Number
"
:
"
31
"
,
"
Type
"
:
""
},
"
Va
"
:
{
"
Name
"
:
"
Viola
"
,
"
Short
"
:
"
Va.
"
,
"
Number
"
:
"
32
"
,
"
Type
"
:
""
},
"
VaI
"
:
{
"
Name
"
:
"
Viola I
"
,
"
Short
"
:
"
Va.I
"
,
"
Number
"
:
"
32
"
,
"
Type
"
:
""
},
"
VaII
"
:
{
"
Name
"
:
"
Viola II
"
,
"
Short
"
:
"
Va.II
"
,
"
Number
"
:
"
32a
"
,
"
Type
"
:
""
},
"
VaSolo
"
:
{
"
Name
"
:
"
Viola Solo
"
,
"
Short
"
:
"
Va.Solo
"
,
"
Number
"
:
"
32a
"
,
"
Type
"
:
""
},
"
VcB
"
:
{
"
Name
"
:
"
Violoncello e Contrabbasso
"
,
"
Short
"
:
"
Vc. e B.
"
,
"
Number
"
:
"
33
"
,
"
Type
"
:
""
},
"
Vc
"
:
{
"
Name
"
:
"
Violoncello
"
,
"
Short
"
:
"
Vc.
"
,
"
Number
"
:
"
34
"
,
"
Type
"
:
""
},
"
Cb
"
:
{
"
Name
"
:
"
Basso
"
,
"
Short
"
:
"
B.
"
,
"
Number
"
:
"
35
"
,
"
Type
"
:
""
},
"
Ch
"
:
{
"
Name
"
:
"
Coro
"
,
"
Short
"
:
"
C.
"
,
"
Number
"
:
"
10
"
,
"
Type
"
:
""
},
"
Singstimme
"
:
{
"
Name
"
:
"
Singstimme
"
,
"
Number
"
:
"
15
"
,
"
Type
"
:
""
},
"
S
"
:
{
"
Name
"
:
"
Soprano
"
,
"
Short
"
:
"
S.
"
,
"
Number
"
:
"
11
"
,
"
Type
"
:
""
},
"
A
"
:
{
"
Name
"
:
"
Alto
"
,
"
Short
"
:
"
A.
"
,
"
Number
"
:
"
12
"
,
"
Type
"
:
""
},
"
T
"
:
{
"
Name
"
:
"
Tenore
"
,
"
Short
"
:
"
T.
"
,
"
Number
"
:
"
13
"
,
"
Type
"
:
""
},
"
B
"
:
{
"
Name
"
:
"
Basso
"
,
"
Short
"
:
"
B.
"
,
"
Number
"
:
"
14
"
,
"
Type
"
:
""
},
"
SSolo
"
:
{
"
Name
"
:
"
Soprano Solo
"
,
"
Short
"
:
"
S.Solo
"
,
"
Number
"
:
"
16
"
,
"
Type
"
:
""
},
"
TSolo
"
:
{
"
Name
"
:
"
Tenore Solo
"
,
"
Short
"
:
"
A.Solo
"
,
"
Number
"
:
"
17
"
,
"
Type
"
:
""
},
"
BSolo
"
:
{
"
Name
"
:
"
Basso Solo
"
,
"
Short
"
:
"
T.Solo
"
,
"
Number
"
:
"
18
"
,
"
Type
"
:
""
},
"
ASolo
"
:
{
"
Name
"
:
"
Alto Solo
"
,
"
Short
"
:
"
B.Solo
"
,
"
Number
"
:
"
19
"
,
"
Type
"
:
""
},
"
O
"
:
{
"
Name
"
:
"
Organo
"
,
"
Short
"
:
"
Org.
"
,
"
Number
"
:
"
20
"
,
"
Type
"
:
""
},
"
OI
"
:
{
"
Name
"
:
"
Organo I
"
,
"
Short
"
:
"
Org. I
"
,
"
Number
"
:
"
20
"
,
"
Type
"
:
""
},
"
OII
"
:
{
"
Name
"
:
"
Organo II
"
,
"
Short
"
:
"
Org. II
"
,
"
Number
"
:
"
21
"
,
"
Type
"
:
""
},
"
BC
"
:
{
"
Name
"
:
"
Basso Continuo
"
,
"
Short
"
:
"
B.C.
"
,
"
Number
"
:
"
21
"
,
"
Type
"
:
""
},
"
Organ
"
:
{
"
Name
"
:
"
Organo
"
,
"
Short
"
:
"
Org.
"
,
"
Number
"
:
"
20
"
,
"
Type
"
:
""
},
"
Continuo
"
:
{
"
Name
"
:
"
Organo
"
,
"
Short
"
:
"
Org.
"
,
"
Number
"
:
"
21
"
,
"
Type
"
:
""
},
"
P
"
:
{
"
Name
"
:
"
Piano
"
,
"
Short
"
:
"
Pfte.
"
,
"
Number
"
:
"
20a
"
,
"
Type
"
:
""
},
"
Tba
"
:
{
"
Number
"
:
"
57
"
,
"
Type
"
:
""
},
"
Arpa
"
:
{
"
Number
"
:
"
65
"
,
"
Type
"
:
""
},
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment