Saturday, August 14, 2010

Playlist maker for android using SL4A(android-scripting)

NOTE: I have already created an APP that don't need android scripting installed here.

This is a simple tool for your android phone to make playlist by folder using android scripting. You need SL4A with python for android for this to work. You can download it at
http://code.google.com/p/android-scripting/
or with

and


Then just copy paste this code and run it. By default playlist is created at /music/playlist so make sure you have that folder in your sdcard. It also finds all mp3 files in your sdcard and will name the playlist by path. Here it is

import android
import os
import string
droid = android.Android()

directory = None # put list of folder to gen m3u or leave empty for all folder
m3upath = "/sdcard/music/playlist"
musicpaths = None

def createPlaylist(dir):
    files = os.listdir(dir)
    files.sort()
    songs=""
    for file in files:
        if file.find(".mp3") != -1:
            songs += file + "\n" 
    if songs != "":
        path = m3upath+"/" + dir.replace("/sdcard/","").replace("/","_") + ".m3u"
        f = open(path , "w")
        f.write(unicode(songs,"utf-8").encode("utf-8","ignore"))
        f.close()
        print "created " + path + "\n"

def listDir(dir):
    if not dir.startswith('.') and os.path.isdir(dir):
        files = os.listdir(dir)
        createPlaylist(dir)
        for f in files:
            if os.path.isdir(dir +"/"+ f):
                listDir(dir +"/"+ f)

if not os.path.exists(m3upath):
    print "error: m3u path do not exist."
else:
    dir = directory and directory or os.listdir("/sdcard/")
    for d in dir:
        listDir("/sdcard/"+ d)



I coded this in my phone cause I was too lazy adding songs one by one, unless there is already a way to do this automatically that I didn't know of.
Friday, July 2, 2010

Grand Fantasia Bot

If you are looking for a bot in grand fantasia, then you found the right place. I made a bot for grand fantasia. It's open source at google code.
You can checkout the guides at http://gf.bot.altlimit.org

This bot supports almost everything you will need, except auto giving of rep quest, but you can do the repetitive task using another tool found on that forum called AutoMouseClicker.

Here are some summary of the bot features:
  • Waypoint system
  • Auto buy/sell stuff
  • Gambits system (setup conditions for skills and almost anything here)
  • Email notifications
  • Sprite Trainer
  • And more