Añadido get_scr.sh
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script para pasar todos los ficheros scr de una ubicación
|
||||||
|
# a otra y convertirlos a gif y cambiarles el tamaño
|
||||||
|
|
||||||
|
SRC=/home/sergio/zx/zxdb/games
|
||||||
|
DST=/home/sergio/zx/scr_packs/zosya
|
||||||
|
|
||||||
|
if [ ! -d ${DST} ]; then
|
||||||
|
mkdir -p ${DST}
|
||||||
|
fi
|
||||||
|
rm ${DST}/*
|
||||||
|
find ${SRC} -type f -iname "*.scr" -exec cp -v {} ${DST} \;
|
||||||
|
scr2gif -f ${DST}/*.scr
|
||||||
|
rm ${DST}/*.scr
|
||||||
|
mogrify -verbose -scale 768x576 ${DST}/*.gif
|
||||||
@@ -20,8 +20,8 @@ url_prefix = {
|
|||||||
destination_path = r"/home/sergio/zx/zxdb/games/"
|
destination_path = r"/home/sergio/zx/zxdb/games/"
|
||||||
cache_path = r"/home/sergio/zx/zxdb/cache/games/"
|
cache_path = r"/home/sergio/zx/zxdb/cache/games/"
|
||||||
temp_file = r"/tmp/zxdb.download.tmp"
|
temp_file = r"/tmp/zxdb.download.tmp"
|
||||||
wait = False # Establece una pausa aleatoria entre descargas
|
wait = True # Establece una pausa aleatoria entre descargas
|
||||||
min_wait = 1 # Segundos mínimos a esperar entre descargas
|
min_wait = 2 # Segundos mínimos a esperar entre descargas
|
||||||
max_wait = min_wait + 1 # Segundos máximos a esperar entre descargas
|
max_wait = min_wait + 1 # Segundos máximos a esperar entre descargas
|
||||||
elements = []
|
elements = []
|
||||||
filetypes_on_root = [
|
filetypes_on_root = [
|
||||||
@@ -69,12 +69,17 @@ def select3(cursor):
|
|||||||
p.release_seq = r.release_seq)
|
p.release_seq = r.release_seq)
|
||||||
WHERE
|
WHERE
|
||||||
(e.availabletype_id = 'A' OR e.availabletype_id = 'D') AND
|
(e.availabletype_id = 'A' OR e.availabletype_id = 'D') AND
|
||||||
f.text <> 'Remote link' AND
|
(f.text <> 'Remote link' AND f.text <> '?') AND
|
||||||
r.release_seq = 0 AND
|
r.release_seq = 0 AND
|
||||||
|
l.name like 'ZOSYA%' AND
|
||||||
(g.text like '%Game:%' AND g.text not like 'Casual%')
|
(g.text like '%Game:%' AND g.text not like 'Casual%')
|
||||||
ORDER BY
|
ORDER BY
|
||||||
e.title;"""
|
e.title;"""
|
||||||
|
#(r.release_year >= '1986' AND r.release_year <= '1991') AND
|
||||||
|
#l.name in ('Dinamic Software', 'Aventuras AD S.A.', 'Arcadia Soft', 'Creepsoft', 'Dro Soft', 'Erbe Software S.A.', 'Iber Software', 'MCM Software S.A.', 'Made in Spain', 'New Frontier', 'Opera Soft S.A.', 'System 4', 'Topo Soft', 'Zigurat Software') AND
|
||||||
#(l.country_id = 'ES' AND l.labeltype_id = 'Z') AND
|
#(l.country_id = 'ES' AND l.labeltype_id = 'Z') AND
|
||||||
|
#l.name in ('Ocean Software Ltd', 'Imagine Software Ltd', 'Palace Software', 'Gremlin Graphics Software Ltd', 'Elite Systems Ltd', 'Melbourne House', 'Ultimate Play The Game', 'Durell Software Ltd', 'Codemasters Ltd') AND
|
||||||
|
#e.title = 'Arkanoid - Revenge of Doh' AND
|
||||||
cursor.execute(query)
|
cursor.execute(query)
|
||||||
for row in cursor:
|
for row in cursor:
|
||||||
element = dict(
|
element = dict(
|
||||||
@@ -127,6 +132,7 @@ def process_elements():
|
|||||||
+ elements[i]["developer"]
|
+ elements[i]["developer"]
|
||||||
+ ")"
|
+ ")"
|
||||||
)
|
)
|
||||||
|
elements[i]["root_folder"] = normalize_path(elements[i]["root_folder"])
|
||||||
|
|
||||||
# Obtiene el nombre del fichero a partir de la url de descarga
|
# Obtiene el nombre del fichero a partir de la url de descarga
|
||||||
elements[i]["file_name"] = url_filename(elements[i]["url"])
|
elements[i]["file_name"] = url_filename(elements[i]["url"])
|
||||||
@@ -223,6 +229,13 @@ def get_files():
|
|||||||
if game_folder != last_game_folder:
|
if game_folder != last_game_folder:
|
||||||
print("\n{}".format(game_folder))
|
print("\n{}".format(game_folder))
|
||||||
last_game_folder = game_folder
|
last_game_folder = game_folder
|
||||||
|
|
||||||
|
#print(
|
||||||
|
# "(WORKING : {} ({})".format(
|
||||||
|
# element["file_name"],
|
||||||
|
# element["filetype"]
|
||||||
|
# )
|
||||||
|
#)
|
||||||
|
|
||||||
# Comprueba si ya existe el fichero a descargar
|
# Comprueba si ya existe el fichero a descargar
|
||||||
if not os.path.isfile(destination_file) and (
|
if not os.path.isfile(destination_file) and (
|
||||||
@@ -314,7 +327,8 @@ def main():
|
|||||||
connect()
|
connect()
|
||||||
process_elements()
|
process_elements()
|
||||||
|
|
||||||
# for element in elements:
|
#for element in elements:
|
||||||
|
# print('')
|
||||||
# for key, value in element.items():
|
# for key, value in element.items():
|
||||||
# print(key, ':', value)
|
# print(key, ':', value)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user