Monday, December 15, 2008

Drivel & Updated install.sh

Ive been rather busy with a new job, loving it to :)

I have also written another perl app that I will release when I cbf (media playing related). The app also needs some fine tuning yet.

Ubuntu dist upgrade to intrepid fucking ruined my pc. By ruined I mean, the yanking of binary legacy nvidia drivers. My main pc has been faithfully acting in its second roll as media pc. I run a matrox g550 for the desktop and my trusty old ASUS Nvidia TNT2 Ulta (reow). Needless to say, I was pissed - I had encountered the issue previously and managed to resolve it with a custom kernel compile. Not this time though, spent far to long trying everything else but a reinstall.
Having spent far to long avoiding a reinstall, i did it. Then noticed today my install.sh for namefix.pl was not correct. After fixing the stupid stuff I noticed that force install for cpan was no longer working (did it ever work ?). So I googled around, and found this great thread below with a guru giving out his fix.

http://www.perlmonks.org/?node_id=606768

The updated install.sh
echo installing modules

sudo perl -MCPAN -e "CPAN::Shell->force(qw(install Tk));"
sudo perl -MCPAN -e "CPAN::Shell->force(qw(install Tk::JComboBox));"
sudo perl -MCPAN -e "CPAN::Shell->force(qw(install Tk::DynaTabFrame));"
sudo perl -MCPAN -e "CPAN::Shell->force(qw(install Tk::JComboBox));"

echo install script

sudo chmod a+x ./namefix.pl
sudo rm /usr/bin/namefix.pl
sudo ln ./namefix.pl /usr/bin/namefix.pl

This has been corrected in my private wip version and will be included in the next release.

Saturday, September 27, 2008

namefix.pl 4.0.1 - CLI Returns

Welcome back to CLI mode which has been missing since version 2.0.
Its funny how things seem to come full circle, back in 2000 when I started this app it was a very simple command line tool that grew into a gui app. Now 8 years later the command line interface has been put back in. I never intended to take out the cli but I simply lost the 2.0 cli only code while I went mad learning to use the Tk widget set.

New CLI Features:
  • The new cli interface boasts nearly full access to namefix.pl options and once I am done it will have complete access.
  • Short and long style options are supported
  • Can save options as default from cli interface
  • Can output to a console (or gui if u want) html webbrowser using --html, defaults to elinks atm (extremely handy for id3 mode).

Notes:
  • The current options names are not set in stone, think of them as placeholders for better names which Im waiting on users like yourself to suggest.
  • HTML mode really does rock.

namefix.pl 4.0.1

Friday, July 11, 2008

SUSE rpm packages now available

Seems some nice person / people decided to make and release namefix.pl 4.0 rpms - yay.

namefix.pl 4.0 for SUSE 10.0 10.1, openSUSE 10.2, 10.3, 11.0

Thanks to Toni Graffy for creating the rpm.

You can also do the SUSE 1 click install for namefix.pl.



Might work on creating a .deb for debian and ubuntu myself when I get the time unless someone beats me to it *hint hint hint*.

Thursday, July 10, 2008

namefix.pl perl module install guide

For all users running namefix.pl as a perl script (ie unix & osx) who encounter dependency issues try running these commands:
perl -MCPAN -we 'install "MP3::Tag"'
perl -MCPAN -we 'install "Tk"'
perl -MCPAN -we 'install "Tk::DynaTabFrame"'
Should these commands fail (Tk insists on passing all its tests, for namefix.pl 90% pass is more than enough most times) try force installing the modules:
perl -MCPAN -we 'force install "MP3::Tag"'
perl -MCPAN -we 'force install "Tk"'
perl -MCPAN -we 'force install "Tk::DynaTabFrame"'



On other news, I am slowly working on the namefix.pl cmd line options, if anyone has a copy of the old 2.0 cmd line version please email me. Please feel free to help with the options, Im still deciding on what letters will = what functions.

The initial cmd line version with use the following syntax:
namefix.pl -[options] [file/directory]

much like the original 1.0 and 2.0 versions, but once that has been sorted I will do a proper unix style namefix.pl:
namefix.pl -r --sp:spaces --case [file/directory]

This will come once Im happy with the cmd line code.

Saturday, July 05, 2008

4.0 - finally

Well here it is, 4.0 in all its overdue glory.

I am finally happy enough with the code to call it a .0 , plus now my focus can shift to some of my 5.0 goals that have been long overdue. For starters I will be resurrecting the command line interface and implementing a gtk/qt3 gui (all depends on which one is the most portable and support by perl).

