Skip to content

Instantly share code, notes, and snippets.

@Podshot
Last active August 29, 2015 14:26
Show Gist options
  • Save Podshot/1b619caaa5eae03d4602 to your computer and use it in GitHub Desktop.
Save Podshot/1b619caaa5eae03d4602 to your computer and use it in GitHub Desktop.
Filter updater example.
Follow the URL's to find all the data you need, this is just the only thing you need to download,
but make sure you DON'T put this filter in the stock-filters folder.
Run the UpdaterTest filter once to find the first version, then click "Update Filters" below the filter panel.
Once a message appears that filters have been updated, reload the filter tool and run the UpdaterText filter again to see the updated version.
# Example Filter that can be updated
VERSION = "0.0.0"
UPDATE_URL = "http://podshot.github.io/update_json.json"
def perform(level, box, options):
global editor
try:
editor
except:
import inspect
editor = inspect.stack()[1][0].f_locals.get('self', None).editor
editor.Notify("Running version: "+VERSION+" of this filter")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment