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
A reproduction repo for a Scheduling bug in AirFlow 2.2.3

A reproduction repo for a Scheduling bug in AirFlow 2.2.3

Ilya Strelnikov 1 Feb 09, 2022
Notifies server owners of mod updates, also notifies of player deaths and player joins through Discord.

ProjectZomboid-ServerAssistant Notifies server owners of mod updates, also notifies of player deaths and player joins through Discord. A Python based

3 Sep 30, 2022
IEEE ITU bunyesinde komitelere verilen Python3 egitiminin dokumanlastirilmis versiyonlari bu repository altinda tutulmaktadir.

IEEE ITU Python Egitimi Nasil Faydalanmaliyim? Dersleri izledikten sonra dokumanlardaki kodlari yorum satirlari isaretlerini kaldirarak deneyebilirsin

İTÜ IEEE Student Branch 47 Sep 04, 2022
Tracking stock volatility.

SP500-highlow-tracking Track stock volatility. Being a useful indicator of the stock price volatility, High-Low gap represents the price range of the

Thong Huynh 13 Sep 07, 2022
An awesome script to convert the University Of Oviedo web calendar to Google or Outlook calendars.

autoUniCalendar Un script en Python para convertir el calendario de la intranet de la Universidad de Oviedo en un calendario de Outlook o Google Calen

Bimo99B9 14 Sep 28, 2022
An After Effects render queue for ShotGrid Toolkit.

AEQueue An After Effects render queue for ShotGrid Toolkit. Features Render multiple comps to locations defined by templates in your Toolkit config. C

Brand New School 5 Nov 20, 2022
Blender addon for executing the operator in response to the received OSC message.

I/F Joiner 受信したOSCメッセージに応じてオペレータ(bpy.ops)を実行するアドオンです. OSC通信に対応したコントローラやアプリをインストールしたスマートフォンを使用してBlenderを操作することが可能になります. 同時開発しているAndroidコントローラ化アプリMocopa

simasimataiyo 6 Oct 02, 2022
SysCFG R/W Utility written in Swift

MagicCFG SysCFG R/W Utility written in Swift MagicCFG is one of our first, successful applications that we launched last year. The app makes it possib

Jan Fabel 82 Aug 08, 2022
urlwatch is intended to help you watch changes in webpages and get notified of any changes.

urlwatch is intended to help you watch changes in webpages and get notified (via e-mail, in your terminal or through various third party services) of any changes.

Thomas Perl 2.5k Jan 08, 2023
This repository contains completed Python projects

My Python projects This repository contains completed Python projects: 1) Build projects Guide for building projects into executable files 2) Calculat

Igor Yunusov 8 Nov 04, 2021
Entitlement AND Hardened Runtime Check

Python3 script for macOS to recursively check /Applications and also check /usr/local/bin, /usr/bin, and /usr/sbin for binaries with problematic/interesting entitlements. Also checks for hardened run

Cedric Owens 79 Nov 16, 2022
LINUX-AOS (Automatic Optimization System)

LINUX-AOS (Automatic Optimization System)

1 Jul 12, 2022
Tool that adds githuh profile views to ur acc

Tool that adds githuh profile views to ur acc

Lamp 2 Nov 28, 2021
A plugin for managing mod installers in Mod Organizer 2

Reinstaller v1.0.* Introduction Reinstaller allows you to conveninetly backup mod installers to re-run later, without risk of them cluttering up your

Alex Ashmore 2 Jun 27, 2022
pybicyclewheel calulates the required spoke length for bicycle wheels

pybicyclewheel pybicyclewheel calulates the required spoke length for bicycle wheels. (under construcion) - homepage further readings wikipedia bicyc

karl 0 Aug 24, 2022
A python script to run any executable and pass test cases to it's stdin and compare stdout with correct output.

quera_testcase_checker A python script to run any executable and pass test cases to it's stdin and compare stdout with correct output. proper way to u

k3y1 1 Nov 15, 2021
Abilian Core: an enterprise application development platform based on the Flask micro-framework, the SQLAlchemy ORM

About Abilian Core is an enterprise application development platform based on the Flask micro-framework, the SQLAlchemy ORM, good intentions and best

Abilian open source projects 47 Apr 14, 2022
CaskDB is a disk-based, embedded, persistent, key-value store based on the Riak's bitcask paper, written in Python.

CaskDB - Disk based Log Structured Hash Table Store CaskDB is a disk-based, embedded, persistent, key-value store based on the Riak's bitcask paper, w

886 Dec 27, 2022
A powerful and user-friendly binary analysis platform!

angr angr is a platform-agnostic binary analysis framework. It is brought to you by the Computer Security Lab at UC Santa Barbara, SEFCOM at Arizona S

6.3k Jan 02, 2023
Parser for the GeoSuite[tm] PRV export format

Parser for the GeoSuite[tm] PRV export format This library provides functionality to parse geotechnical investigation data in .prv files generated by

EMerald Geomodelling 1 Dec 17, 2021