I will of course remake the win32 installer and package the source with the release. Its not high on my list of priorities but it will get done. If someone else would like to do it I would be very grateful.

Changelog:
  • enabled block rename window to be resized nicely, same for br_show_list windows (ie br preview).
  • sorted mp3 genres
  • reverted fn_readdir removal of '.' and '..' back to a for loop. I had not noticed but occassionally a dir will list a file before '.' and '..'. this leads to a file being omitted when I truncated the dir array by two. This was a very rare occuring bug that I thought I had allready squashed.

Thursday, May 15, 2008

namefix.pl 4.0 RC12

Done a lot of work since the last release, squashed all known bugs (that I can remember). The Block rename feature has become a real good feature for myself and a few other users I send WIP code to, I hope everyone else finds it as useful. I shall write up a tutorial on blockrename and post it somewhere permanent.

Turned out removing use of $_ was a lot more involved than I though, about 4-5 years ago I felt the most sane solution for dealing with perl find was to make fixname use $_ by default. I have since changed my view on the topic and done a lot of recoding to make fixname and all subs receive passed variables which is a much more common practice.

Enough drivel I suppose, here is the changelog (drivel in bullet point format):

4.0 RC12

  • blockrename filter now checks to see if a filter string has been entered (like main window)
  • a recursive list now uses the same format as preview and run
  • arrows only printed in hlist if text is a file.
  • rebuilt find_fix again, recursive renaming issues resolved. The problem was caused by find changing directory.
  • fixnames 1st plog was set to level 4 instead of 3, fixed.
  • fixname was still addressing $_, fixed
  • set escape_string to log level 5

  • filter is now a checkbutton, will not be enabled if there is no filter
  • updated dir_filtered sub to be more efficient
  • rebuilt find_fix sub (again) while tracking down recursive issues.
  • removed now empty gui/misc.pm
  • removed redundant sub multiscolly
  • added new config tab 'debug' for debug options
  • shifted config gui code to gui/config_dialog.pm
  • shifted bulk of the main dir dialog stuff to dir_hlist.pm
  • found 'filename - - 02x01.avi' becomes 'filename - - - 02x01.avi' was being caused by double up on replace words.
  • fixed preview not counting possible renames

  • removed the 2nd call of fn_replace in fixname, was causing duplication issues.
  • added (very basic) help menu
  • plog level 0 prepends ERROR> instead of DGB0>
  • added new feature & flag ERROR_STDOUT, which prints errors to stdout (duh)
  • added new feature & flag LOG_STDOUT,

  • pressing stop 2x will set the LISTING flag to 0, seem to have some issues with stopping when listing a large directory. This is a work around for the moment until I trace down the real issue.
  • new global flag ERROR_NOTIFY - toggles error dialog's
  • .. does not get listed in the new fields. (nice cosmetic fix I felt)
  • .. was getting printed 2x, fixed
  • added code to br_cleanup to prevent null values been sent to subs and causing issue mentioned below (was being caused by lists not matching in length, should a rename be attempted namefix errors).
  • added code to prevent 'Use of uninitialized value' errors in fixname
  • added sub br_txt_clean, removes trailing crap from new filenames when cleanup button is pushed in block rename gui. Handy for copying filenames from a html table (ie tvu.org.ru).
  • removed redudant escape filter code from ls_dir
  • added new global flag FILTER
  • block rename can use main guis filter

Sunday, April 13, 2008

namefix 4.0 RC11 win32 repack

namefix 4.0 RC11 win32 repack

Seems I still need to learn howto use the perl package a bit better, for whatever reason its not including the libs directory. Simply extract the namefix folder to c:\program files and run the reg file. No installer at this point as I need to update the nsi script and I just dont have the time atm.

Friday, April 11, 2008

namefix 4.0 RC11 - win32 release

Ye Olde Direct Link Here

Sorry for the lag in win32 releases, its just that I cbf :P

namefix 4.0 RC11

Here it is, 4.0 RC11, heavily buffed & polished and closer to the elusive 4.0.
I decided to release it before I get to distracted with this other program Im writing at work. I think all that really remains before 4.0 (apart from cleaning up my own messy code) is a full test of recursive feature.

Notes:

I havent had time to fully test recursive renaming (itself and with the undo).
Still havent looked into the windows bug, mentioned in previous post, though I may have fixed it while sorting out another problem**.


