CreamySoup - a helper script for automated SourceMod plugin updates management.

Related tags

Web Crawling soup
Overview

soup

CreamySoup/"Creamy SourceMod Updater" (or just soup for short), a helper script for automated SourceMod plugin updates management.

This project started as a custom utility for the Creamy Neotokyo servers (hence the name), but open sourcing and generalising it for any kind of SRCDS/SourceMod servers seemed like a good idea, in case it's helpful for someone else too.

alt text

FAQ

What it be?

soup is a Python 3 script, a SRCDS SourceMod plugin update helper, intended to be invoked periodically by an external cronjob-like automation system.

It parses soup recipes, remote lists of resources to be kept up-to-date, compares those resources' contents to the target machine's local files, and re-downloads & re-compiles them if they differ. This will automatically keep such resources in-sync with their remote repository. For a SourceMod plugin, this means any new updates get automatically applied upon the next mapchange after the completion of a soup update cycle.

The purpose of soup is to reduce SRCDS sysop workload by making SourceMod plugin updates more automated, while also providing some granularity in terms of which plugins get updated when, with the introduction of maintained/curated recipes. For example, you can have some trusted recipes auto-update their target plugins without any admin intervention, but choose to manually update more fragile or experimental plugins as required (or not at all).

Which recipes to use?

You should always use the default self-updater recipe to keep the soup script itself updated.

If you are operating a Neotokyo SRCDS, this project offers some recommended recipe(s) here. This resource is still work-in-progress, more curated lists to be added later!

You can also host your own custom recipes as you like for any SRCDS+SourceMod server setup.

Foreword of warning

While automation is nice, a malicious actor could use this updater to execute arbitrary code on the target machine. Be sure to only use updater source lists ("recipes") that you trust 100%, or maintain your own fork of such resources where you can review and control the updates.

Installation

Recommended to install with pip, using the requirements.txt file.

You should also consider using a virtual environment to isolate any Python dependencies from the rest of the system (although if you go this route, any cron job or similar automation should also run in that venv to have access to those deps).

Other requirements

  • Python 3

Config

Configuration can be edited in the config.yml file that exists in the same dir as the Python script itself. Please see the additional comments within the config file for more information on the options.

Recipes

The most powerful config option is recipes, which is a list of 0 or more URLs pointing to soup.py "recipes".

A recipe is defined as a valid JSON document using the following structure:

}, <...> ], <...> } ">
{
  "section": [
    {
      "key": "value",
      <...>
    },
    <...>
  ],
  <...>
}

where

<...>

indicates 0 or more additional repeated elements of the same type as above.

Note that trailing commas are not allowed in the JSON syntax – it's a good idea to validate the file before pushing any recipe updates online.

Recipe sections

There are three valid recipe sections: updater, includes, and plugins. Examples follow:

  • updater – A self-updater section for the soup.py script contents. Only one section in total of this kind should exist at most in all of the recipes being used.
	"updater": [
		{
			"version": "1.0.0",
			"url": "https://raw.githubusercontent.com/CreamySoup/soup/main/soup.py"
		}
	]
  • includes – SourceMod include files that are required by some of the plugins in the recipes' plugins section. Required file extension: .inc
	"includes": [
		{
			"name": "neotokyo",
			"about": "sourcemod-nt-include - The de facto NT standard include.",
			"source_url": "https://raw.githubusercontent.com/CreamySoup/sourcemod-nt-include/master/scripting/include/neotokyo.inc"
		}
	]
  • plugins – SourceMod plugins that are to be kept up to date with their remote source code repositories. Required file extension: .sp
	"plugins": [
		{
			"name": "nt_srs_limiter",
			"about": "SRS rof limiter timed from time of shot, inspired by Rain's nt_quickswitchlimiter.",
			"source_url": "https://raw.githubusercontent.com/CreamySoup/nt-srs-limiter/master/scripting/nt_srs_limiter.sp"
		}
	]

For full examples of valid recipes, see the self updater in this repo, and the Neotokyo recipe repository. By default, this repo is configured for game "NeotokyoSource", and to use these Neotokyo default recipes.

Usage

The script can be run manually with python soup.py, but is recommended to be automated as a cron job or similar.

For developers

The soup.py Python script should be PEP 8 compliant (tested using pycodestyle).

You might also like...
A webdriver-based script for reserving Tsinghua badminton courts.

AutoReserve A webdriver-based script for reserving badminton courts. 使用说明 下载 chromedriver 选择当前Chrome对应版本 安装 selenium pip install selenium 更改场次、金额信息dat

A web crawler script that crawls the target website and lists its links

A web crawler script that crawls the target website and lists its links || A web crawler script that lists links by scanning the target website.

Script for scrape user data like
Script for scrape user data like "id,username,fullname,followers,tweets .. etc" by Twitter's search engine .

