see command line tool xtreme
A wonderful thing about SubEthaEdit 2.1.1 is the see command line tool.
If your living a lot in the terminal then the first thing you might want to do is set the EDITOR environment variable to 'see -rw', in bash this would be done by adding a
export EDITOR='see -rw'
to your
~/.bash_profile. Now everytime a standard unix tool wants you to edit something, the file is opened in SubEthaEdit and the tool will wait until you close the window before it will proceed.
-w, --wait is for the waiting,
-r, --resume will bring the Terminal.app to in front again after you close the window.
Another interesting switch is the
-j, --job-description option. What it does is it puts the following string in the corresponding see window title. E.g. in my ~/.subversion/config there is:
[helpers]
editor-cmd = see -wr -j "SVN CheckIn"
so my svn checkins look like this:
Now let's go to the more elaborate things. I bet many of you know and love the
find command, especially combined with the
xargs command it can be extremely useful. A typical example for find is finding and deleting files you don't like. E.g. the dreadful Thumbs.db you get from your windows users when you get images from them. So a simple:
find . -name "Thumbs.db" -delete
gets rid of them. Thats all quite nice, if you know exactly what your searching and doing, cause otherwise you either delete accidently, or get prompted on every file. So what if you want to delete many files but maybe not all of them? You use
see to have a semi-automatic workflow.
find . -name "*.jpg" | see -r -t "Delete Files" | tr '\n' '\0' | xargs -0 rm
Now you can have a look at all the filenames, delete the filenames you wish to keep out of the document, close it, and deleting begins. Be cautious, when piping out, closing the window does not cancel the outer action. To cancel the deletion you have to control-c in the corresponding terminal. The extra
| tr '\n' '\0' | xargs -0 ensures that spaces as well as quotes in filenames work
I used this cause I wanted to delete all thumbnails out of a directory structure. Problem was the thumbnails were named uniquely so you could tell it was a thumbnail by its name, but no simple regex would match all variations. Another way of achieving this would have been to pipe the find into see, blockedit an rm in every line and save it as an script.
Another similar one, measure the size of a hand selected number of photoshop files in the current directory and below:
find . -name "*.psd" | see -r -t "Count" | tr '\n' '\0' | xargs -0 du -hc
Or a more programming oriented variant, measure the lines of code of your project, removing third party stuff by hand:
find . -name "*.[hmc]" | see -r -t "Lines Of Code" | tr '\n' '\0' | xargs -0 wc -l
I think you get the idea...
And now going into recursion... kind of. Open a selection of txt-files in see:
find . -name "*.txt" | see -r -t "Open in SubEthaEdit" | tr '\n' '\0' | xargs -0 see
BunkBlog even used the piping to do remote editing via ssh. nice.
So what do you do with the command line tool?
Samstag, 27. November 2004, 21:56 |
Permalink
|
Comments (2)
"Our Leader"?
Someone please tell me
this is a hoax. Please. If not, what's next? "Hail Bush"?
[via
blogitics.com]
Dienstag, 23. November 2004, 18:44 |
Permalink
|
Comments (0)
SubEthaEdit 2.1.1
After long hard work we finally released SubEthaEdit 2.1.1. Amongst other things I was responsible for XHTML export (I'd say you'd guessed from the colored snippets I was posting here all the time :-) ), printing and the style preferences. IMHO it's a really great release. So many new features, so many fixes. E.g. to all you tab users out there: With 2.1.1 tab now really is a first class citizen. Besides adding the entab/detab menu items, shift left and shift right now convert spaces to tabs when in tab mode and blockedit works flawlessly when tabs are involved.
If you were indecisive about buying a copy, I think this release is a worthy candidate to make you change your mind. If we still miss features you like to have: take some time and add them to our bugtracker. We really value your input, and features like "Copy with Styles" would not be in there if it wasn't for your requests.
I'm wondering if anyone of you has already personalized their syntax highlighting. We'd really like to see what kinds of colors you like! Go ahead and shoot us an email with your .seestyle in it.
That's all for now, but stay tuned for some nice tricks you can pull with the new 2.1.1. Share and Enjoy!
Samstag, 20. November 2004, 12:26 |
Permalink
|
Comments (0)
Delicious Library - Really so Delicious?
Short answer: sadly no. Why?
- it's really way too slow.
- Big Point: Delicious Monster puts itself in the attributes when linking to amazon and is therefore acting as amazon partner and getting money for every sale after such an link - bad move.
- Absolutely no indication of support for remote access or even cooler rendezvous support. The only way for me to publish my library is to print it (and that even won't let me define order or the attributes I want to print)... (the least would have been a HTML export)
- Every link with this small little arrows points to amazon. I would like to go imdb for movies, and have the possibility to decide for myself where this arrows link to
- Even though I cannot change where the arrows link to, it always links to amazon.com where most of my items aren't in store...
- Some of the metadata pulled from amazon is just crap. There is so much useless information that is put in "genre"
- Many missing details, from the context-menu to the non-resizable details window and pane, the search button and add button should be more prominent in the upper right corner, no way of viewing my library more space saving, no cool detail view for multiple items, "Find by Title" although the creator is also searched for, find by title finds books when adding movies, no "next page" for search results, much to much debug information put in the console.log, display bugs (find again writes itself over the title), as a german I'm not able to find an english version of "Harry Potter 5", ...
So I'm really disappointed. It really looks good, but good looks isn't everything. Maybe all of this will be worked out in future versions, but IMHO this release is a beta at best.
Mittwoch, 10. November 2004, 21:45 |
Permalink
|
Comments (0)
Election Maps USA 2004
Look at the difference:

Although the lower map might make you want to throw up, it is the more meaningful one. The areas of the countys have been adjusted to represent the population, and not the amount of land. To find out more please read:
Election result maps.
[Via lummaland.]
Dienstag, 9. November 2004, 01:16 |
Permalink
|
Comments (0)