4.0 RC11 Changelog:
  • Mon Apr 7 2008

  • removed a bit of redundant code from fixname
  • filter wasnt working in recurisve listing / renaming - fixed
  • if match_filter gets passed a blank string it will error - this shouldnt happen
  • match_filter 1st checks for empty filter, if so returns 1 (its quicker).
  • created ls_dir_print_passthru (little hack) so ls_dir_print gets a var passed from find
  • ls_dir_print no longer uses $_, instead gets passed a var like a normal sub

  • Sat Apr 5 2008

  • undo now uses fullpaths
  • made a little hack for file find so fixname no longer uses $_
  • colourfied the main guis buttons
  • adjusted dynamic tabs size for better fit of entry widgets
  • removed readdir sub, no calls to it left - was masking perls internal readdir command.
  • removed last of nf_error calls

  • /04/2008

  • nf_error subroutine and calls completely removed, now using plog 0 for error msgs
  • plog statements added to bookmarks.pm
  • new global flag RUN
  • All run, list and preview subs now check to see if a previous listing/ rename/ preview is running - if so it aborts with an error msg.
  • fixed issue with blockrename failing on filenames containing whitespaces at the begining or end.
  • removed redundant nf_error

  • 2/04/2008

  • removed old print statement from sub undo_rename
  • removed undo menu entry, replaced with undo gui menu entry
  • started work on undo gui (leading to multi level undo).

  • 1/04/2008

  • got preview list working correctly
  • set block rename to read old file list from txt box and not re-read directory - causes rename misalignment.
  • added a new plog0 should sub br get passed a blank new filename.
  • block rename uses new hlist for results as well.

  • 31/03/2008

  • Large amount of code formatting for namefix.pl file
  • started implementing a hlist for the block rename preview

  • 27/03/2008

  • fixed error with br_readdir not returning any list
  • br_read_dir now preforms a ci_sort on the arrary before returning
  • added more tooltips to blockrename gui
  • tidied txt_reset routine
  • created new error, after blockrename the txt is not reset
  • fixed main hlist being blanked when using blockrename, prep_globals was the offending sub
  • started seperating gui code
  • new sub for main hlist clear

  • Wed Mar 26 2008

  • started using dates again in changelog, Im a slacker :P
  • shifted sub br_readdir from misc.pm to blockrename.pm
  • improved handling of blank line in blockrename
  • thanks now uses show_dialog
  • changelog now uses show_dialog
  • added stop button to block rename
  • added stop check to fn_rename
  • added show_dialog func which will replace some generic dialogs I usewhen plog recieves a 0 it uses show_dialog to display error msg
  • replaced preview button with checkbutton tied to main preview var
  • preview displays a window now
  • stop button added for stopping listing and renaming
  • coloured stop, list and run buttons in a traffic light theme
  • update delay is disabled when renaming
  • fixname subs dont plog results if no changes to string / filename
  • tidied nf_print a bit
  • organized and padded buttons on blockrename gui
  • more plog statements added to: manual rename, hlist_cd, nf_print
  • if hlist_cd cannot change dir it resets \$main::dir to the original value
  • ** when hlist_cd changes a dir, main::dir is set to cwd for a sane dir varaible

Thursday, March 06, 2008

win32

Hey all, I have started checking out namefix.pl on win32 again. Might release a bin later on (we will see). Some issues have been encountered already though.

Issues
  • namefix.pl does not list correctly when working in the base dir of a drive ie f:/

Also thanks to this site here http://www.bribes.org/perl/ppmdir.html If it wasn't for the site, I probably would not bother with win32 as active perl has discontinued Tk in their repository.

Friday, February 29, 2008

4.0 RC10

Warning Do not use r4.0 RC9 for blockrenaming - update now

Wasnt expecting a update so soon but there was a serious bug in blockrename.

4.0 RC10 Changelog
  • start of blockrename preview (hidden for now)
  • block rename uses fn_rename instead of perls, this makes it obey overwrite mode, fsfix and check for tmp files,
  • fixed bug where blockrename was still reading from dir filtered when preforming rename, so editable left side of block rename would mislead user.
    Caught myself out on this one, hopefully noone else.
  • plog in all blockrename functions
  • blockrename will not process lists that do not match each others length

Tuesday, February 26, 2008

namefix.pl 4.0 RC9

Well I have broken my own release rules again and added several features. I felt these features are neccesary for the 4.0 vintage version Im aiming / hoping for.

No windows release atm, since I havent been coding much at all in win32 lately, I will make a release soon enough.

Of quick note there is a undo feature and also logging. I shall ramble on about the changes later as I am quite tired tonight. Here is the changelog.

