Projects


Below is some of applications that I have written for an array of reasons, and still use regularly
Most are written in dot-net as I have found it the most robust and general purpose lang.
I consider all but Hotkeys and to a lesser extent Rss Expander to be beta versions.
If the permissions have been incorrectly set (403 Error) please click here to reset them.
If anyone wants to ask me something email me: gleesonger@gmail.com
I apologise in advance for my severe lack of commenting!
Ger.

Hotkeys


Lang: C#
Purpose: Runs in the background and runs a program\opens a file (Shell execute) when a certain key combination is preesed, eg Ctrl+Alt+N To open Notepad
Appears to work very well

Shadow


Lang: C#
Purpose: Allows a member of DCU to browse\search all students\alumni\staff of DCU and get relevent information
Has been recoded to work without the use of Rebrick Tunneling and instead make a direct connection to the ldap server. Not publicly avaiable for the time begin.

Dublin Bikes


Lang: php
My first step into the world of web servers and scripting, this script generats a kml file which creates a layer ontop of google maps describing the current location and state of all dublin bike terminals.
If your using an iPhone then this is better Fusios app

Rss Expander


Lang: Java
Purpose: A cronjob has been set up to fire this application every 15mins.Its purpose is to connect to a sql database and retrieve a list of rss feeds which are then scraped and parsed, goes to the articles webpage, identifies the main article, and creates a duplicate feed with the content expanded to contain the full article.
This means that a rss aggregator will have the exact same feed but with fully body content
An example of this is Bloomberg Irish Banks
Actually this is an expansion of an rss feed I created, the reason being bloomberg dont offer rss feeds and online webpage2Rss are expensive
So I created a dummy feed (using another small app) from the orgianl webpage (The exact serach criteria may have changed)
The source for the class which extracts the main article is hard linked to the below project and *should* be the most recent version.
This is the 3rd version of this project and will most likely be the last.For the most part it appears stable, some errors occur but they appear to be sporadic at best and non repetitive. #Minor update:When the blocks of text are identified in the webpage they are now checked against the feed item desciption to help identify the desired article, check is doing using the Levenshtein Distance algoritim.

Extract Webpage Main Article


Lang: Java
Purpose: Used in Rss Expander the purpose of this class ExtractMainArticle is to locate and extract the main article in a html document.
It does this by trying to locate tags which have a high textual content.Firstly stripping out the pages script tags and passing the page through JTidy to clean it up.
Then iterating through the html nodes and assinging each node a value corresponding to the character count within the node, after which grouping the nodes together.
Some nodes such as anchors are ignored whle summing up the character count, while an anchor may provide some textual content it provides a higher textual weight when in list tags. Ie. the total count of characters in all the anchors of the main article should represent a low precentage while those contained in sidebar links would be a high percentage.
A node status is then set which relates to the type of node ie a paragrpaph node is given a TEXT status while a script tag is given a DEAD status.
The article is basically the largest group of TEXT nodes in a row, the size depends on the text count of the node\subnodes. After locating the main article it is then cleaned up, empty nodes are stripped from the end and start of the article and if present a posted tag is removed, by posted tag I am refering to the single line which resides at the top of most articles eg "This article was sumitted on the 23-Nov-09 by Joe Blogs", the articles title\heading is also removed
Any pictures at the very top of the article are moved to the end, this was done for my own purpose and can easily be switched off.
This article is then appended to an ArrayList and its length recorded as the max length (Upper Bound), sweeps are continuly done ignoring all previous articles until an article is found with length less than half that of the upper bound.The article which physically appers first on the page is returned, this hopefully returns a correct result when used on pages with large comments.
The class has a main method: java ExtractMainArticle [url] {["true"] [proxyHost] [proxyPort]}, eg java ExtractMainArticle http://www.someurl.com true proxy.dcu.ie 3128 1> MainArticle.txt 2> output.txt
The class is basically a single static method and there are no paramaters to be set, anyone wishing to use this code, may which to alter this for example a boolean switch to turn off removing the headline etc.
I found a nice implementaion and explenation of the overall idea of How to Extract a Webpage's Main Article Content.