TwitterScraper Script for scrape user data like "id,username,fullname,followers,tweets .. etc" by Twitter's search engine . Screenshot Data Users Only

This is a script that scrapes the longitude and latitude on food.grab.com
This is a script that scrapes the longitude and latitude on food.grab.com

grab This is a script that scrapes the longitude and latitude for any restaurant in Manila on food.grab.com, location can be adjusted. Search Result p

Free-Game-Scraper is a useful script that allows you to track down free games and DLCs on many platforms.
Free-Game-Scraper is a useful script that allows you to track down free games and DLCs on many platforms.

Game Scraper Free-Game-Scraper is a useful script that allows you to track down free games and DLCs on many platforms. Join the discord About The Proj

Screenhook is a script that captures an image of a web page and send it to a discord webhook.
Screenhook is a script that captures an image of a web page and send it to a discord webhook.

screenshot from the web for discord webhooks screenhook is a script that captures an image of a web page and send it to a discord webhook.

Python script to check if there is any differences in responses of an application when the request comes from a search engine's crawler.
Python script to check if there is any differences in responses of an application when the request comes from a search engine's crawler.

crawlersuseragents This Python script can be used to check if there is any differences in responses of an application when the request comes from a se

Scraping script for stats on covid19 pandemic status in Chiba prefecture, Japan

About 千葉県の地域別の詳細感染者統計(Excelファイル) をCSVに変換し、かつ地域別の日時感染者集計値を出力するスクリプトです。 Requirement POSIX互換なシェル, e.g. GNU Bash (1) curl (1) python = 3.8 pandas = 1.1.

A simple python script to fetch the latest covid info

covid-tracker-script A simple python script to fetch the latest covid info How it works First, get the current date in MM-DD-YYYY format. Check if the

