Archive for the ‘programming’ category

Cube Swap Lock, out now!!!

June 25th, 2015

It’s finally out. After delaying to improve the interface from user testing the app is now on the app store, its taken a while but I think the extra work was totally worth it, it plays fantastically and the addictiveness of the game is far better than I thought it would be. Why not download it now for free and try for yourself

Torrent Linker: Update

October 29th, 2010

A while ago I came up with a python script to link torrent newly downloaded torrent files to a folder allowing you to manage data more effectively whilst seeding. However I have only just realised that the initial script does not work as the importer appears to have removed the spaces at the start of each line making the code unusable. As I cannot find my original code here is an update that also features a twitter integration to send you a twitter message when a file has completed.

All you have to do is modify the items inside of “Modify These Variables”, also ensure to set your torrent program to move your completed torrents to the ‘torrentfilesdirectory’ folder

import os
import sys
from commands import getoutput

#Declare Variables
ary_errors    = []
ary_directory = []
ary_tracker   = []
ary_torrent   = []

#Modify These Variables
torrentfilesdirectory = "/torrent/torrentfilescompleted/"
torrent_completed_dir = "/torrent/completed/"
link_directory        = "/torrent/links/"
torrent_move_to_dir   = "/torrent/torrentfilescompletedandlinked/"
twitter_username      = "##########"
twitter_password      = "##########"

#Add list of torrents into variable
torrent_list = getoutput("ls " + torrentfilesdirectory)

#=====================================================
def WorkOnTorrents(line):
 #Read data from torrent
 directory = getoutput("btshowmetainfo \"" + torrentfilesdirectory + line + "\" | grep \"directory name:\"")
 directory = directory + getoutput("btshowmetainfo \"" + torrentfilesdirectory + line + "\" | grep \"file name.....:\"")
 tracker = getoutput("btshowmetainfo \"" + torrentfilesdirectory + line + "\" | grep \"announce url..:\"")

 #Modify the directory variable
 directory = directory.split(": ")[1]

 #Modify the tracker variable
 try:
  tracker = tracker.split("\n")[0].split("/")[2].split(":")[0]
  torrent_valid = "Works"
 except:
  torrent_valid = "Fails"

 print tracker;

 #Add torrent variables to arrays
 if torrent_valid == "Works":
  # Check Against Identified Errors
  if tracker == "":
   ary_errors.append(line);
  else:
   ary_tracker.append(tracker);
   ary_directory.append(directory);
   ary_torrent.append(line);

torrent_list = torrent_list.split("\n")
for line in torrent_list:
 WorkOnTorrents(line)

#=====================================================
## Create Links
print "Executing Links"
for i in range(len(ary_tracker)):
 os.system("curl -u " + twitter_username + ":" + twitter_password + " -d status=\"" + ary_torrent[i] + "\" http://twitter.com/statuses/update.xml")
 print "Creating Link for: " + ary_torrent[i];
 if os.path.exists(link_directory + ary_tracker[i]) == 1:
  os.system("ln -s \"" + torrent_completed_dir + ary_directory[i] + "\" \"" + link_directory + ary_tracker[i] + "/" + ary_directory[i] + "\"")
 else:
  os.system("mkdir " + link_directory + ary_tracker[i])
  os.system("ln -s \"" + torrent_completed_dir + ary_directory[i] + "\" \"" + link_directory + ary_tracker[i] + "/" + ary_directory[i] + "\"")
 os.system("mv \"" + torrentfilesdirectory + ary_torrent[i] + "\" " + torrent_move_to_dir);

#=====================================================
## Display Error Torrents
if len(ary_errors) > 0:
 print "Errors Found:";
 for i in range(len(ary_errors)):
  print ary_errors[i];

Xbox Achievement HTML Creator Update

November 25th, 2009

Hello all,
I’m currently rewriting the code from scratch, the new code is written in python as its much cleaner than using .net code. The new code has many new features including:
– Multi OS support
– Faster creation of pages (due largely because the program downloads source only rather than leaving an ole to download the full page with flash, images, etc to ensure full data)
– Modular based.. ish (The code will feature a modular system to it meaning that new parts can be added into the code at any time, one feature in the pipelines is a twitter mod that sends out a twitter status update everytime you get a new achievement although there is a rather annoying bug I’m still yet to patch up)
– New graphs (Currently working on the last big graph but its a good one)

The only thing left to do at the moment is to check for consistancy and ensure that all user modifications has a globalised setting

I’ll upload the code at some point in the very near future. To check up on the status get to http://twitter.com/severedspirit, I’m always updating it and I often update on the code progress

XBOX Achievement HTML Creator v0.2

April 13th, 2009

Xbox Achievement HTML Creator v0.2 is out –> http://www.megaupload.com/?d=DS97VOX2
I decided to knock the version down to 0.2 while we get everything sorted

This includes a faster grabber which only gets data from games that you have achievements for. The other main feature is to create a graph that shows where you stand between you and another player, great for bragging rights, anyway, if you have any feature srequests or notice any bugs then please leave a comment

XBOX Achievement HTML Creator v1

March 22nd, 2009

It’s finally released, the XBOX Acchievement HTML creator, what this does is creates a html file that shows all of your achievement pictures on one page, nice. There is no logging of the username and passwords but if you don’t believe me then run tcpdump or similar to check the traffic.

If anyone has any ideas or suggestions to improve this then please leave a comment, anyway, enjoy

This can be downloaded here HERE

New App. Xbox Achievements Viewer

March 15th, 2009

Hey alls, sorry I haven’t been on recently, been really busy, a sorry present I bring you my new app (hopefully to be released sometime this week), its a .Net application to produce results of the gaming achievements in xbox live as a web page. It’s fairly basic but the code should allow me create additional extras should they be needed.

If anyone has any queries or suggestions please feel free to get in contact :)