[TxMt] Project Stats & a bug?

Reprisal nepenthereprisal at aol.com
Sat Sep 30 07:13:43 UTC 2006


I've attached a few simple commands I hacked up to practice my ruby.   
There may be better ways to do these so any input is welcome.

The first one "Show TODO - ignore list" is pretty basic.  On the  
first line of the script it takes an array of patterns of files to  
ignore while parsing your project.  Its should be pretty easy to  
enter your list even if you don't know ruby, just follow the  
example.  Ideally I'd like to make it so you can set the list  
externally somehow to make it easy.

I wrote this because the TextMate.each_text_file was parsing  
everything in the project folder, regardless if I removed it from the  
project or not.  I have a "vendored" version of edge rails in one of  
my project folders, and seeing a list of all of DHH et al.s comments  
was hindering my use of the TODO.

The other two commands go together.

"Project Statistics" displays the total word count, line count, and  
bytes on the tool tip for the entire project.
"Project Statistics - Full Output" displays the same information for  
each file in the project as well as the totals as html

Both of these commands use each_text_file with an ignore list as  
well, so they suffer the same limitations and advantages.

I wrote these cause I had to work on a horrible web system from the  
pre-standards days all day today and I wanted to see just how ugly it  
was.  I found out - they have more javascript for their drop down  
menus alone then the entire prototype library contains.

William

p.s. Allan: If I run any of these commands, regular todo or my  
versions, on a group of files from a top level directory like /Users/ 
username my textmate will lock up for a very long time, at least  
unless of course I have a lot of ignore flags set.  Not too hard to  
avoid, certainly less than ideal.  Is there a better way to iterate  
over project files?

p.p.s Thank you for all your hard work and amazing program.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060930/7278cd5f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tm-project-stats.tar.bz2
Type: application/octet-stream
Size: 3479 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060930/7278cd5f/attachment.bz2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060930/7278cd5f/attachment-0001.html>


More information about the textmate mailing list