Comments
  • Bump pipenv from 2021.11.23 to 2022.1.8

    Bump pipenv from 2021.11.23 to 2022.1.8

    Bumps pipenv from 2021.11.23 to 2022.1.8.

    Changelog

    Sourced from pipenv's changelog.

    2022.1.8 (2022-01-08)

    Bug Fixes

    • Remove the extra parentheses around the venv prompt. [#4877](https://github.com/pypa/pipenv/issues/4877) <https://github.com/pypa/pipenv/issues/4877>_
    • Fix a bug of installation fails when extra index url is given. [#4881](https://github.com/pypa/pipenv/issues/4881) <https://github.com/pypa/pipenv/issues/4881>_
    • Fix regression where lockfiles would only include the hashes for releases for the platform generating the lockfile [#4885](https://github.com/pypa/pipenv/issues/4885) <https://github.com/pypa/pipenv/issues/4885>_
    • Fix the index parsing to reject illegal requirements.txt. [#4899](https://github.com/pypa/pipenv/issues/4899) <https://github.com/pypa/pipenv/issues/4899>_
    Commits
    • d378b9f Release v2022.1.8
    • 439782a Merge pull request from GHSA-qc9x-gjcv-465w
    • 1679098 fix TLS validation for requirements.txt
    • 9cb42e1 Merge pull request #4910 from jfly/update-run-tests-instructions
    • 08a7fcf Oops, set the CI environment variable even earlier.
    • f42fcaa Misc doc updates (mostly around running tests)
    • c8f34dd Merge pull request #4908 from jfly/issue-4885-custom-indices-lacking-hashes
    • 34652df Use a PackageFinder with ignore_compatibility when collecting hashes
    • b0ebaf0 Merge pull request #4907 from milo-minderbinder/bugfix/requirements-file-options
    • d535301 disallow abbreviated forms of full option names
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Improve self-updater

    Improve self-updater

    Deprecate the "updater" recipe section in favour of using GitHub Releases API. Fix recursion bug in recipe iteration logic that could cause multiple traversal of the same node.

    bug enhancement 
    opened by Rainyan 0
  • Fix updating Python requirements upon soup self-update

    Fix updating Python requirements upon soup self-update

    Run the pip requirements installation command when self-updating so that script dependencies also stay in sync.

    This is a breaking change from 1.2.x, since:

    • 1.2 doesn't have the ability to self-update requirements.txt
    • the self-update recipe syntax has changed
    enhancement 
    opened by Rainyan 0
  • Generalise recipe inputs

    Generalise recipe inputs

    Currently we are supporting source code (.sp) and include (.inc) files specifically, but there's also other kinds of SM dependencies like localization/translations, configs, gamedata, etc. Ideally, this system should be completely agnostic of the kinds of files being updated. This would require some refactoring of the current concept of a "recipe".

    enhancement 
    opened by Rainyan 0
Releases(2.1.0)
  • 2.1.0(Nov 24, 2022)

    What's Changed

    • Fix selfupdate on major updates by @Rainyan in https://github.com/CreamySoup/soup/pull/12

    Full Changelog: https://github.com/CreamySoup/soup/compare/2.0.0...2.1.0

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Nov 24, 2022)

  • 1.6.3(Jan 13, 2022)

    What's Changed

    • Bump pipenv from 2021.11.23 to 2022.1.8 by @dependabot in https://github.com/CreamySoup/soup/pull/5

    New Contributors

    • @dependabot made their first contribution in https://github.com/CreamySoup/soup/pull/5

    Full Changelog: https://github.com/CreamySoup/soup/compare/1.6.2...1.6.3

    Source code(tar.gz)
    Source code(zip)
  • 1.6.2(Dec 25, 2021)

  • 1.6.1(Dec 25, 2021)

  • 1.6.0(Dec 25, 2021)

  • 1.5.1(Nov 29, 2021)

  • 1.4.5(Nov 29, 2021)

    What's Changed

    Changes from 1.4.0

    • Fix some bugs that broke the new updater

    Changes from 1.3.x

    • Deprecate the updater recipe section in favour of using GitHub Releases API.
    • Fix recursion bug in recipe iteration logic that could cause multiple traversal of the same node.
    • Trigger soup self-restart upon receiving self-update

    This is a breaking change from 1.3.x, since:

    • self-update logic has been changed
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Nov 29, 2021)

    What's Changed

    • Fix updating Python requirements upon soup self-update:

    Run the pip requirements installation command when self-updating so that script dependencies also stay in sync.

    This is a breaking change from 1.2.x, since:

    • 1.2.x doesn't have the ability to self-update requirements.txt
    • the self-update recipe syntax has changed
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Nov 26, 2021)

  • 1.2.0(Nov 16, 2021)

  • 1.1.0(Nov 16, 2021)

    What's Changed

    • Use StrictYAML for config by @Rainyan in https://github.com/CreamySoup/soup/pull/2

    Full Changelog: https://github.com/CreamySoup/soup/compare/1.0.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Nov 16, 2021)

Owner
Helper script for automated SourceMod plugin updates management.
null
An helper library to scrape data from TikTok in one line, using the Influencer Hunters APIs.

TikTok Scraper An utility library to scrape data from TikTok hassle-free Go to the website » View Demo · Report Bug · Request Feature About The Projec

null 6 Jan 8, 2023
Automated data scraper for Thailand COVID-19 data

The Researcher COVID data Automated data scraper for Thailand COVID-19 data Accessing the Data 1st Dose Provincial Vaccination Data 2nd Dose Provincia

Porames Vatanaprasan 31 Apr 17, 2022
An automated, headless YouTube Watcher and Scraper

Searches YouTube, queries recommended videos and watches them. All fully automated and anonymised through the Tor network. The project consists of two independently usable components, the YouTube automation written in Python and the dockerized Tor Browser.

null 44 Oct 18, 2022
An Automated udemy coupons scraper which scrapes coupons and autopost the result in blogspot post

Autoscraper-n-blogger An Automated udemy coupons scraper which scrapes coupons and autopost the result in blogspot post and notifies via Telegram bot

GOKUL A.P 13 Dec 21, 2022
Automated Linkedin bot that will improve your visibility and increase your network.

LinkedinSpider LinkedinSpider is a small project using browser automating to increase your visibility and network of connections on Linkedin. DISCLAIM

Frederik 2 Nov 26, 2021
Distributed Crawler Management Framework Based on Scrapy, Scrapyd, Django and Vue.js

Gerapy Distributed Crawler Management Framework Based on Scrapy, Scrapyd, Scrapyd-Client, Scrapyd-API, Django and Vue.js. Documentation Documentation

Gerapy 2.9k Jan 3, 2023
PaperRobot: a paper crawler that can quickly download numerous papers, facilitating paper studying and management

PaperRobot PaperRobot 是一个论文抓取工具,可以快速批量下载大量论文,方便后期进行持续的论文管理与学习。 PaperRobot通过多个接口抓取论文,目前抓取成功率维持在90%以上。通过配置Config文件,可以抓取任意计算机领域相关会议的论文。 Installation Down

moxiaoxi 47 Nov 23, 2022
Pelican plugin that adds site search capability

Search: A Plugin for Pelican This plugin generates an index for searching content on a Pelican-powered site. Why would you want this? Static sites are

null 22 Nov 21, 2022
Script used to download data for stocks.

This script is useful for downloading stock market data for a wide range of companies specified by their respective tickers. The script reads in the d

Carmelo Gonzales 71 Oct 4, 2022
Auto Join: A GitHub action script to automatically invite everyone to the organization who star your repository.

Auto Invite To The Organization By Star A GitHub Action script to automatically invite everyone to your organization that stars your repository. What

Max Base 11 Dec 11, 2022