Skip to content

Commit

Permalink
[FIX]Pequeñas correcciones. Añadido ejemplo de comando.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusVMayor committed Feb 8, 2020
1 parent 399ca6d commit f6c6d01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
4 changes: 2 additions & 2 deletions rclone_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f6c6d01

Please sign in to comment.