Skip to content

Instantly share code, notes, and snippets.

View svioletg's full-sized avatar

Seth "Violet" Gibbs svioletg

  • Illinois, USA
  • 14:33 (UTC -06:00)
View GitHub Profile
@svioletg
svioletg / vtag.py
Created April 3, 2023 21:33
A small Python script I made to tag my folder of videos, and search for videos using said tags.
import argparse
import glob
import json
import os
import time
from pathlib import Path
import colorama
import inquirer
from colorama import Back, Fore, Style
@svioletg
svioletg / mcsounds.py
Created December 18, 2022 23:55
Grab the paths for Minecraft sounds, for the purpose of getting resource pack paths
import json, os, re, inquirer, sys, colorama, glob
from colorama import Fore, Back, Style
# requires the "inquirer" package, which can be installed from pip
# check here for where your indexes folder is:
# https://minecraft.fandom.com/wiki/Tutorials/Sound_directory
# make sure the path ends in "indexes" when entering it
try:
@svioletg
svioletg / find_missing.py
Created July 5, 2019 21:22
Checks a list against a reference list to see which items are missing.
def find_missing(l,r):
# finds items from "r" that are missing from "l"
# l = (l)ist to be checked
# r = (r)eference list to compare "l" to
missing = []
for item in r:
if item not in l:
missing.append(item)
return missing
@svioletg
svioletg / sortbydate.py
Last active May 8, 2019 12:24
(MOVED TO: https://github.com/Alpha-Hedge/organization-scripts) || Sorts files into folders based on creation date (a file created on 2019-05-04 will be put into 2019/May/[file], the month naming format can be changed). Only tested on Windows 10 with Python 3.7 so far.
# Organizes all files within a specified directory into folders corresponding to creation date.
# e.g If a file's creation date is 2019-05-03, a "2019" folder will be created in the directory.
# That folder will contain a "05 May" folder, and the file will be stored there.
# Only tested on Windows 10 with Python 3.7 so far.
# Can be run from anywhere.
import os
import tkinter as tk
import sys
@svioletg
svioletg / namebydate.py
Last active May 8, 2019 12:24
(MOVED TO: https://github.com/Alpha-Hedge/organization-scripts) || Adds the creation date of a file (formatted to YYYY-MM-DD) to the beginning of all files within a specified directory. Only tested on Windows 10 with Python 3.7 so far.
# Adds the creation date of a file (formatted to YYYY-MM-DD) to the beginning of all files within a specified directory.
# Only tested on Windows 10 with Python 3.7 so far.
# Can be run from anywhere.
import os
import tkinter as tk
from tkinter import filedialog
from datetime import datetime
@svioletg
svioletg / powers_of.py
Last active April 26, 2019 22:19
Return a list containing powers of a certain number (length of list can also be specified)
def powers_of(num,amount):
i=0
powers=[]
while len(powers) < amount:
if i % num == 0:
powers.append(i)
i+=1
return powers
@svioletg
svioletg / int-hex-bin-gen.py
Last active April 27, 2019 09:28
Small script that counts between "start" and "end", converted to base 10, hexadecimal, and binary, separated by commas
# Small script that counts up to X, converted to base 10, hexadecimal, and binary, separated by commas
# Mostly just something I did that I thought looked neat, not a ton of practical use to it
import time
start = input("start: ")
end = input("end: ")
# 0-256 as default
if start=="":
start = 0
@svioletg
svioletg / newgnd-img-dl.py
Last active January 6, 2024 08:23
Simple newgrounds image downloader — requirements in code comments
# Downloads images from Newgrounds links
# So far only tested with Python 3.7 on Windows 10, works with every URL I've tried
# Requires urllib, os, sys, beautifulsoup, & time modules
# Requires wget to be installed on system
# Example command: python newgnd-dl.py --batch=urls.txt --folder=Favorite_Stuff
import urllib
import os
import sys