Skip to content

A collection of scripts by Jiseng So. Mostly for videos, one for Dwarf Fortress.

Notifications You must be signed in to change notification settings

jisengso/JSScripts

Repository files navigation

README

Scripts by Jiseng So

This is a collection of scripts by Jiseng So to help with various things. Mostly, they make the computer perform repetitive tasks so that a person does not have to. They tend to be much more accurate and up to thousands of times faster.

FileDescriptionDependenciesUsage
Debug.pyDisplays debug messages. Provides a single point to toggle debug messaging.Import in Python.
audioScripts for mostly audio stuff.
audio/unVgz.pyTakes a directory, finds all files ending with .vgz, converts them to .vgm. If no directory is provided, assumes current directory.Depends on gunzipunVgz.py {vgzDirectory}
dfhackScripts for dfhack to interact with Dwarf Fortress.
dfhack/impregnate.luaImpregnates viviparous creatures. Not useful with oviparous or sterile creatures.
Based on catsplosion.
Dwarf Fortress and dfhack
impregnate           If the cursor points at a creature, impregnate it.
impregnate -query    Displays would-be-affected creatures without action.
impregnate -all      Affects all creatures in local site.
impregnate -species  Affects all individuals of the same species as the selected creature.
dosUtilities which interact with DOS-era files.
dos/adplayDump.pyGiven a list of files, dump all music to disk, including subsongs.Linux, adplay, soxadplayDump.py -d {outDir} {*inputFiles}
dos/extractPak.pyExtracts Westwood .PAK files.NoneextractPak.py {PAKfile}
ElseHeartBreakThings for the video game Else: Heart.Break()
ElseHeartBreak/GetElseHeartBreakCode.pyExtracts code segments which contain the string "ExportMark" from saved games.NoneGetElseHeartBreakCode.py {EHBSavedGame}
imagesManipulates images somehow.
images/capImage.pySaves screenshots of the main display approximately once per second into a directory. Might not work with all applications, especially in fullscreen mode.Windows, PillowcapImage.py {basename}
images/CompressImages.pyParallelizes recompression using pngout, running up to 7 instances in parallel. Adjust the self.compressProcessesMax to change number of instances.pngoutCompressImages.py {DirectoryWithPngs}
images/dng2png.shConverts .dng files to .png in the current directory. Resulting pngs do not become much smaller with pngout.basename, dcraw, pnmtopng, exiftooldng2png.sh (no arguments)
images/LinScreenshotter.pyTakes screenshots and saves as pngs at approximately one per second. Uses the argument to match a window name substring. May exhibit inconsistent behavior if multiple windows contain the substring.Linux, xwininfo, imagemagickLinScreenshotter.py {WindowNameSubstring}
images/lossyReencoding.pyReencodes an image until it reaches a number of encodings or reaches a loop, as determined by file hashes. Demonstrates generational loss through repeated transcoding.imagemagicklossyReencoding.py {imageFile}
networkUtilities which help perform computer networking operations.
network/ipSwitcher.pyRandomly changes the IP address of the computer.ifconfig, routeipSwitcher.py (No arguments)
network/vpnRandomizer.pyRandomizes VPN configuration file selection.NonevpnRandomizer.py (No arguments)
videosScripts which help with making and processing videos.
videos/audioDedup.pyWorks with ffmpeg to create synchronized audio to deduplicated video frames. Video should be lossless so that duplicate frames are easily discernable. Run only one instance at a time.Linux, ffmpeg, mkvmerge, mpv.audioDedup.py {videoFile}
videos/audioExtract.pyExtracts audio component of video files in the directory where it is invoked.mkvmergeaudioExtract.py .
videos/bmpHandler.pyLibrary to handle 24-bit, uncompressed BMP image files. Saves and loads.NoneImport in Python
videos/cheeseImgDater.pyIncomplete image timestamper.
videos/cheeseSummary.pySummarizes data from my cheese-related statistics.
videos/composite.shMeant to paste backgrounds and images together for soundtrack videos. Requires much manual adjustment. Run in a location containing subdirectory "origImages".imagemagickcomposite.sh
videos/CompressVideos.pyCompresses directory of videos losslessly with VP9 and FLAC. Meant to be used on already-lossless video encoded with OBS or a camera, which prioritize encoding speed over space efficiency.ffmpeg, mkvinfoCompressVideos.py {directoryOfVideos}
videos/Joiner.pyConcatenates all .wav files in current directory in alphabetical order. Fails if formats are different. Run in a directory with .wav files. sox is better at this in modern times.NoneJoiner.py (No arguments)
videos/mp3Extract.pyExtracts mp3s from archives without compression or encryption.Nonemp3Extract.py (Add information to script)
videos/pdfToPng.pyConverts a PDF to a series of paired images. Intended to convert books to video.Imagemagick, pdfinfopdfToPng.py {PDF_to_convert}
videos/randImgMapper.pyCreates a bash script to create symlinks to images in a directory randomly.NonerandImageMapper.py (Add information to script)
videos/SilenceInserter.pyCreates a bash script to create symlinks to segments of silence. Examines current directory to determine how many. Relies on specific naming scheme.NoneSilenceInserter.py (Add information to script)
videos/stringMaker.pyUses a BMP file representing a bitmapped font and an index to convert phrases into images with that font.NonestringMaker.py (Add information to script)
videos/stringWordsToImages.pyUses Imagemagick to convert a sequence of words into images.ImagemagickstringWordsToImages.py (Add information to script)
videos/TargetsAdvanced.pyCreates a bash script to create symlinks for each frame, now with different types of sequences. Intended to be used with MEncoder.NoneTargetsAdvanced.py (Add information to script)
videos/Targets.pyCreates a bash script to create symlinks for each frame named in a specific manner. Intended to be used with MEncoder.NoneTargets.py (Add information to script)
videos/timeIndexToList.pyConverts a time index into a Python list of frame numbers per item.NonetimeIndexToList.py (Add time index to script)
videos/WavIndexer.pyProduces an index of all WAV files in current directory, assuming that they have been concatinated in alphabetical order.NoneWavIndexer.py (No arguments)
wikiUtilities related to Mediawiki content
wiki/WikiCalendar.pyCreates a wikitext calendar.holidays Python packageWikiCalendar.py {year} {numericalMonth}
<style> td { vertical-align: top; } </style>

About

A collection of scripts by Jiseng So. Mostly for videos, one for Dwarf Fortress.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published