with: the lazy programmer CLI tool.

The other day Ricardo came up with an idea which I found great, so we went and implement it. Since then it has grown a nice set of features and I think it’s ready to test the world (well it was a week ago but I haven’t had the time to make the post).

In general the idea is to reduce the ammount of typing you do in the CLI.

I wrote a nice “extensive” readme file, which also showed me the very cool mime type “text/x-trac-wiki” so the link before is directly into SVN with trac wiki syntax formatting, sweet!

Since it’s a one file program there is no need for a installer, so just download it from here. If you are lazy enough the Makefile has a install target, and in case you where wondering the build.xml is just a sample. Although I could make it install the python code just for fun (evil laugh).

Last but not least I finally got my trac up (I’ll add another post for that) but if you find a bug please submit the patch here

Enjoy!

8 comments ↓

#1 TBD » Blog Archive » trac.maetico.com on 06.20.07 at 11:19 am

[…] with and wallpaper thingy  Filed under Uncategorized having Leave a Comment […]

#2 Ivan on 06.21.07 at 7:53 pm

Care to tell us what it does and how without having to download it first?

#3 mae on 06.22.07 at 11:13 am

that’s why you have the README, just click the link and it will show you what it does and how it does it.

#4 Ivan on 07.07.07 at 11:26 pm

It doesn’t really tell me anything, or should I say, it doesn’t seem to do anything I couldn’t just as easily do without calling “with” first. No bashing intended, just don’t see what’s the point. Also, grammar-check the README. That doesn’t help it either.

#5 mae on 07.08.07 at 3:01 pm

Yes of course with is a helper tool, you can do without it and it will work just fine. Let me give you an example you are editing a file and running it so you do

#with %s file
>>> vi
— vi is open and you are editing the file, you exit and it goes back to with
>>> python
this will run the file you just edit.
then you cycle until you get it to work.

another example: you are searching for several patterns in a file just do

$ with grep -i %s bigLogFile.txt
>>> someText
>>> someOtherText

that feature will be better ones I implement the “multiple replacer” in which you could do the following

$ with grep -i %s bigLogFile.txt > %s.txt
>>> someText
>>> someOtherText

and it will create a file for each pattern.

#6 Ivan on 07.08.07 at 6:50 pm

Ah! Now I see it. It does help, and it is a simple yet cool idea. You just need a better explanation.

If I get the time (and will :P), I’ll try and re-write the README description, to better describe what it does, and send it to you, so that if you like it, you may replace the existing one. How’s that?

#7 mae on 07.10.07 at 12:28 pm

sure I’m better with code then words :)

#8 Ricardo Restituyo on 11.14.07 at 12:55 pm

This was one of those weird ideas that came up when i was thinking about the ‘with’ construct in some languages i’ve tortured computers with in the past.

Any news on it?

Leave a Comment