Zerk Zonehttp://www.zerker.ca/zzone
Pages for the Creations of Ryan ArmstrongSat, 11 Oct 2014 14:45:49 +0000en-UShourly1http://wordpress.org/?v=4.0.1Image Gallery Scripthttp://www.zerker.ca/zzone/2014/10/11/image-gallery-script/
http://www.zerker.ca/zzone/2014/10/11/image-gallery-script/#commentsSat, 11 Oct 2014 14:45:49 +0000http://www.zerker.ca/zzone/?p=459This is a script I wrote to generate an image gallery HTML file for a given folder, or for the Steam Screenshots folder. It will, by default, show the full resolution original image, so it can be useful for browsing a folder of moderate-sized images without having to rely on thumbnails. It can also generate thumbnails of any size if desired. Thumbnails are created into .thumb folders, which will be hidden in Unix-type OSes, but not (unfortunately) in Windows. Finally, the script can double-size and apply aspect ratio correction for smaller images (e.g. NES, SNES or DOS screenshots). These are sized using CSS attributes and do not generate a second copy of the image. Here’s an example gallery of X-Com screenshots with double-sizing and aspect ratio correction.

This can be run without any parameters to create the basic gallery in the current directory. For Windows users, you can also add a shortcut to the script in your SendTo folder to easily create a gallery for any folder by right clicking on it and using the SendTo menu.usage: imagegallery.py [-w WIDTH] [-h HEIGHT] [-s] [-o OUTFILENAME] [-t] [-f] [-d] [-?] [imagefolder]
Creates a gallery of images.

If set, double-sizes small images (320×240 or lower). The image size is set via CSS to be resized by the web browser. Common resolutions of game screenshots (DOS, NES and SNES) are aspect-ratio corrected to 4:3. Not compatible with Steam mode.

-?, –help

Displays this help message and exits.

the script requires Python 3.x and ImageMagick, which also needs to be present on the System Path. The most basic function of the script (gallery without thumbnails or resizing) can be performed without ImageMagick if desired.

]]>http://www.zerker.ca/zzone/2014/10/11/image-gallery-script/feed/0Steam Image Scriptshttp://www.zerker.ca/zzone/2014/10/11/steam-image-scripts/
http://www.zerker.ca/zzone/2014/10/11/steam-image-scripts/#commentsSat, 11 Oct 2014 14:32:05 +0000http://www.zerker.ca/zzone/?p=441After finding most instructions for downloading Steam grid view images to be out-of-date, and same goes for the only grid view downloader I could find, I wrote my own.

I also put together a quick library that can create a dictionary of Steam applications on a given profile based on the JavaScript of the profile page (using JSON).

usage: SteamScreenshotRenamer.py [-h] [-o OUTPATH] profileid
Renames Steam screenshots based on the game name and collects into a common
output path. Must be run from within the Steam screenshot folder or an
external folder containing the “uncompressed copies” of the screenshots.
Uncompressed screenshots will be renamed in place by default.

All three scripts use the same arguments:

positional arguments:

profileid

Steam profile ID. If your Steam profile URL is “http://steamcommunity.com/profiles/12345/”, then the ID would be 12345.

optional arguments:

-h, –help

show this help message and exit

-o OUTPATH

Output path. If not specified, will output to a subdirectory called “Steam Screenshots”, “Steam Grid View Images” or “Steam Logos” depending on the script. For the Screenshot Renamer, Uncompressed screenshots will be copied to this folder if specified; otherwise they will be renamed in place.

]]>http://www.zerker.ca/zzone/2014/10/11/steam-image-scripts/feed/0Convert Midi scripthttp://www.zerker.ca/zzone/2014/10/04/convert-midi-script/
http://www.zerker.ca/zzone/2014/10/04/convert-midi-script/#commentsSat, 04 Oct 2014 13:41:57 +0000http://www.zerker.ca/zzone/?p=436This is script I recently cooked up after picking up MT32 and Roland SoundCanvas sound modules to play midi files and record the playback with said hardware synth. I then encoded the recordings and loaded them on my media player.

If you have a hardware synth (or quality software synth should such a thing exist) you should be able to use this.

usage: convertmidi.py [-h] [-d MIDIDEVICE] convertpath

Converts all mid files in a path to WAV. Uses the tools playsmf to play the midi files and sox to record the resulting audio. Both tools must be present on the system path. You should have your OS configured to record from whichever device the midi output will be sent to ahead of time.

This script also requires Python 3.x. I’ve only tested this in Windows due to better support for my sound card, but there’s nothing particularly Windows-specific about the script. It should run fine in Linux with appropriate versions of playsmf and sox.

