Category Archives: Projects

Applications, systems and websites that I’ve put together over the years

Daily Backup Folder Projects | Software & Sites 05 JUN 2008

After slapping together some backup software that I needed both for my ongoing SAN (Storage Area Network) project as well as for my personal Work Projects repository (which now stands at 21419 files, 5271 folders and weighing in at 3.16 GB worth of content), I realised that I have been a little more than slack when it came to announcing my newly released projects as I finished them here on this blog (like I used to do in the past).

As always, a full list of my released projects can be found at http://www.commerce.uct.ac.za/services/codeunit under the projects link.

So without further ado, here is the latest release to my stable (please note that it is currently undergoing its bug fix iteration and may not be on the released projects list at the time of this post):



Daily Backup Folder

Daily Backup Folder allows the user to select a folder which they wish to back up to another location, and then backs up that folder on a daily basis to the specified backup location.

If an existing backup folder is located in the specified location, then Daily Backup Folder simply copies over newer files than those already existing in the backed up location.

Created by Craig Lotter, June 2008

*********************************

Project Details:

Coded in Visual Basic .NET using Visual Studio .NET 2008
Implements concepts such as Timers, Folder Manipulation, File Manipulation, Threading
Level of Complexity: Simple

DailyBackupFolder



Oh, and just in case you thought I had maybe been a little on the lazy front in terms of software creation this year, the following lists the projects that were created this year (but does not include the projects that underwent updates, which actually number more than just a few!):

– Daily Backup Folder
– Commerce IT Screensaver 2
– Excel Sheet to HTML Table
– SAN FMS 2
– LiveCheck Alerter
– Bertie Barnard Screensaver 2
– PDF Generator IMG2PDF
– Shotgun Search and Replace
– CodeUnit Project Update Folder Preparation
– Slyph SlideShow

Related link: http://www.commerce.uct.ac.za/services/codeunit

SAN Space Projects | Software & Sites 15 FEB 2008

SAN LogoOkay, so while I haven’t had much luck in finding time to actually work on my software interface for the SAN system, the hardware finally arrived (just as our supplier LightEdge went bankrupt and liquidated naturally) and with the final piece, a four port network card, installed yesterday, I am now unfortunately expected to be ready to rumble ASAP!

The Storage Area Network unit that we’ve attached to the webserver is a networked box basically that is fully RAIDed so that it is completely mirrored and the end result is that I have 7.5 terrabytes (TB) of space to play with!

7.5 terrabytes of space? Damn that might take a while to fill! :_)

Online PDF Generator Projects | Software & Sites 05 DEC 2007

pdf generator logoOkay, okay so I posted about initial tentative steps in the creation of a tool way back in post {0104}. Unfortunately, life and work in particular got in the way and I actually never ended up finishing The Watcher: PDF Generator project. In fact, I even scrapped what I had been doing and moved on with other, more important projects.

That is, until now when I eventually got tired of a particular lecturer bugging me to convert files for her, mainly because she doesn’t understand how to do it with the tools she currently has. So my Online PDF Generator project was reborn. Two and a half days later, you can now view the results of my handiwork at www.commerce.uct.ac.za/PDF. The application accepts Word documents, PowerPoint presentations, Excel worksheets as well as any other text-based documents. You simply upload your file, wait for the reply email containing a link to the generated PDF, and then download your prize. Simple, hey?

On that note, November 2007 wasn’t a bad month for programming at all. I created 11 new projects and updated a further 4 of my works. Seems like UCT’s CMS for lecturers, Vula, really is taking some web work off of my hands :)

As per usual, details of all my projects can be found at www.commerce.uct.ac.za/Services/CodeUnit/CodeUnit Projects.

