Skip to content
Paul Spooner edited this page Nov 29, 2021 · 1 revision

Over the years I’ve written quite a few python utilities. Most of them are really short, and too specific to be useful to others. Those that aren’t are so long that they don’t feel elegant enough to share.

And then, between these two extremes, are the gems that I find myself coming back to time and again. I thought I’d share these with you. Keep in mind that all of these are covered by the Paul Spooner “IP is Wicked Nonsense” license(in short, everything is public domain) and you are encouraged to evaluate them on their own merits as distinct from their history. If you insist that the origins of ideas are important, then go pledge your support.

TextOddifier.py is a text manipulation script to convert letters in UTF-8 to fairly similar looking letters. It makes text that looks like this ḽӧœĸ ŀįҟԙ ҭԡ༑ṩ ѩʼnᵴťӕаԂ. You can find the source below, or through the link at the start of the description.

BaseConverter_py.py is a number base converter that we collaborated on to convert numbers to and from arbitrary radix. The neat thing about it is it works on floating point numbers as well as integers. The example (and test case) is 135.5 converted to base 12 is B3.6. Going the other way around, S4 in base 35 is 984 in decimal! You can find the source below, or through the link at the start of the description.

Renamer.py Is a short program I wrote to do simple renaming operations on files. It only operates on the files in the folder, so it’s pretty easy to target. I include it here mostly as a syntax reminder. Change “rename” to “renames” to create directories (folders), which are separated by a forward slash.

rand_mcm.py is kind of an odd one. I really like the McMaster-Carr website, and enjoy browsing their catalog for inspiration. Time was when the catalog was paper that you could turn to a random page and peruse it. However, the online catalog is so efficient at delivering what you want that this becomes difficult. I’d also like to ensure that I don’t keep seeing the same page over again, at least until I’ve gone through the whole catalog. This script does all of that, opening a random page of the catalog when you start it, and allowing a save file listing all the pages you haven’t visited yet. Could be easily modified for other things… monte-carlo webcomic binges for example.

NatoPhoneticAlphabetConvertor.py Is a dumb little thing that converts characters into their equivalent in the NATO Phonetic Alphabet. More of a fun toy than a useful tool.

I have enjoyed playing with the Fantasy Genesis book for several years now, and at one point wrote this python script to cut out all the dice rolling. Available as both the original set of options in FantasyGenesis_Default.py and a slightly expanded set in FantasyGenesis_Deep.py

I’ve also uploaded these and some other Python scripts here.

Clone this wiki locally