A simple script that can watch a list of directories for change and does some action

Overview

plot_watcher

A simple script that can watch a list of directories and does some action when a specific kind of change happens

In its current implementation, this script polls the directories listed as an argument (see plot_watcher.bat) for any changes. Once it finds a new .plot file created or added, it will look in the directory "../Plots" relative to the one where the change happened (so it goes back one level then enters "Plots" dir, where old plots supposedly reside, you can change this to suit your need) and if it finds any .plot files it will delete one. This will let you keep your plotter working (against your new NFT contract address) and one by one your old plots will be replaced with the newer portable ones.

Example directory structure based on the default arguments in plot_watcher.bat:

E:

|---Plots

|---Portable_Plots

F:

|---Plots

|---Portable_Plots

G:

|---Plots

|---Portable_Plots

The script will look inside the "Portable_Plots" directories and once a new .plot file is added the script will delete one .plot file from the old ones in "Plots".

DICLAIMER: This script is given AS-IS and was made for my own case, if you need an update to suit your setup you can fork it and add to it yourself. I'm not liable to any damage done from losing your 5489743159 plots, if you need to do any tests for yourself you can comment out or remove the line "os.remove(...." until your changes are tested and you're satisfied with the result.

Installation:

We make use of the module pywin32 so it needs to be installed by running the command: python -m pip install pywin32

After checking the list of portable plot directories in the .bat file, you need to make sure that either the old Plots follow the same directory structure as described above or you can edit the script to point to the right directory. This following line can be edited to point to the relative path starting from the location of the newly created plot (change this part: "..", "Plots") :

oldPlotDir = os.path.abspath(os.path.join(os.path.dirname(filename), "..", "Plots"))

Usage:

Run the bat file and leave it open to track the new plots.

plot_watcher screenshot

License and contribution

Licensed under the (GPL-compatible) MIT License:

http://www.opensource.org/licenses/mit-license.php

The change tracking functionality was shamelessly taken from this how-to guide. Thanks to the creator Tim Golden.

http://timgolden.me.uk/python/win32_how_do_i/watch_directory_for_changes.html

Owner
Charaf Errachidi
Charaf Errachidi
This alerts you when the avalanche score a goal

This alerts you when the avalanche score a goal

Davis Burrill 1 Jan 15, 2022
A Python3 script to decode an encoded VBScript file, often seen with a .vbe file extension

vbe-decoder.py Decode one or multiple encoded VBScript files, often seen with a .vbe file extension. Usage usage: vbe-decoder.py [-h] [-o output] file

John Hammond 147 Nov 15, 2022
This repo is a collection of programs and websites templates too

📢 Register here for Hacktoberfest and make four pull requests (PRs) between October 1st-31st to grab free SWAGS 🔥 . IMPORTANT While making pull requ

Binayak Jha - 2 7 Oct 03, 2022
A slapdash script to solve Wordle or Absurdle automatically

A slapdash script to solve Wordle or Absurdle automatically

Michael Anthony 1 Jan 19, 2022
Explore related sequences in the OEIS

OEIS explorer This is a tool for exploring two different kinds of relationships between sequences in the OEIS: mentions (links) of other sequences on

Alex Hall 6 Mar 15, 2022
The Python Fuzzer that the world deserves 🐍

pip3 install frelatage Current release : 0.0.2 The Python Fuzzer that the world deserves Installation | How it works | Features | Use Frelatage | Conf

Rog3r 219 Dec 21, 2022
Neptune client library - integrate your Python scripts with Neptune

Lightweight experiment tracking tool for AI/ML individuals and teams. Fits any workflow. Neptune is a lightweight experiment logging/tracking tool tha

neptune.ai 353 Jan 04, 2023
Python Script to add OpenGapps, Magisk, libhoudini translation library and libndk translation library to waydroid !

Waydroid Extras Script Script to add gapps and other stuff to waydroid ! Installation/Usage "lzip" is required for this script to work, install it usi

Casu Al Snek 331 Jan 02, 2023
Project Guide for ASAM OpenX standards

ASAM Project Guide Important This guide is a work in progress and subject to change! Hosted version available at: ASAM Project Guide (Link) Includes:

ASAM e.V. 2 Mar 17, 2022
Cairo hooks for pre-commit

pre-commit-cairo Cairo hooks for pre-commit. See pre-commit for more details Using pre-commit-cairo with pre-commit Add this to your .pre-commit-confi

Fran Algaba 16 Sep 21, 2022
Restaurant-finder - Restaurant finder With Python

restaurant-finder APIs /restaurants query-params: a. filter: column based on whi

Kumar saurav 1 Feb 22, 2022
Distribute PySPI jobs across a PBS cluster

Distribute PySPI jobs across a PBS cluster This repository contains scripts for distributing PySPI jobs across a PBS-type cluster. Each job will conta

Oliver Cliff 1 Feb 10, 2022
Interfaces between napari and pymeshlab library to allow import, export and construction of surfaces.

napari-pymeshlab Interfaces between napari and the pymeshlab library to allow import, export and construction of surfaces. This is a WIP and feature r

Zach Marin 4 Oct 12, 2022
Create or join a private chatroom without any third-party middlemen in less than 30 seconds, available through an AES encrypted password protected link.

PY-CHAT Create or join a private chatroom without any third-party middlemen in less than 30 seconds, available through an AES encrypted password prote

1 Nov 24, 2021
A simple app that helps to train quick calculations.

qtcounter A simple app that helps to train quick calculations. Usage Manual Clone the repo in a folder using git clone https://github.com/Froloket64/q

0 Nov 27, 2021
A clock widget for linux ez to use no need for cmd line ;)

A clock widget in LINUX A clock widget for linux ez to use no need for cmd line ;) How to install? oh its ez just go to realese! what are the paltform

1 Feb 15, 2022
AIST++ API This repo contains starter code for using the AIST++ dataset.

Explainability for Vision Transformers (in PyTorch) This repository implements methods for explainability in Vision Transformers

Google 260 Dec 30, 2022
Compiler Final Project - Lisp Interpreter

Compiler Final Project - Lisp Interpreter

2 Jan 23, 2022
The next generation Canto RSS daemon

Canto Daemon This is the RSS backend for Canto clients. Canto-curses is the default client at: http://github.com/themoken/canto-curses Requirements De

Jack Miller 155 Dec 28, 2022
MODSKIN-LOLPRO-updater: The mod is fkn 10y old and has'nt a self-updater

The mod is fkn 10y old and has'nt a self-updater. To use it just run the exec, wait some seconds, and it will run the new modsk

Shiro Amurha 3 Apr 23, 2022