bored, give me a program to write.

Discussion in 'Programming & Software Development' started by Foliage, Jan 22, 2012.

  1. GhostofSilence

    GhostofSilence (Banned or Deleted)

    Joined:
    Sep 24, 2011
    Messages:
    91
    Location:
    Northern NSW
    Looking for a good workout timer program. That I can adjust to variable round times and rest periods.
     
  2. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    I want something where I can point the app at my uTorrent download directory, and it will copy all the TV Shows to the appropriate directory.

    Obviously it'd require some setup where you'd set a filter rule like *the*office* goes to > E:\Media\TV\The Office\
     
  3. gruntLOL

    gruntLOL Member

    Joined:
    Aug 11, 2007
    Messages:
    3,073
    Location:
    Adelaide
    sickbeard. manual post processing.

    Profit
     
  4. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,061
    Location:
    Sleepwithyourdadelaide
    Done.

    Source code included
    http://dl.dropbox.com/u/1428435/AudioShuffler.zip

    If you leave the "Accepted file extensions" blank it will parse all file extensions. The program saves its history in your user profile so directories, extensions and options are all remembered when you close the app for next time.

    If you accidentally point it at C:\ just hit "Strip numbers only" and it will undo everything it did. The only time it won't undo is if you have files like this:

    1. file.mp3
    2. file.mp3

    If you hit strip numbers you will be left with:

    file(1).mp3
    file.mp3

    as the program automatically adds (1), (2) on the end if you have files with the same file name. The only way this could happen is if you had manually named the files with 1,2 etc before hand.

    Any bugs/additions etc let me know and I'll add them in.
     
    Last edited: Jan 22, 2012
  5. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,061
    Location:
    Sleepwithyourdadelaide
    Let me understand exactly what you want.

    Eg here is a list of files within the same directory:

    a.mpg
    b.avi
    c.wav
    d.mpg
    e.mpeg

    You want them renamed to:

    userdefinedname - 01.mpg
    userdefinedname - 02.avi
    userdefinedname - 03.wav
    userdefinedname - 04.mpg
    userdefinedname - 05.mpeg

    I'm feeling pretty nice today so I can add a listbox that lets you drag and drop if the alphabetical ordering is not optimal.

    Is this what you want?
     
  6. TERRA Operative

    TERRA Operative Member

    Joined:
    Jul 8, 2005
    Messages:
    6,925
    Location:
    Niraikanai
    That's pretty much exactly it. The input filenames will be things like "latestdownload [720P][crchash][etc,etc] - ep01.mkv or whatever, but will be listed in the folder in order.

    Just need to disregard the original filename and enable me to rename the files as you described.
     
  7. Penfold

    Penfold Member

    Joined:
    Jun 27, 2001
    Messages:
    292
    Thanks, works perfectly Foliage!
     
  8. Menthu_Rae

    Menthu_Rae Member

    Joined:
    Mar 19, 2002
    Messages:
    6,875
    Location:
    Northern Beaches, Sydney
    There is already a program to do all of this... Bulk Rename Utility (Windows) - or on Linux, KRename or pyrenamer.
     
  9. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,061
    Location:
    Sleepwithyourdadelaide
    No problems glad you like it! :)

    I bet I can do a better more specialised job :)
     
  10. TERRA Operative

    TERRA Operative Member

    Joined:
    Jul 8, 2005
    Messages:
    6,925
    Location:
    Niraikanai
    Bulk rename utility is one of those apps that tries to do everything, it's way above what I want to do. I can't be bothered with 25 different ways to rename a file with 17 different options for each permutation. You seen the UI for that behemoth?

    I just want to rename a few files in one hit, I don't want to take more time setting the options than it would take to just do it manually........
     
    Last edited: Jan 22, 2012
  11. dacow

    dacow Member

    Joined:
    Sep 16, 2007
    Messages:
    458
    Location:
    Sydney
    I would love you long time too for a simple app like this :)

     
  12. voltare1

    voltare1 Member

    Joined:
    Jun 6, 2002
    Messages:
    399
    I would like an application that can go through multiple folders (from a root folder?) and tell me which MP3's are named the same and which one is the larger file size/bitrate. then possibly allow sampling of each one so as to allow deletion/moving the duplicate file.
     
  13. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,061
    Location:
    Sleepwithyourdadelaide
    There are applications that use the digital signature of the file (frequency analysis) which do a much better job than comparing just file name.

    I would recommend using one of these as it will be able to name all your music correctly, download album art and delete the useless ones. Even better is apples new feature that for I think $30 a year you can upload all your pirated music, it will hash them and give you access to a full quality version streaming of all your music via any platform.
     
  14. fnp

    fnp Member

    Joined:
    Apr 20, 2004
    Messages:
    880
    Renamer or EpNamer is probably what you want. Renamer is general purpose file renaming utility (simple and too the point), and EpNamer does that but can retrieve episode names from an online database and name your TV shows appropriately.
     
  15. zach

    zach (Banned or Deleted)

    Joined:
    May 1, 2009
    Messages:
    3,614
    Location:
    chermside.bris.qld.au:80
    The bitrate index of an mp3 file is 16-20th bytes, so you could easily fetch that in a byte array rather than using frequency analysis lol.

    Good job though OP.
     
  16. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,061
    Location:
    Sleepwithyourdadelaide
    Done.

    http://dl.dropbox.com/u/1428435/BatchRename.zip

    Pick in the folder you want, pick search subdirs or not, then type in the extensions you want, or for all files just leave the field blank.

    Hit "Find files"
    Then drag and drop the files in the order you want if alphabetical isn't suitable
    Hit "Generate new names"
    If you are happy hit "Rename"

    The undo button doesn't function currently, if I get bored I will implement it. There are profile based save settings, so your previous used folder/extensions etc will remain when you reopen the program.

    Well guys thanks for playing, I think that will do for tonight. Feel free to post more requests, the most interesting/challenging (challenging doesn't equal time consuming) request I will do next.

    :)


    I mean frequency analysis eg fourier analysis, not analysing the bitrate. Eg if you have a 320kb vs 180kb mp3 with the first 20 seconds missing (eg totally different bit rate, file size blah blah) it will still detect that they are the same song and if they are on an online database it will be able to tell you the song name, artist, album etc, download album art even if if the file name is "random.mp3".

    The same way shazam works, pretty neat huh?
     
    Last edited: Jan 22, 2012
  17. zach

    zach (Banned or Deleted)

    Joined:
    May 1, 2009
    Messages:
    3,614
    Location:
    chermside.bris.qld.au:80
    Whoops, how could I forgot FFTs haha. Yeah ridiculous, but I'd imagine writing the actual implementation/algorithm wouldn't be easy.
     
  18. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,061
    Location:
    Sleepwithyourdadelaide
    The whole point is there are already programs that do this....
     
  19. Rzeractor

    Rzeractor Member

    Joined:
    May 23, 2003
    Messages:
    5,135
    Location:
    Cacapoopoopeepee
    This shouldn't take too long to do, but reckon you can create a small app that will list certain files in a certain extension and output it into xml/html/xls file?

    I run raid 0 for the sole reason = more space, so yer if it ever collapses I know what I had on the drive at least:thumbup:
     
  20. TERRA Operative

    TERRA Operative Member

    Joined:
    Jul 8, 2005
    Messages:
    6,925
    Location:
    Niraikanai
    Works ok, Don't want to bug you seeing as it's something you did in your spare time, but the files rename from 0, not 1, (01, 02, 03 format would be better) so I'll just have to insert a dummy file into all the folders I want to rename so the actual files start from 01 I guess.
    Also when I hit 'Find' is there a way to get to the desktop without finding it via the C: drive through all the directories etc, and make the 'find files' and 'generate names' buttons work automatically?
    Drag and drop into the list of files would be great too, as well as being able to shrink the window down further (I use an Eeepc) if you ever revisit this app. :)


    Thanks for that though, I'm not expecting for you to spend time on this if you don't want to, Just letting you know of future improvements if you ever want to kill some more time. :)
    I'll see how it goes, Thanks!
     
    Last edited: Jan 22, 2012

Share This Page