Giter Club home page Giter Club logo

universal-tool-updater's Introduction

English | Español

Universal Tool Updater

This tool is designed to help with the tedious process of keeping the tools that we use to work daily up to date.

This is the inevitable complement to the toolkit of the site.

Installation

You can clone the repo with git or just download it from download.

git clone https://github.com/xchwarze/universal-tool-updater

Setting

To add tools you have to edit the file tools.ini.

By default, it is configured as an example so that the user quickly understands how the tool is used.

[DIE]
folder = Analysis\DIE
url = horsicq/DIE-engine
from = github
re_download = die_win64_portable_(?:\S+).zip

[Portmon]
folder = Monitor\Portmon
url = https://docs.microsoft.com/en-us/sysinternals/downloads/portmon
update_url = https://download.sysinternals.com/files/PortMon.zip
re_version = <h1 [^>]*>Portmon for Windows v(.*?)</h1>

The values used for configuration are:

Name Mandatory Description
folder YES Folder where the tool will be saved. If it does not exist, it will be created.
url YES Web that will be used to perform the checks with the regex.
from NO Indicates the strategy used for the update. Currently supported values are: web, github or http.
local_version NO Currently downloaded version. This value will be updated with each update.
re_version NO Regex used to check for new versions on the web used in url.
re_download NO Regex used to get the download link on the web used in url.
update_url NO Update download URL. See "Strategy for download" for more info.
update_file_pass NO Use this password to unzip the update.
merge NO Merge new version with local.
pre_update NO The entered script will be executed before the update process.
post_update NO The entered script will be executed after the update process.
post_unpack NO The entered script will be executed after unpack the update file.

Strategy for download

Combining the use of update_url and re_download the following download strategies are achieved:

  1. Using only update_url it downloads directly without any extra processing.
  2. Using only re_download you get the download link on the web from url.
  3. When using both parameters, the result of re_download is concatenated with update_url. This is useful for fixing GitHub or Sourceforge download links.
  4. A new version detection method is also available that instead of regex uses the http headers with which the server responds.

Examples

The tool supports various commands and combinations. These are the most used.

  • Update a particular tool
updater.exe --update "Process Hacker 3"
  • Force Update of a tool
updater.exe --force --update DIE
  • Update without compressing or cleaning the folder
updater.exe --disable-folder-clean --disable-repack

Use with GitHub Api

GitHub download are performed by default scraping data, but for a more robust operation it is recommended to do it using the GitHub api. To do this, follow these steps:

  1. Generate our token from https://github.com/settings/tokens by clicking on Generate new token.
  2. Run the updater with the following commands
updater.exe --update-default-params --use-github-api your_github_token

Use with scheduled tasks

# execute in elevated command prompt
SCHTASKS /CREATE /SC DAILY /TN "ToolkitUpdater" /TR "D:\code\toolkit\Updater\custom-task.bat" /ST 14:00
  • Delete scheduled task
# execute in elevated command prompt
SCHTASKS /DELETE /TN "ToolkitUpdater"

Compile to exe

pip install pyinstaller
pyinstaller --onefile UpdateManager.py --icon=../assets/appicon.ico

universal-tool-updater's People

Contributors

xchwarze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

universal-tool-updater's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.