The Trotch Guide To Running Php5 Console Scripts With Links To Trotch

Currently Available:

  • xrns_merge.php
    Idea spawned from this thread.
  • xrns_randomizer.php
    Idea spawned from this thread.
  • xrns_ogg.php
    Compress XRNS using OGG

Link To Scripts:

WINDOWS USERS SCROLL DOWN AND DOWNLOAD THE GUI, IGNORE THE REST OF THIS POST

Advanced windows users who want to learn how to run command line scripts, Full Frontal Newbie Regarding xrns_merge.php

First, the goal is to get the open source zip.exe and unzip.exe extracted from Info-Zip. (How to Unhide File Extensions for Known File Types in Windows) These links should work for you but if they don’t, see previous link to Info-Zip, and find the correct version for your OS.

UNZIP: ftp://ftp.info-zip.org/pub/infozip/win32/unz552xn.exe
ZIP: ftp://ftp.info-zip.org/pub/infozip/win32/zip232xn.zip

The first file is self-extracting, the second is a regular zip file. Extract these files (lZArc for Windows) and pull out zip.exe and unzip.exe. Put these in your path (example C:\Windows\System32) You only need zip.exe and unzip.exe. All the other files aren’t necessary. If you don’t want them, don’t keep them.

Next it’s a matter of installing PHP5 on your system. You could download it directly from PHP.NET or you can download a webserver package like XAMPP which comes with Apache, Mysql, etc. This “other stuff” in XAMPP is not needed for the scripts. But, you might want to consider it if you want to explore making web apps and the full PHP spectrum.

Next, get a text editor that doesn’t suck. I use Jedit but a newbie should probably use something like Context. There are other choices, I just gave you two free ones, but feel free to use whatever.

Is all that stuff installed now? Good.

Next, find the command prompt. On my XP box (at work) it’s Start -> Accessories -> Command Prompt. Double click it. Type zip -v If that doesn’t work you messed up. Type unzip -v If that doesn’t work, see previous comment about messing up. Go back to square one.

Type php -v If that doesn’t work or returns something lower than PHP 5.2.X, you need to set the path to PHP. Exit the command prompt and read this. Add the PHP dir to the path. In my case it’s C:\Program Files\xampp\php. Optionally, instead of setting up the path type “C:\Program Files\xampp\php\php” instead of php every time you want to run a script.

Next, download the script(s) (i.e. cut and paste it into your text editor and save it as xrns_merge.php somewhere)

Next, go back to the command prompt, go to the directory you saved your script. (CD - Change Directory Command)

Finally, php xrns_merge.php “C:\Some Path\To\Song1.xrns” “C:\Some Path\To\Song2.xrns” newname.xrns

If a bunch of shit appears on the screen, read it, that’s an error message that will help you solve the problem. If everything worked, then newname.xrns will have been created in your current working directory.

New script: xrns_ogg.php

New front end windows GUI for all scripts available, developed by Beatslaughter, requires testing, please test:

Download GUI

Discussion about all of these tools is in this thread.

PS, if you use the GUI/run Windows, ignore the first post in this thread.

Everything is self contained. You don’t need to download anything except the linked file above. It works very very very easily and is very very easy to install.

Please test and report bugs in this thread.