It also comes with a reset.mid file I downloaded from somewhere to reset the midi controller between songs in case anything gets stuck/confused. I’d love to also give credit for this file, but I can’t figure out where I got it anymore.

]]>http://www.zerker.ca/zzone/2014/10/04/convert-midi-script/feed/0Gameboy Screenshot Galleryhttp://www.zerker.ca/zzone/2014/07/08/gameboy-screenshot-gallery/
http://www.zerker.ca/zzone/2014/07/08/gameboy-screenshot-gallery/#commentsTue, 08 Jul 2014 20:54:46 +0000http://www.zerker.ca/zzone/?p=430Hello everyone. For the past month or two, I started a project to collect screenshots from (hopefully) every game released for the original Gameboy, and arrange them into a screenshot gallery. Here it is (with some samples), in TWO versions:

]]>http://www.zerker.ca/zzone/2014/07/08/gameboy-screenshot-gallery/feed/0Jetpack levelshttp://www.zerker.ca/zzone/2014/05/17/jetpack-levels/
http://www.zerker.ca/zzone/2014/05/17/jetpack-levels/#commentsSat, 17 May 2014 12:31:19 +0000http://www.zerker.ca/zzone/?p=420So I was reminded recently that I have a bunch of Jetpack levels on my hard drive I’ve never uploaded. Many of these aren’t really that good, some are sort-of embarrasing (World of Words Part 2), but there are a few Gems I’m mostly proud of. Some might actually be created by my friends, but it’s been so long I can’t tell them apart any more. Here they are:

]]>http://www.zerker.ca/zzone/2014/05/17/jetpack-levels/feed/0Media Player Sync Scriptshttp://www.zerker.ca/zzone/2013/12/07/media-player-sync-scripts/
http://www.zerker.ca/zzone/2013/12/07/media-player-sync-scripts/#commentsSat, 07 Dec 2013 14:50:37 +0000http://www.zerker.ca/zzone/?p=411Having had trouble with media-player sync solutions in Linux, I decided to roll my own Python script to synchonize my media player automatically, and cover format conversion & playlist restructuring. Like the gmusicbrowser script, it’s not particularly user friendly. However, it should be useful for a variety of media players. Let me know if it works for you.

Download

]]>http://www.zerker.ca/zzone/2013/12/07/media-player-sync-scripts/feed/0gmusicbrowser playlist exporterhttp://www.zerker.ca/zzone/2013/11/10/gmusicbrowser-playlist-exporter/
http://www.zerker.ca/zzone/2013/11/10/gmusicbrowser-playlist-exporter/#commentsSun, 10 Nov 2013 14:37:43 +0000http://www.zerker.ca/zzone/?p=404So, this is a script I wrote a while ago to interpret the gmusicbrowser database format in python, then automatically create a series of playlists. It’s a little bit hackish and not particularly user friendly, but I’ve tried to document it reasonably well. If you’re a moderately technical user who uses gmusicbrowser, give it a shot and let me know if it’s useful for you.

Included in the download are three files:

gmusicbrowserplaylistexport.py

The module that does all the work

gmusicbrowserplaylistexport.html

Documentation for said module

exportplaylists.py

An example export script that uses the module to export a series of playlists.

When you download this, have a look at the exportplaylists.py file to get an idea of how it works, then modify to suit your database/export needs.

Download

]]>http://www.zerker.ca/zzone/2013/11/10/gmusicbrowser-playlist-exporter/feed/0Cranberry Granola Barshttp://www.zerker.ca/zzone/2013/01/06/cranberry-granola-bars/
http://www.zerker.ca/zzone/2013/01/06/cranberry-granola-bars/#commentsSun, 06 Jan 2013 14:20:35 +0000http://www.zerker.ca/zzone/?p=394This recipe is very similar to the Chocolate Granola Bar recipe, but with slightly adjusted proportions. This should work equally well with any other dried fruit. I’m not quite as happy with this recipe, so any suggestions are welcome.

3 cups

Rolled (Large Flake) Oats

1 1/2 cups

Additional Grains/Cereals

1/2 cup

Coconut

1 1/2 cups

Dried Cranberries

1 1/2 cup

Water

6 tbsp

Cornstarch

1/4 cup

Liquid Honey

1 tbsp

Brown Sugar

Preheat oven to 350 F (175 C)

In a bowl, mix the rolled oats, grains, cranberries and coconut.

Measure the water, and add the cornstarch to the water (keep in the measuring cup). Stir the cornstarch until consistently mixed.

In another measuring cup, measure the honey and add the brown sugar.

Heat a large frying pan/stir fry pan on the stovetop at high heat, then add the cornstarch/water mixture. Stir and wait until the mixture is a consistent gel.

Add the honey and sugar to the mixture and stir until consistently melted.

]]>http://www.zerker.ca/zzone/2013/01/06/cranberry-granola-bars/feed/0Chocolate Granola Barshttp://www.zerker.ca/zzone/2013/01/06/chocolate-granola-bars/
http://www.zerker.ca/zzone/2013/01/06/chocolate-granola-bars/#commentsSun, 06 Jan 2013 14:15:32 +0000http://www.zerker.ca/zzone/?p=390And now for the Granola bars. These chocolate ones are my favourite. I use PC Ancient Grain/7 Reasons cereal for my “additional grains”, but you can always use additional nuts/seeds/etc if you aren’t allergic to most of them.

3 cups

Rolled (Large Flake) Oats

1 1/2 cups

Additional Grains/Cereals

1/2 cup

Coconut

1 1/2 cups

Chocolate Chips

1 cup

Water

4 tbsp

Cornstarch

Preheat oven to 350 F (175 C)

In a bowl, mix the rolled oats, grains and coconut.

Measure the water, and add the cornstarch to the water (keep in the measuring cup). Stir the cornstarch until consistently mixed.

Heat a large frying pan/stir fry pan on the stovetop at high heat, then add the cornstarch/water mixture. Stir and wait until the mixture is a consistent gel.

Add the chocolate chips to the mixture and stir until consistently melted.