This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Bulk replace asset references | |
*/ | |
(async () => { | |
Dialog.prompt({ | |
title: 'Bulk replace asset references', | |
content: | |
'<p>This tool will search for asset references <strong>within your world</strong> that start with the provided value and replace that portion with the other provided value.</p>' + | |
'<p><label>Find (case sensitive): <input type="text" name="find" placeholder="some/original/path/"></label></p>' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import json | |
import glob | |
import re | |
import os | |
from datetime import datetime | |
from collections import defaultdict | |
from os.path import expanduser, join, basename, isdir, dirname | |
import tkinter as tk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tileSize = 48; | |
const tileData= canvas.scene.notes.map(e => { | |
const entryName = e.entry?.name ?? ""; | |
const entryUuid = e.entry?.uuid ?? ""; | |
return { | |
width: tileSize, | |
height: tileSize, | |
x: e.x - tileSize/2, | |
y: e.y - tileSize/2, | |
"texture.src": e.texture.src ?? "icons/svg/book.svg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
import json | |
#disable the ssl warning as Wiim SSL cert is trash | |
from urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) | |
#Set vars for the modes to switch to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import spotipy | |
import datetime | |
import pprint | |
import os | |
import sys | |
# from prompter import prompt, yesno | |
from spotipy.oauth2 import SpotifyOAuth | |
# Import the os module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#### | |
## Replace XXXX with your details | |
#### | |
import spotipy | |
import datetime | |
import pprint | |
import os | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbittorrentapi | |
import datetime | |
today = datetime.datetime.now() | |
#Set age (days) to remove | |
older = 7 | |
#Converts UTC time to datetime | |
def utc(x): | |
dt = datetime.datetime.fromtimestamp(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import subprocess | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
from watchdog.events import PatternMatchingEventHandler | |
import qbittorrentapi | |
import os | |
import logging | |
import shutil | |
logging.basicConfig(filename='/home/pi/Scripts/watch.log', filemode='a', format ='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt='%d-%m-%Y %H:%M:%S' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import subprocess as sp | |
import json | |
def notify(title, text): | |
os.system(""" | |
osascript -e 'display notification "{}" with title "{}"' | |
""".format(text, title)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
## | |
## Requires pydrive2, qbittorrent-api and setting up Google API | |
## client_secrets.json put in the same folder as script | |
## Must be run on a machine with a browser first to generate mycreds.txt | |
## | |
import os | |
import requests | |
import filecmp | |
import shutil |
NewerOlder