forked from Firehawke/a2softlist-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
newccgen
1165 lines (1148 loc) · 44 KB
/
newccgen
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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
# Remove and recreate the work directories so they're clean.
rm -rf newccoutput 2> /dev/null
rm -rf newccstaging 2> /dev/null
mkdir xml 2> /dev/null
mkdir xml/cc 2> /dev/null
mkdir postsorted 2> /dev/null
mkdir newccoutput 2> /dev/null
mkdir newccstaging 2> /dev/null
# Do the actual search and download.
echo -e "Beginning work on entry [$1].."
ia search '@4am subject:"crack"' --parameters="page=$1&rows=1" --sort="publicdate desc" -i > currentitems.txt
# Major change: output download URLs to currentdls.txt
ia download -d -i --no-directories --glob '*.xml|*.dsk|*.2mg|*.po|*.bin|*.woz|*crack).zip|*.BIN' --itemlist=currentitems.txt > currentdls.txt
# Let's remove the extras file and certain other unwanted materials
sed -i '/%20extras%20/d' currentdls.txt
sed -i '/0playable/d' currentdls.txt
sed -i '/_files.xml/d' currentdls.txt
sed -i "/demuffin\'d/d" currentdls.txt
sed -i '/work%20disk/d' currentdls.txt
# Now we download.
echo "Downloading..."
wget -q -i currentdls.txt -nc --show-progress -nd -P ./newccstaging
# Now let's decompress any ZIP files we got, forced lowercase names.
unzip -n -qq -LL -j "newccstaging/*.zip" -d newccoutput 2> /dev/null
# Before we go ANY further, let's clean up the .bin files into .2mg ...
cd newccstaging
# THIS use of rename is, unfortunately, Debian-specific. If you're using a
# different distro, you're going to have to modify this.
rename 's/.bin/.2mg/' *.bin 2> /dev/null
cd ..
# Move the meta XML and the disk images to the output folder for processing.
mv newccstaging/*.dsk newccoutput 2> /dev/null
mv newccstaging/*.po newccoutput 2> /dev/null
mv newccstaging/*.2mg newccoutput 2> /dev/null
cp newccstaging/*meta.xml newccoutput 2> /dev/null
cd newccoutput
# Remove stuff we don't want. We don't want to parse the playable.dsk because
# that's an exact copy of the properly named disk. We don't want pictures and
# videos in this case either.
rm 00playable.dsk 2> /dev/null
rm 00playable.2mg 2> /dev/null
rm playable.dsk 2> /dev/null
rm playable.2mg 2> /dev/null
rm 00playable2.dsk 2> /dev/null
rm *fastdsk\ rip\* 2> /dev/null
rm *.a2r 2> /dev/null
rm *.png 2> /dev/null
rm *.mp4 2> /dev/null
rm *.jpg 2> /dev/null
# These next two files seem to pop up a lot with MP4 files, which we don't want.
rm ProjFileList.xml 2> /dev/null
rm project.xml 2> /dev/null
# 4AM sometimes leaves his work disk in the package. We don't want to keep that.
rm *work\ disk* 2> /dev/null
rm *demuffin\'d* 2> /dev/null
# Remove any existing XML file with the same number so we start clean.
rm ../xml/cc/cc$1.xml 2> /dev/null
#Now we start parsing each XML, of which there GENERALLY should only be one.
for filename in *.xml; do
[ -e "$filename" ] || continue
# We'll have to handcraft the shortname ourselves.
echo -e '\t<software name="namehere">' >> ../xml/cc/cc$1.xml
echo -e -n '\t\t<description>' >> ../xml/cc/cc$1.xml
xmllint --xpath 'metadata/title/text()' "$filename" | tr -d '\n' >> ../xml/cc/cc$1.xml
echo -e '</description>' >> ../xml/cc/cc$1.xml
echo -e -n '\t\t<year>' >> ../xml/cc/cc$1.xml
xmllint --xpath 'metadata/description/text()' $filename | grep -o '19[0123456789][0123456789]' | tr -d '\n' >> ../xml/cc/cc$1.xml
echo -e '</year>' >> ../xml/cc/cc$1.xml
echo -e -n '\t\t<publisher>' >> ../xml/cc/cc$1.xml
xmllint --xpath 'metadata/description/text()' $filename | grep -o -a -i -F -f ../publishers.txt | tr -d '\n' | sed -e 's/distributed by //g' | sed -e 's/published by //g' | sed -e 's/\&amp;/and/g' >> ../xml/cc/cc$1.xml
echo -e '</publisher>' >> ../xml/cc/cc$1.xml
echo -e -n '\t\t<info name="release" value="' >> ../xml/cc/cc$1.xml
xmllint --xpath 'metadata/publicdate/text()' $filename | awk '{print $1}' | tr -d '\n' >> ../xml/cc/cc$1.xml
echo -e '"/>' >> ../xml/cc/cc$1.xml
echo -e -n '\t\t<!--' >> ../xml/cc/cc$1.xml
xmllint --xpath 'metadata/description/text()' $filename | tr -d '\n' >> ../xml/cc/cc$1.xml
echo -e -n '-->\n' >> ../xml/cc/cc$1.xml
done
# Now we start working on the disk images. Here's where things get a Little
# hairy. We need both the proper (possibly bad)-cased filename for tools, but
# we need a forced lowercase for the XML.
# Clrmamepro will rename files automagically so the the files are fine as-is;
# we won't be renaming.
disknum=1
for filename in *.po *.dsk *.2mg; do
[ -e "$filename" ] || continue
# Here we're generating a forced lowercase version of the name which we'll
# use in some places in the XML.
lfilename=$(echo "$filename" | tr '[:upper:]' '[:lower:]' )
echo -e "Generating disk $disknum with file $lfilename.."
# Critical: Check for SHA1 dupes.
# Generate the SHA1 and put it in temp.
sha1sum $filename | awk '{print $1}' > temp
# Show on-screen if we got a dupe.
#grep -a -i -F -n -R -f temp /mnt/c/msys64/src/mame/hash/apple2_flop*.xml
# If we got a dupe, put it in temp2, otherwise leave a 0-byte file.
grep -a -i -F -n -R -f temp /mnt/c/msys64/src/mame/hash/apple2_flop*.xml > temp2
if [[ -s temp2 ]]; then
echo "dupe" > dupecheck
fi
# Start outputting disk information.
echo -e -n '\t\t<part name="flop' >> ../xml/cc/cc$1.xml
echo -e -n $disknum >> ../xml/cc/cc$1.xml
echo -e -n '" interface="' >> ../xml/cc/cc$1.xml
# Now, is this a 5.25" or 3.5"?
# In the case of a .po it could technicaly be either, but...
case $lfilename in
*".po"*)
echo -e 'floppy_3_5">' >> ../xml/cc/cc$1.xml
;;
*".dsk"*)
echo -e 'floppy_5_25">' >> ../xml/cc/cc$1.xml
;;
*".2mg"*)
echo -e 'floppy_3_5">' >> ../xml/cc/cc$1.xml
;;
*".woz"*)
# WOZ can be either. We need to pull the data from the WOZ itself.
# According to the WOZ 2.0 spec, certain info is always hard-set
# location-wise to help lower-end emulators.
# The disk type should ALWAYS be at offset 21, and
# should be "1" for 5.25" and "2" for 3.5" disks.
disktype=$((16#$(xxd -e -p -l1 -s 21 "$filename")))
case $disktype in
*"2"*)
echo -e 'floppy_3_5">' >> ../xml/cc/cc$1.xml
;;
*)
echo -e 'floppy_5_25">' >> ../xml/cc/cc$1.xml
;;
esac
;;
esac
# Generate side/disk number information.
case $lfilename in
# "Disk X - Title" type
# e.g. "swordthrust (4am crack) disk 1 - the king's testing ground.dsk"
*"disk 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 3 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 3 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 4 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 4 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 5 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 5 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 6 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 6 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 7 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 7 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 8 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 8 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 9 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 9 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 10 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 10 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 11 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 11 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 12 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 12 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 13 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 13 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 14 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 14 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 15 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 15 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 16 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 16 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 17 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 17 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 18 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 18 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 19 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 19 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 20 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 20 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 21 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 21 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 22 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 22 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 23 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 23 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 24 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 24 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 25 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 25 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 26 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 26 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 27 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 27 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 28 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 28 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 29 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 29 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 30 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 30 - "/>' >> ../xml/cc/cc$1.xml
;;
# "Disk X" type
# e.g. "read and spell - in the days of knights and castles (4am crack) disk 1.dsk"
*"disk 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 3."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 3"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 4."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 4"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 5."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 5"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 6."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 6"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 7."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 7"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 8."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 8"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 9."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 9"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 10."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 10"/>' >> ../xml/cc/cc$1.xml
;;
# "Disk X Side X" type
# e.g. "read n roll (4am crack) disk 2 side a.dsk"
*"disk 1 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 1 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 1 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 1 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 2 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 2 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 2 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 2 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 3 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 3 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 3 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 3 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 4 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 4 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 4 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 4 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 5 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 5 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 5 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 5 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 6 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 6 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 6 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 6 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 7 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 7 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 7 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 7 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 8 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 8 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 8 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 8 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 9 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 9 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 9 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 9 Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 10 side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 10 Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk 10 side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk 10 Side B"/>' >> ../xml/cc/cc$1.xml
;;
# "Disk X" type
*"disk a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c."*)
echo -e '\t\t\t<feature name="part_id" value="Disk C"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d."*)
echo -e '\t\t\t<feature name="part_id" value="Disk D"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e."*)
echo -e '\t\t\t<feature name="part_id" value="Disk E"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f."*)
echo -e '\t\t\t<feature name="part_id" value="Disk F"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g."*)
echo -e '\t\t\t<feature name="part_id" value="Disk G"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h."*)
echo -e '\t\t\t<feature name="part_id" value="Disk H"/>' >> ../xml/cc/cc$1.xml
;;
*"disk i."*)
echo -e '\t\t\t<feature name="part_id" value="Disk I"/>' >> ../xml/cc/cc$1.xml
;;
*"disk j."*)
echo -e '\t\t\t<feature name="part_id" value="Disk J"/>' >> ../xml/cc/cc$1.xml
;;
*"disk k."*)
echo -e '\t\t\t<feature name="part_id" value="Disk K"/>' >> ../xml/cc/cc$1.xml
;;
*"disk l."*)
echo -e '\t\t\t<feature name="part_id" value="Disk L"/>' >> ../xml/cc/cc$1.xml
;;
*"disk m."*)
echo -e '\t\t\t<feature name="part_id" value="Disk M"/>' >> ../xml/cc/cc$1.xml
;;
*"disk n."*)
echo -e '\t\t\t<feature name="part_id" value="Disk N"/>' >> ../xml/cc/cc$1.xml
;;
*"disk o."*)
echo -e '\t\t\t<feature name="part_id" value="Disk O"/>' >> ../xml/cc/cc$1.xml
;;
*"disk p."*)
echo -e '\t\t\t<feature name="part_id" value="Disk P"/>' >> ../xml/cc/cc$1.xml
;;
*"disk q."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q"/>' >> ../xml/cc/cc$1.xml
;;
*"disk r."*)
echo -e '\t\t\t<feature name="part_id" value="Disk R"/>' >> ../xml/cc/cc$1.xml
;;
*"disk s."*)
echo -e '\t\t\t<feature name="part_id" value="Disk S"/>' >> ../xml/cc/cc$1.xml
;;
*"disk t."*)
echo -e '\t\t\t<feature name="part_id" value="Disk T"/>' >> ../xml/cc/cc$1.xml
;;
*"disk u."*)
echo -e '\t\t\t<feature name="part_id" value="Disk U"/>' >> ../xml/cc/cc$1.xml
;;
*"disk v."*)
echo -e '\t\t\t<feature name="part_id" value="Disk V"/>' >> ../xml/cc/cc$1.xml
;;
*"disk w."*)
echo -e '\t\t\t<feature name="part_id" value="Disk W"/>' >> ../xml/cc/cc$1.xml
;;
*"disk x."*)
echo -e '\t\t\t<feature name="part_id" value="Disk X"/>' >> ../xml/cc/cc$1.xml
;;
*"disk y."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y"/>' >> ../xml/cc/cc$1.xml
;;
*"disk z."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z"/>' >> ../xml/cc/cc$1.xml
;;
# "Disk X Side A/B" type
*"disk a side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk A Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk a side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk A Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk B Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk B Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk C Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk C Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk D Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk D Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk E Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk E Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk F Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk F Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk G Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk G Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk H Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk H Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk i side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk I Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk i side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk I Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk j side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk J Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk j side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk J Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk k side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk K Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk k side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk K Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk l side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk L Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk l side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk L Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk m side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk M Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk m side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk M Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk n side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk N Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk n side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk N Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk o side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk O Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk o side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk O Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk p side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk P Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk p side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk P Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk q side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk q side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk r side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk R Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk r side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk R Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk s side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk S Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk s side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk S Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk t side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk T Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk t side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk T Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk u side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk U Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk u side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk U Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk v side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk V Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk v side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk V Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk w side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk W Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk w side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk W Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk x side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk X Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk x side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk X Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk y side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk y side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y Side B"/>' >> ../xml/cc/cc$1.xml
;;
*"disk z side a."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z Side A"/>' >> ../xml/cc/cc$1.xml
;;
*"disk z side b."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z Side B"/>' >> ../xml/cc/cc$1.xml
;;
# "Disk X Side X" type
# e.g. "the perfect score (4am crack) disk a side 1 - antonyms i.dsk"
*"disk a side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk A Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk a side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk A Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk b side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk B Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk b side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk B Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk c side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk C Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk c side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk C Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk d side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk D Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk d side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk D Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk e side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk E Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk e side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk E Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk f side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk F Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk f side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk F Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk g side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk G Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk g side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk G Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk h side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk H Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk h side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk H Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk i side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk I Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk i side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk I Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk j side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk J Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk j side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk J Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk k side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk K Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk k side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk K Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk l side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk L Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk l side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk L Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk m side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk M Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk m side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk M Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk n side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk N Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk n side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk N Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk o side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk O Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk o side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk O Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk p side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk P Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk p side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk P Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk q side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk q side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk r side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk R Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk r side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk R Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk s side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk S Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk s side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk S Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk t side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk T Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk t side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk T Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk u side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk U Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk u side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk U Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk v side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk V Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk v side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk V Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk w side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk W Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk w side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk W Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk x side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk X Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk x side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk X Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk y side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk y side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk z side 1 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z Side 1 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk z side 2 -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z Side 2 - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk a side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk A Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk a side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk A Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk B Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk B Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk C Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk C Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk D Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk D Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk E Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk E Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk F Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk F Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk G Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk G Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk H Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk H Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk i side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk I Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk i side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk I Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk j side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk J Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk j side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk J Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk k side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk K Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk k side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk K Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk l side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk L Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk l side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk L Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk m side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk M Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk m side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk M Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk n side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk N Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk n side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk N Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk o side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk O Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk o side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk O Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk p side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk P Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk p side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk P Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk q side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk q side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Q Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk r side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk R Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk r side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk R Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk s side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk S Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk s side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk S Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk t side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk T Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk t side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk T Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk u side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk U Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk u side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk U Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk v side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk V Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk v side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk V Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk w side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk W Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk w side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk W Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk x side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk X Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk x side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk X Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk y side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk y side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Y Side 2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk z side 1."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z Side 1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk z side 2."*)
echo -e '\t\t\t<feature name="part_id" value="Disk Z Side 2"/>' >> ../xml/cc/cc$1.xml
;;
# "Disk X Side X - Title" type
# e.g. "superprint (4am crack) disk 1 side a - program.dsk"
*"disk 1 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 1 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 1 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 1 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 2 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 2 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 2 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 2 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 3 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 3 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 3 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 3 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 4 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 4 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 4 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 4 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 5 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 5 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 5 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 5 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 6 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 6 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 6 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 6 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 7 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 7 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 7 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 7 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 8 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 8 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 8 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 8 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 9 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 9 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 9 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 9 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 10 side a -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 10 Side A - "/>' >> ../xml/cc/cc$1.xml
;;
*"disk 10 side b -"*)
echo -e '\t\t\t<feature name="part_id" value="Disk 10 Side B - "/>' >> ../xml/cc/cc$1.xml
;;
# Disk Side-Number.
# e.g. "reading workshop - running free (4am crack) disk a-1.dsk"
*"disk a-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk A-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk a-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk A-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk B-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk b-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk B-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk C-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk c-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk C-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk D-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk d-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk D-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk E-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk e-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk E-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk F-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk f-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk F-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk G-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk g-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk G-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk H-1"/>' >> ../xml/cc/cc$1.xml
;;
*"disk h-2"*)
echo -e '\t\t\t<feature name="part_id" value="Disk H-2"/>' >> ../xml/cc/cc$1.xml
;;
*"disk i-1"*)
echo -e '\t\t\t<feature name="part_id" value="Disk I-1"/>' >> ../xml/cc/cc$1.xml
;;