From f6c6d01ca22514443ec8b8a09bfe9ecfdee165ba Mon Sep 17 00:00:00 2001 From: jesusVMayor Date: Sat, 8 Feb 2020 16:27:18 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]Peque=C3=B1as=20correcciones.=20A=C3=B1adi?= =?UTF-8?q?do=20ejemplo=20de=20comando.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 ++++++++++--- rclone_batch.py | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a0e83d4..e1dc2a4 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,20 @@ pip3 install -r requirements.txt. ``` Para evitar instalar pep3 también se pueden instalar con apt-get install python3-[nombre del paquete] + + +# Instalación sin git +sudo apt-get install python3-click python3-appdirs +wget https://github.com/jesusVMayor/rclone_gdrive_batch_copy/releases/download/1.1/rclone_batch + + - Copiar el script a /usr/bin ``` cp rclone_batch.py /usr/bin/rclone_batch chmod +x /usr/bin/rclone_batch ``` + # Comandos disponibles Todos los comandos tienen el parametro opcional --logfile @@ -24,10 +32,9 @@ chmod +x /usr/bin/rclone_batch - --config-file: parametro opcional, por defecto rclone_gdrive_batch_copy.json - source_dir: Directorio de team drive a copiar. - dest_dir: Directorio de team drive destino. - -# Uso -El script guarda un fichero de configuración, con los datos de origen, destino, y las claves .json de las cuentas que se usarán para la copia. +# Ejemplo +rclone_batch --logfile /var/log/rclone_batch.log start_sync /series /series # Known issues - Actualmente solo permite guardar los ficheros de configuración en ~/.config/rclone_gdrive_batch_copy \ No newline at end of file diff --git a/rclone_batch.py b/rclone_batch.py index 800a71f..5c6bc8b 100755 --- a/rclone_batch.py +++ b/rclone_batch.py @@ -207,11 +207,11 @@ def _get_next_json(config_data): logger.error("Todas las cuentas baneadas") continue os.symlink( - os.path.join(config_data["json_folder", new_file]), "/tmp/rclone.json", + os.path.join(config_data["json_folder"], new_file), "/tmp/rclone.json", ) call_command = "{} {} --config={} gdrive_source:{} gdrive_dest:{}".format( RCLONE_COMMAND, - config_data["command"], + config_data["mode"], config_data["rclone_config"], source_directory, dest_directory,