Skip to content

Patch your YOURLS installation, without the need to download and upload the entire release ZIP file.

License

Notifications You must be signed in to change notification settings

gioxx/YOURLS-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOURLS Diff

Readme file is also available in italian.

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.

If you want to take advantage of the patches that are automatically created by this script and this repository (via this GitHub Action), you can take a look at Releases. The most recent update package will always be available by pointing to the Latest tag. The script runs every day at midnight.

Features

  • Automatically downloads the two ZIP archives (old and new) from the YOURLS GitHub repository.
  • Compares files and identifies new or modified ones.
  • Generates a ZIP package containing only the changed files.
  • Produces an external manifest file (.txt) listing the changed files.
  • Supports SSL certificate verification with an option to disable it.

Requirements

  • Python 3.6+
  • Python libraries listed in requirements.txt:
    requests>=2.20.0
    urllib3>=1.25.0

Installation

  1. Clone the repository:

    git clone https://github.com/gioxx/YOURLS-diff.git
    cd YOURLS-diff
  2. Create a virtual environment (optional but recommended):

    python3 -m venv .venv
    source .venv/bin/activate   # Linux/MacOS
    .\.venv\Scripts\activate  # Windows
  3. Install dependencies:

    pip install -r requirements.txt

Usage

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

Option Description Example
--old (required) Tag of the starting release (e.g., 1.8.10). --old 1.8.10
--new Tag of the target release. If omitted, latest is used. --new 1.9.0
--output Output ZIP filename. Default: YOURLS-update-OLD-to-NEW.zip. --output diff.zip
--no-verify Disable SSL certificate verification (not recommended). --no-verify

Examples

  • Update from 1.8.10 to the latest release:

    python YOURLS-diff_CreatePackage.py --old 1.8.10

    Produces:

    • YOURLS-update-1.8.10-to-<latest>.zip
    • YOURLS-update-1.8.10-to-<latest>.txt (manifest)
  • Update from 1.8.10 to 1.9.0 with a custom output name:

    python YOURLS-diff_CreatePackage.py --old 1.8.10 --new 1.9.0 --output update.zip
  • Disable SSL verification:

    python YOURLS-diff_CreatePackage.py --old 1.8.10 --no-verify

Repository Structure

├── YOURLS-diff_CreatePackage.py   # Main Python script
├── requirements.txt               # Python dependencies
├── LICENSE                        # License used for this repository
├── README.md                      # This documentation
└── README_IT.md                   # Italian documentation

Contributing

Pull requests and issue reports are welcome! Please open a new issue for bugs or feature requests.

About

Patch your YOURLS installation, without the need to download and upload the entire release ZIP file.

Topics

Resources

License

Stars

Watchers

Forks

Languages