Of course December is going to be dismal in terms of programming output, but only because I’ll be enjoying two weeks worth of holiday! And because I have to exclusively work on the critical Commerce IT SAN system of course’ – :(

Silent Hunter Projects | Software & Sites 01 OCT 2007

The latest addition to my CodeUnit Applications stable:

Silent HunterThe rise in illegal P2P applications on the UCT network is cause for alarm, especially when students start abusing the lab machines for their own purposes. Silent Hunter is an application that has been written to run in the background on a lab machine and kill any recognisable P2P application instance should it be started up.

Silent Hunter also logs all kills with the Commerce webserver, attempting to log time of instance, current Novell user as well as the process killed.

Note that it runs the check every 5 seconds.

The processes that Silent Hunter looks for are listed in the “ProcessList.txt” file located in the main application folder. An example of its contexts would be as follows:

StrongDC.exe
PeerWeb DC++.exe
ApexDC.exe

Note that you can extend the search by either prefixing or suffixing ‘*’ to the process name (Wildcard Character). This means that

StrongDC*

would match on

StrongDC++
StrongDC.exe

Silent Hunter also reports it’s kill to the commerce webserver using the following URL:

http://www.commerce.uct.ac.za/Services/########## – Removed for privacy sake.

Note: Silent Hunter can be started with a display window by launching it like this

Silent Hunter.exe show

or

Silent Hunter.exe /show

Text File Case Changer Projects | Software & Sites 21 SEP 2007

text file case changerThe latest utility in my CodeUnit arsenal…

Text File Case Changer

Text File Case Changer allows you to change the text contained within a plain text file to either lower case, upper case, title case, proper case or sentence case. The application parses the entire file during the operation.

*********************************

Project Details:

Coded in Visual Basic .NET using Visual Studio .NET 2005
Implements concepts such as text file manipulation.
Level of Complexity: Very Simple

Related link: http://www.commerce.uct.ac.za/Services/CodeUnit/CodeUnit%20Projects/

MD5 Hash Prefixer and Image Size Standardiser Projects | Software & Sites 03 SEP 2007

Two more quick and dirty applications that I needed can now be found under the CodeUnit banner.

MD5 Hash Prefixer

MD5 Hash Prefixer takes all the files in a specified folder, creates a MD5 hash for all the file names and then prefixes that hash to each file name. Note that the folder parsing is not recursive in nature.

The files are all backed up before the process is undertaken.

md5 hash prefixer screenshot

Image Size Standardiser

Image Size Standardiser allows you to force all the image files in a specified folder to either a specific width or height (in pixels). The images are all stretched and shrunk to meet the required measure, though this is done while maintaining the image’s original aspect ratio.

The files are all backed up before the process is undertaken.

image size standardiser screenshot

Related link: https://github.com/craiglotter/

Daily Image Mailer Projects | Software & Sites 16 AUG 2007

Daily Image MailerMy latest piece of fairly useless software creations :)

Daily Image Mailer is program that sends a random file from a specified folder to specified email addresses using a supplied address of an available SMTP mail server. The file that is selected is sent as an attachment with the email along with the user specified message.

Once a file has been sent, it is removed from the input pool and moved to a sent folder. Once all files in the input folder have been removed, all the items from the sent folder are moved back to the input folder.

The mail is sent out twice a day, at a time specified by the user.

For more information, click here (select the Daily Image Mailer section)

Related link: http://www.commerce.uct.ac.za/Services/CodeUnit/CodeUnit%20Projects/

Junk File Generator Projects | Software & Sites 10 AUG 2007

junk file generator screenshotSometimes you need throwaway files for various testing purposes or simply to take up required hard drive space. So I quickly whipped up the following application to make life a little easier (if you must know, I needed these junk files to circumvent a file-sharing app’s minimum required share. Sneaky I know, but I don’t want anyone really downloading much stuff from me :P).

Junk File Generator is used to create junk files of any specified size. The file is created by writing single bytes to a file until the desired amount of bytes have been written.

For more information, click here (select the Junk File Generator section)

Related link: http://www.commerce.uct.ac.za/Services/CodeUnit/CodeUnit%20Projects/

The Watcher: PDF Generator Projects | Software & Sites 31 MAY 2007

For a change, I actually did some work at work today. For no reason other than what I can, starting today Im whipping up an online PDF generator application for the Commerce website. And as per usual, my solution is definitely not the most elegant on the planet.

PDFGenerator

Basically my application is structured as follows. I have a simple two page web interface which will allow the user to upload a file for conversion purposes. They will also be asked to include an email address with the upload, a vital part to my nefarious process (You can preview the upload page here: www.commerce.uct.ac.za/pdfgenerator – obviously the system doesnt work yet though). All files get uploaded to a specific folder and are obviously renamed appropriately in order to avoid name clashes. The upload script uploads the file and straight after uploading the submitted file, creates an associated text file containing the submitted email address. Once this file is created, a blank complete confirmation file is generated as well.

Now behind the scenes we have the main application running on the server. The Watcher: PDF Generator simply implements a .NET folder watcher component, meaning it is basically polling a specified folder for any file activity. Once it detects a complete confirmation file in the input folder, it grabs the three associated files into its temporary folder where it begins the actual work. Using an asynchronous shell wrapper to basically run a command line call to an existing document converter (TotalDocConverter.exe), The Watcher allows a 3rd party application to generate the similarly named PDF file (Again the file is renamed to avoid name clashes, this time by appending a timestamp to the end). [Note I generally follow this procedure of wrapping existing applications to bend them to my will when I dont feel like recreating their functionality from scratch. Unethical? Yes. Life Simplifying? Most definitely!]

The generated PDF file is then moved to the specified output folder and its URL is then emailed to the supplied email address. This URL is active for 48 hours and should give the user plenty of time to snag their PDF document.

The Watcher: PDF Generator is also responsible for clean up duty, removing all unprocessed as well as processed files after a 48 hour grace period.

I started this application today and have completed the web interface section already. The main application is coming along nicely, so I should have this project wrapped up tomorrow then :)