Chrome Mailto Gmail

The script Mailto.vbs registers itself with the mailto protocol, so when a mailto link is clicked it will open gmail composing an email in the default browser.Only really needed for Chrome as it doesn't have a built in way to hadle this yet, but it will work just fine for other browsers.
The script needs to be run once so that it can register itself, other than that nothing needs to be done (It will need to be run if it is moved\renamed).
Update: No longer seems to work on Win7, this is a perfect replacement http://gmaildefault.codeplex.com/

Renew IP

Lang: C#
If your using an eircom netopia router this will connect using a telnet connection and reset the dsl connection, this causes the dynamic ip address to be updated.
As the dsl and not the router is reset your computer will remain connected to the box.
The main reason for using such an app is if you download from filesharing hosts like rapidshare\megaupload which restrict downloads to an ip address.
For downloading from filehosts this app is best used with Crypt Load
Command line switchs accepted are /silent and /autoclose
Note: This has only been tested on my own router\firmware, I can't say what will happen on another box, so be warned (It will probably just do nothing).

Sync Files

Lang: C#
Requirements: Server -> any OS running ssh,java;Client -> Windows running java,.Net Framework
Purpose: Sync files across a ssh connection, manily used for syncing files on a server (Any OS) with those on a windows machine SyncFiles.exe is a wrapper program it launchs pink to login to the server and remotley run the java file server, when this is correctly running, SyncFiles starts the client java app.The client is directed towards a local port which is forwarded by plink to the server.
SyncFiles can be started in silent mode so syncing ocurrs in the background.Task Scheduler can automate this process.
Nearly all servers will be running ssh and have java setup so nothing should need to be installed apart from transfering a jar file to the server.
Most Windows machines will have the .Net framework installed but some may need to have java installed, which can be downloaded from here
The applications used in this package are JFileSync and plink

Sync Photos

Lang: C#
Purpose: After getting a camera I realised that I couldnt just copy the photos off the memory stick onto the computer
as the camera renames the files, and I had no idea what were the new pictures (A list of 3000 photos isnt nice to look at)
So this app compares 2 directories and finds new files (Isn't restricted to photos but it was written for this puropse)
It ignores file names and only compares files by content it then copies the new files into a dated directory.Works very well

Flights Scraper


Lang: C#
Purpose: Scrapes airlines websites.It is ment for people who don't really care where or when exactly they fly once it is cheap.
It takes a period of availability and a list of destinations, then quickly finds the price of all flights.
Allowing the user to choose the best dates\price.I know personly Ive spent a while on Ryanair flicking across pages looking for cheap flights.
It uses a system of plugins loaded on startup so a new airline can easily be added.Currently written airlines are Ryanair,Aer Lingus and Aer Arann
The code isn't brilliant I have left too much to the plugin, I should have given the main app more control
so that all plugins acted similarly.However as I write the plugins it aint much of a problem.
Note: This is no longer mantained and the plugins will begin to fail as the airlines change their websites.

C&S's Registration

Lang: C#
Purpose: As part of C&S day students need to register with the clubs this is a nice interface for which they can do this.
It displays data in a HTML table format (Internal Web-browser) but from this it can easily be exported to Excel.(Right Click-> Export)
It also allows merging and comparing of diffrent data files, handy if more than 1 laptop is inuse.
Written in about 4hrs and only after a year of learning how to program I would expect the code to be messy, but it gets the job.
It backs up the data just incase an error occurs.As far as I remember the backup is append only while the current file is complied down.
Ie the appeded only files has every little change like name editing, students removed, the compiled version is only the recent data.
If you want to restore to the backup first delete the current data file "DCURC_Registration.dat" then open the app (should be empty) and merge with the backup.

Context Menu

Lang: C#
Purpose: Enables\Disables the content menu items.Ie when you right click a file your given a list of options
This can safely remove these, its not very comprehensive but it does work sometimes when other apps like ShellMenuView fail.
Not used to much anymore but the odd time it comes in handy
It must be run under Admin privlages.