diff --git a/bash/backup_maverick.sh b/bash/backup_maverick.sh index 92951f0..82df67d 100755 --- a/bash/backup_maverick.sh +++ b/bash/backup_maverick.sh @@ -39,6 +39,7 @@ for i in /etc/cron.*; do rsync -avh --delete "$i" "${TARGET_SYSTEM_FILES}"/ | tee -a "${LOG}" done rsync -avh --delete /etc/fstab "${TARGET_SYSTEM_FILES}"/ | tee -a "${LOG}" +rsync -avh --delete /etc/crontab "${TARGET_SYSTEM_FILES}"/ | tee -a "${LOG}" ## Backup de ficheros FILES=".gitconfig .git-credentials" diff --git a/python/bot_youtube.py b/python/bot_youtube.py index 3417ddd..bde9174 100644 --- a/python/bot_youtube.py +++ b/python/bot_youtube.py @@ -82,10 +82,14 @@ def read_msg(offset): os.remove(input_audio) size = round(os.path.getsize(output_media) / 1024 / 1024, 2) - if size > 50: - send_message(i["message"]["from"]["id"], 'Done! ' + str(size) + 'MB') - else: - send_video(i["message"]["from"]["id"], output_media) + #if size > 50: + # send_message(i["message"]["from"]["id"], 'Done! ' + str(size) + 'MB') + #else: + # send_video(i["message"]["from"]["id"], output_media) + + send_message(i["message"]["from"]["id"], 'Done! ' + str(size) + 'MB') + #send_video(i["message"]["from"]["id"], output_media) + except: pass @@ -121,23 +125,23 @@ def send_message(user, message): def send_audio(user, audio): base_url_audio = base_url + '/sendAudio' - audio = open(audio, 'rb') + audio2 = open(audio, 'rb') data = { "chat_id": user } files = { - "audio": audio + "audio": audio2 } resp = requests.get(base_url_audio, data=data, files=files) def send_video(user, video): base_url_video = base_url + '/sendVideo' - video = open(video, 'rb') + video2 = open(video, 'rb') data = { "chat_id": user } files = { - "video": video + "video": video2 } resp = requests.get(base_url_video, data=data, files=files) diff --git a/python/fbneo_roms_by_manufacturer.py b/python/fbneo_roms_by_manufacturer.py index dd9642d..5515e78 100644 --- a/python/fbneo_roms_by_manufacturer.py +++ b/python/fbneo_roms_by_manufacturer.py @@ -22,6 +22,7 @@ def normalize_path(path): # Inicialización de las opciones ignore_list = ["DECO Cassette", "Bootleg", "prototype", "Quiz", "Mahjong", "Demo"] +ignore_system = ["neogeo"] # Obtiene los argumentos parser = argparse.ArgumentParser( @@ -99,11 +100,12 @@ if args.list and args.manufacturer != None: manufacturer = game.getElementsByTagName("manufacturer")[0] description = game.getElementsByTagName("description")[0] if ( - manufacturer.firstChild.data == args.manufacturer + (manufacturer.firstChild.data == args.manufacturer + or args.manufacturer == 'all') and not cloneof and not isbios ): - print(description.firstChild.data) + print(description.firstChild.data, '==>', game.getAttribute("name") + ".zip from", manufacturer.firstChild.data) # Copia los juegos del desarrollador seleccionado if ( @@ -127,6 +129,7 @@ if ( name = game.getAttribute("name") + ".zip" cloneof = game.getAttribute("cloneof") isbios = game.getAttribute("isbios") + romof = game.getAttribute("romof") manufacturer = game.getElementsByTagName("manufacturer")[0] description = game.getElementsByTagName("description")[0] driver = game.getElementsByTagName("driver") @@ -146,6 +149,11 @@ if ( ignored_games.append(description.firstChild.data) isignored = True + for ignore_element in ignore_system: + if ignore_element.casefold() in romof.casefold(): + ignored_games.append(description.firstChild.data) + isignored = True + if not isignored: src = os.path.join(args.input, name) if args.sort: @@ -163,7 +171,7 @@ if ( if os.path.isfile(src): shutil.copyfile(src, dst) copied_games.append(description.firstChild.data) - print(description.firstChild.data) + print(description.firstChild.data, '==>', game.getAttribute("name") + ".zip") else: notfound.append(description.firstChild.data) @@ -196,6 +204,7 @@ if ( name = game.getAttribute("name") + ".zip" cloneof = game.getAttribute("cloneof") isbios = game.getAttribute("isbios") + romof = game.getAttribute("romof") manufacturer = game.getElementsByTagName("manufacturer")[0] description = game.getElementsByTagName("description")[0] driver = game.getElementsByTagName("driver") @@ -211,6 +220,11 @@ if ( ignored_games.append(description.firstChild.data) isignored = True + for ignore_element in ignore_system: + if ignore_element.casefold() in romof.casefold(): + ignored_games.append(description.firstChild.data) + isignored = True + if not isignored: src = os.path.join(args.input, name) if args.sort: