File tree 2 files changed +5
-43
lines changed
2 files changed +5
-43
lines changed Original file line number Diff line number Diff line change 14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
17
- import sys
18
17
import subprocess
19
18
from pathlib import Path
20
- import configparser
21
- from inspect import currentframe , getframeinfo
22
- import itertools
23
19
import os
24
- import io
25
20
import hashlib
26
- import distutils .util
27
- import datetime
28
- import difflib
29
- import shutil
30
- import time
31
21
import json
32
22
import xml .etree .cElementTree as ET
33
- import urllib .request
34
23
35
24
def main ():
36
25
37
26
print ('START!' )
38
27
39
- rotations = dict ()
40
- for line in urllib .request .urlopen ('https://raw.githubusercontent.com/theypsilon/_arcade-organizer/master/rotations/mame-rotations.txt' ):
41
- parts = line .decode ('utf-8' ).split (',' )
42
- if len (parts ) == 2 :
43
- rot = translate_mame_rotation (parts [1 ].strip ('\n ' ).lower ())
44
- if rot is not None :
45
- rotations [parts [0 ]] = rot
46
-
47
28
mad_finder = MadFinder ('mad' )
48
29
mad_reader = MadReader ()
49
30
@@ -55,13 +36,6 @@ def main():
55
36
repeated = mad_reader .repeated ()
56
37
errors = mad_reader .errors ()
57
38
58
- for setname in rotations :
59
- if setname not in data :
60
- data [setname ] = dict ()
61
-
62
- if 'rotation' not in data [setname ]:
63
- data [setname ]['rotation' ] = rotations [setname ]
64
-
65
39
create_orphan_branch ('db' )
66
40
json_filename = 'mad_db.json'
67
41
zip_filename = json_filename + '.zip'
@@ -95,18 +69,6 @@ def main():
95
69
96
70
print ('Done.' )
97
71
98
- def translate_mame_rotation (rot ):
99
- if rot == 'rot0' :
100
- return 0
101
- elif rot == 'rot90' :
102
- return 90
103
- elif rot == 'rot180' :
104
- return 180
105
- elif rot == 'rot270' :
106
- return 270
107
- else :
108
- return None
109
-
110
72
def translate_mad_rotation (rot ):
111
73
if rot == 'horizontal' :
112
74
return 0
Original file line number Diff line number Diff line change 8
8
- main
9
9
workflow_dispatch :
10
10
11
+ permissions : write-all
12
+
11
13
jobs :
12
14
build :
13
- runs-on : ubuntu-20.04
15
+ runs-on : ubuntu-latest
14
16
15
17
steps :
16
- - uses : actions/checkout@v2
18
+ - uses : actions/checkout@v4
17
19
18
20
- name : Generate DBs
19
21
run : |
20
22
set -euo pipefail
21
23
git config --global user.email "[email protected] "
22
24
git config --global user.name "The CI/CD Bot"
23
- curl --fail --location https://raw.githubusercontent.com/theypsilon/MAD_Database_MiSTer/main/.github/generate_db.py > generate_db.py
24
- chmod +x generate_db.py
25
- ./generate_db.py
25
+ ./.github/generate_db.py
You can’t perform that action at this time.
0 commit comments