4.0 RC9
* logging added and currently enabled by default, logs to ~/.namefix.pl/logfile.txt
debug level is set in global vars atm
* block rename: the original filename list is now editable.
why ?, so you can trim entrys you do not want renamed, if the file does not exist
it is just skipped. This was originally going to be buttons allowing top/bottom
entry to be deleted but I felt this was simpler if not elegant, (it was also very
easy todo).
* front & end append routines are run after all cleanups
* added kill patterns & kill common words routines to 2nd run like below
* replace/remove (same function) is run 2x, the 2nd run is just before final cleanups.
This should improve matching user entered words
example: filename \"Some.File.Ripped.By.Mem.mp3\"
user rmword \"Ripped By Mem\"
would normally fail but now will be caught
* shifted listing of .. to top of ls_dir routine rather than have other routines
attempt todo it themselfs.
* manual & block rename do not relist directory on exit unless rename occured
* depreciated &readdir func due to conflict with perls CORE::readdir, naughty jacob
fn_readdir is its replacement.
* blockrename func uses Process Dir option
* undo only gets overwritten by new renaming action
* internal dir listing routines overhauled
* blockrename uses filter
* added basic 1 level undo functionality, works for block rename & normal batch renaming
* linux default font size decreased
* blockrename window size adjusted
* blockrename references current filename for file / dir / string checks
* blockrename clean button now applys all mainwindow cleanups to list
options are controlled by mainwindow still
* fixed killwords weirdness when using builtin list
* created gui update_delay routine......
rather than update everytime a new list entry is added it does updates every N times
has made gui alot faster :)
* id3 & fn case issue resolved thanks to fixing guess tags
* guess tags guesses of the new filename not the old one (doh)
* truly massive cleanup of code in fixname.pm (sub routined most of it)
* fixed folder icon not showing for .. listing when renaming
* added FQM, OMiCRON & 0TV to rm word list
* rearranged main windows widget drawing order for a slightly nicer start (Im happy with it :P )
* cleaned up bookmark code, updated notes on bookmark hack
* removed several debug prints

Wednesday, January 23, 2008

McRant with McFries

OK, I know this review has been there for awhile on download.com but here is my retort.

Namefix.pl's no-frills interface is not particularly attractive, nor is it easy to grasp at first glance. Like similar renaming utilities, Namefix.pl offers several renaming options including the ability to remove, replace, or append characters; rename MP3 files based on ID3 tags; and modify character case. Also, it can clear symbols and digits from file names. You can filter files and folders, and preview before applying modifications.

Unlike similar apps, Namefix.pl doesn't have the capability to revert file names back to their originals. We also had a tough time learning how to operate certain features, including Scene, Padding, Enumerate, and Truncate options. A more comprehensive help file would've been better than the brief tool tips that are offered. The program claims integration with Windows, but this feature didn't materialize during testing."

OK, rather than my rant aimlessly I shall dissect this POS review.

"Namefix.pl's no-frills interface is not particularly attractive, nor is it easy to grasp at first glance."
  • So bitterness but no actually criticism *shrug*, I am more than open to suggestions but from my user base I get nothing but good reports.
"Unlike similar apps, Namefix.pl doesn't have the capability to revert file names back to their originals."
  • Yes, its not 100% idiot proof. That is what the preview button is for which is auto enabled @ the start and after every run / preview. Post 4.0 will provide some minor undo functionality. Adding extra code to prevent DSO Errors isn't a top priority for me as it is incredibly boring and does not improve functionality.
"We also had a tough time learning how to operate certain features, including Scene, Padding, Enumerate, and Truncate options."
  • I do find it strange the reviewer for download.com is quite possibly the most ignorant person to use my program ever. Lets take truncate, you can truncate from the front, middle or end of the file name (still with me ?) then you enter how many characters you would like to truncate, then (this is the hard bit) you click run (with preview mode enabled by default) to confirm that your options are going to provide the results you want. Again I have no problems with constructive criticisms but this read to me like a big old whinge.
"The program claims integration with Windows, but this feature didn't materialize during testing."
  • Right click on a folder in explorer, click namefix.pl. Im sorry but this complaint really shat me off. Namefix.pl has had explorer (add konqueror) integration since the 1st GUI (there were a few releases where the reg file was not packed into the nsi installer - so sue me).
So in summation, while I do appreciate reviews I also appreciate it if the reviewer bothered to take more than 1 minute to use the program before slamming it. To all the software users and reviewers out there: Don't be shy, drop the programmer an email - you never now the feature you request may be one he just never thought off, program got a bug ? let him/her know as they may not have struck it themselves. Interface could be more intuitive ?, write and suggest how.