Skip to content

Commit 5e98cab

Browse files
committed
Update dei file README
1 parent accea92 commit 5e98cab

File tree

2 files changed

+91
-38
lines changed

2 files changed

+91
-38
lines changed

README.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22

33
[Readme file is also available in italian](README_IT.md).
44

5+
![Patch Build](https://github.com/gioxx/YOURLS-diff/actions/workflows/patch.yml/badge.svg)
6+
57
**YOURLS Diff** is a Python script that simplifies updating a YOURLS installation via FTP by creating a ZIP package containing only the new or modified files between two release tags.
68

79
If you want to take advantage of the patches that are automatically created by this script and this repository (via [this GitHub Action](.github/workflows/patch.yml)), you can take a look at [Releases](https://github.com/gioxx/YOURLS-diff/releases). The most recent update package will always be available by pointing to the [Latest tag](https://github.com/gioxx/YOURLS-diff/releases/latest). The script runs every day at midnight.
810

911
## Features
1012

1113
- Automatically downloads the two ZIP archives (`old` and `new`) from the YOURLS GitHub repository.
12-
- Compares files and identifies **new** or **modified** ones.
14+
- Compares files and identifies **new**, **modified**, and **removed** files.
1315
- Generates a ZIP package containing only the changed files.
1416
- Produces an external manifest file (`.txt`) listing the changed files.
15-
- Generates a bash script that allows you to update your YOURLS instance via rsync and SSH.
16-
- Supports SSL certificate verification with an option to disable it.
17+
- Generates a `.removed.txt` file if any files were deleted.
18+
- Creates a Bash deployment script (`.sh`) that allows you to update your YOURLS instance via rsync and SSH.
19+
- Supports SSL certificate verification with an option to disable it.
20+
- (Optional) Generates a WinSCP-compatible script (`.winscp.txt`) for Windows users to download and delete removed files via SFTP.
1721

1822
## Requirements
1923

@@ -48,13 +52,15 @@ If you want to take advantage of the patches that are automatically created by t
4852

4953
The main script is called `YOURLS-diff_CreatePackage.py` and accepts the following options:
5054

51-
| Option | Description | Example |
52-
|----------------|--------------------------------------------------------------------------|--------------------------------------|
53-
| `--old` | **(required)** Tag of the starting release (e.g., `1.8.10`). | `--old 1.8.10` |
54-
| `--new` | Tag of the target release. If omitted, `latest` is used. | `--new 1.9.0` |
55-
| `--output` | Output ZIP filename. Default: `YOURLS-update-OLD-to-NEW.zip`. | `--output diff.zip` |
56-
| `--no-verify` | Disable SSL certificate verification (not recommended). | `--no-verify` |
57-
| `--summary` | Generate a summary text file with patch details. | `--summary` |
55+
| Option | Description | Example |
56+
|------------------|----------------------------------------------------------------------------------------------------|--------------------------------------|
57+
| `--old` | **(required)** Tag of the starting release (e.g., `1.8.10`). | `--old 1.8.10` |
58+
| `--new` | Tag of the target release. If omitted, `latest` is used. | `--new 1.9.0` |
59+
| `--output` | Output ZIP filename. Default: `YOURLS-update-OLD-to-NEW.zip`. | `--output diff.zip` |
60+
| `--no-verify` | Disable SSL certificate verification (not recommended). | `--no-verify` |
61+
| `--summary` | Generate a summary text file with patch details. | `--summary` |
62+
| `--only-removed` | Only generate the `.removed.txt` file (if any).<br>Also generates a deployment script to remove the files from the server. | `--only-removed` |
63+
| `--winscp` | Generate a `.winscp.txt` script to download and delete the removed files (requires `--only-removed`). Useful for Windows users. | `--winscp` |
5864

5965
### Examples
6066

@@ -71,11 +77,33 @@ The main script is called `YOURLS-diff_CreatePackage.py` and accepts the followi
7177
python YOURLS-diff_CreatePackage.py --old 1.8.10 --new 1.9.0 --output update.zip
7278
```
7379

80+
- **Only generate the removed file list and the deletion script**:
81+
```bash
82+
python YOURLS-diff_CreatePackage.py --old 1.8.10 --only-removed
83+
```
84+
85+
- **Include WinSCP script for removed files**:
86+
```bash
87+
python YOURLS-diff_CreatePackage.py --old 1.8.10 --only-removed --winscp
88+
```
89+
7490
- **Disable SSL verification**:
7591
```bash
7692
python YOURLS-diff_CreatePackage.py --old 1.8.10 --no-verify
7793
```
7894

95+
## Deployment Options
96+
97+
Once a patch is generated, you can deploy it to your YOURLS server using:
98+
99+
- `YOURLS-deploy-OLD-to-NEW.sh`: Bash script using rsync and ssh (for Unix/Linux users)
100+
- `YOURLS-update-OLD-to-NEW.winscp.txt`: WinSCP batch script for Windows users (with `--winscp`)
101+
- **Manual FTP upload**: Simply extract the ZIP file and upload its **contents** manually using any FTP/SFTP client (e.g., FileZilla, Cyberduck, WinSCP, Transmit).
102+
103+
Each script or method will:
104+
- Upload new or modified files (standard mode)
105+
- Remove files no longer present in the target version (automated scripts only)
106+
79107
## Repository Structure
80108

81109
```text

README_IT.md

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
# YOURLS Diff
22

3-
[Il file Readme è disponibile anche in inglese](README.md).
3+
[Il file README è disponibile anche in inglese](README.md).
44

5-
**YOURLS Diff** è uno script Python che semplifica l'aggiornamento di un'installazione YOURLS tramite FTP, creando un pacchetto ZIP con solo i file nuovi o modificati tra due tag di release.
5+
![Patch Build](https://github.com/gioxx/YOURLS-diff/actions/workflows/patch.yml/badge.svg)
66

7-
Se vuoi sfruttare le patch che vengono create automaticamente da questo script e questo repository (tramite [questa GitHub Action](.github/workflows/patch.yml)), puoi dare un'occhiata alle [Releases](https://github.com/gioxx/YOURLS-diff/releases). Il pacchetto di aggiornamento più recente sarà sempre disponibile puntando al [tag Latest](https://github.com/gioxx/YOURLS-diff/releases/latest). Lo script viene eseguito ogni giorno a mezzanotte.
7+
**YOURLS Diff** è uno script Python che semplifica l'aggiornamento di un'installazione YOURLS via FTP creando un archivio ZIP contenente solo i file nuovi o modificati tra due tag di rilascio.
8+
9+
Se vuoi approfittare delle patch create automaticamente da questo script e da questo repository (tramite [questa GitHub Action](.github/workflows/patch.yml)), puoi consultare la sezione [Releases](https://github.com/gioxx/YOURLS-diff/releases). Il pacchetto più recente sarà sempre disponibile tramite il [Latest tag](https://github.com/gioxx/YOURLS-diff/releases/latest). Lo script viene eseguito ogni giorno a mezzanotte.
810

911
## Caratteristiche
1012

1113
- Scarica automaticamente i due archivi ZIP (`old` e `new`) dal repository GitHub di YOURLS.
12-
- Confronta i file e individua quelli **nuovi** o **modificati**.
13-
- Genera un pacchetto ZIP contenente solo i file differenziati.
14-
- Produce un file manifest esterno (`.txt`) con l'elenco dei file cambiati.
15-
- Genera uno script bash che ti permette di aggiornare la tua istanza YOURLS via rsync e SSH.
16-
- Supporta la verifica SSL con possibilità di disabilitarla tramite flag.
14+
- Confronta i file e identifica quelli **nuovi**, **modificati** e **rimossi**.
15+
- Genera un pacchetto ZIP contenente solo i file modificati.
16+
- Produce un file manifest esterno (`.txt`) con l'elenco dei file modificati.
17+
- Genera un file `.removed.txt` se sono stati eliminati file nella nuova versione.
18+
- Crea uno script di deploy Bash (`.sh`) per aggiornare l'istanza YOURLS tramite rsync e SSH.
19+
- Supporta la verifica del certificato SSL con possibilità di disabilitarla.
20+
- (Opzionale) Genera uno script compatibile con WinSCP (`.winscp.txt`) per utenti Windows che vogliono scaricare ed eliminare file via SFTP.
1721

1822
## Requisiti
1923

2024
- Python **3.6+**
21-
- Librerie Python elencate in `requirements.txt`:
25+
- Librerie Python indicate in `requirements.txt`:
2226
```txt
2327
requests>=2.20.0
2428
urllib3>=1.25.0
@@ -46,46 +50,67 @@ Se vuoi sfruttare le patch che vengono create automaticamente da questo script e
4650

4751
## Utilizzo
4852

49-
Lo script principale si chiama `YOURLS-diff_CreatePackage.py` e accetta i seguenti parametri:
53+
Lo script principale si chiama `YOURLS-diff_CreatePackage.py` e accetta le seguenti opzioni:
5054

51-
| Opzione | Descrizione | Esempio |
52-
|----------------|-----------------------------------------------------------------------------|---------------------------------------|
53-
| `--old` | **(obbligatorio)** Tag della release di partenza (es. `1.8.10`). | `--old 1.8.10` |
54-
| `--new` | Tag della release di destinazione. Se omesso, viene usato `latest`. | `--new 1.9.0` |
55-
| `--output` | Nome del file ZIP di output. Default: `YOURLS-update-OLD-to-NEW.zip`. | `--output diff.zip` |
56-
| `--no-verify` | Disabilita la verifica del certificato SSL. _Non_ raccomandato. | `--no-verify` |
57-
| `--summary` | Genera un file di testo riassuntivo con i dettagli della patch. | `--summary` |
55+
| Opzione | Descrizione | Esempio |
56+
|-------------------|----------------------------------------------------------------------------------------------------|--------------------------------------|
57+
| `--old` | **(obbligatorio)** Tag della versione di partenza (es: `1.8.10`). | `--old 1.8.10` |
58+
| `--new` | Tag della versione di destinazione. Se omesso, viene usato `latest`. | `--new 1.9.0` |
59+
| `--output` | Nome del file ZIP in uscita. Default: `YOURLS-update-OLD-to-NEW.zip`. | `--output diff.zip` |
60+
| `--no-verify` | Disattiva la verifica SSL (non consigliato). | `--no-verify` |
61+
| `--summary` | Genera un file `.summary.txt` con il riepilogo delle modifiche. | `--summary` |
62+
| `--only-removed` | Genera solo il file `.removed.txt` (se ci sono file eliminati).<br>Genera anche lo script di rimozione remoto (`.sh`). | `--only-removed` |
63+
| `--winscp` | Genera uno script `.winscp.txt` per scaricare ed eliminare i file rimossi (richiede `--only-removed`). Utile per utenti Windows. | `--winscp` |
5864

59-
### Esempi di esecuzione
65+
### Esempi
6066

61-
- **Aggiornare da 1.8.10 all'ultima release**:
67+
- **Aggiornare dalla 1.8.10 all'ultima versione disponibile**:
6268
```bash
6369
python YOURLS-diff_CreatePackage.py --old 1.8.10
6470
```
65-
Genera:
66-
- `YOURLS-update-1.8.10-to-<latest>.zip`
67-
- `YOURLS-update-1.8.10-to-<latest>.txt` (manifest)
6871

69-
- **Aggiornare da 1.8.10 a 1.9.0 e nome personalizzato**:
72+
- **Aggiornare dalla 1.8.10 alla 1.9.0 con nome ZIP personalizzato**:
7073
```bash
7174
python YOURLS-diff_CreatePackage.py --old 1.8.10 --new 1.9.0 --output update.zip
7275
```
7376

74-
- **Disabilitare la verifica SSL**:
77+
- **Generare solo la lista dei file rimossi e lo script di rimozione**:
78+
```bash
79+
python YOURLS-diff_CreatePackage.py --old 1.8.10 --only-removed
80+
```
81+
82+
- **Includere anche lo script WinSCP per la cancellazione remota**:
83+
```bash
84+
python YOURLS-diff_CreatePackage.py --old 1.8.10 --only-removed --winscp
85+
```
86+
87+
- **Disabilitare la verifica del certificato SSL**:
7588
```bash
7689
python YOURLS-diff_CreatePackage.py --old 1.8.10 --no-verify
7790
```
7891

92+
## Opzioni di Deploy
93+
94+
Una volta generato il pacchetto, puoi effettuare il deploy sulla tua installazione YOURLS usando:
95+
96+
- `YOURLS-deploy-OLD-to-NEW.sh`: script Bash con rsync e ssh (per utenti Unix/Linux)
97+
- `YOURLS-update-OLD-to-NEW.winscp.txt`: script batch per WinSCP (Windows, con `--winscp`)
98+
- **Upload manuale via FTP**: Estrai il contenuto del file ZIP e caricalo manualmente utilizzando qualsiasi client FTP/SFTP (es: FileZilla, Cyberduck, WinSCP, Transmit).
99+
100+
Ogni metodo/script ti consente di:
101+
- Caricare i file modificati o aggiunti (in modalità standard)
102+
- Rimuovere i file non più presenti nella nuova versione (solo con script automatici)
103+
79104
## Struttura del repository
80105

81106
```text
82107
├── YOURLS-diff_CreatePackage.py # Script Python principale
83108
├── requirements.txt # Dipendenze Python
84-
├── LICENSE # La licenza utilizzata per questo repository
85-
├── README.md # Questa documentazione, in inglese
86-
└── README_IT.md # Questa documentazione
109+
├── LICENSE # Licenza del progetto
110+
├── README.md # Documentazione in inglese
111+
└── README_IT.md # Documentazione in italiano
87112
```
88113

89114
## Contribuire
90115

91-
Pull request e segnalazioni di issue sono benvenute! Per favore apri una nuova issue per bug o feature request.
116+
Sono ben accetti Pull Request e segnalazioni di bug! Apri una issue per segnalazioni o proposte di nuove funzionalità.

0 commit comments

Comments
 (0)