Based on suggestions from Allan I've revised the Fetch Categories command to work with a multi-select menu (using osascript). You can now just choose multiple categories at once and it will insert the text "Category: your_category" for each selected item. Once again, this is only tested with Wordpress on my end, so I'm curious to hear if it works with other blogging software.
I have also made the command available for download at: http://blog.circlesixdesign.com/downloads/FetchCategories2.zip
I'm having a lot of fun writing commands and snippets, but I'm no programmer. If anyone sees fit to clean up the code, feel free, and I'd love a copy to learn from if you do.
Brett
On 29 Sep 2006, at 12:41, Brett Terpstra wrote:
Based on suggestions from Allan I've revised the Fetch Categories command to work with a multi-select menu (using osascript). You can now just choose multiple categories at once and it will insert the text "Category: your_category" for each selected item. Once again, this is only tested with Wordpress on my end, so I'm curious to hear if it works with other blogging software.
This was on my todo list to have a go at writing sometime in october. Now I can cross it off and finally can use just TM to blog! (I used to have to go into TM to refresh my mind on which categories I have.)
Thanks Brett!
C
____________________________________
Caius Durling UK Student tel: +44 (0) 7746 746039 email: inemo@mac.com nemo8686@mac.com web: http://caius.name/ http://qwert.us/ ____________________________________
For some strange reason, the dialog to choose the blog appears three times (I have 3 blogs in my setup file)
Would fix it myself, but I'm still in Ruby infancy :D
BTW, thanks for a killer bundle...
---------------------------------------------------------------------- Ale Muñoz http://sofanaranja.com http://appleweblog.com ----------------------------------------------------------------------
Here's a fix. Sorry about that, I'm still fumbling with the XMLRPC interface. I set up a second blog for testing and got 3 dialogs, just like you. I think I had it going through the endpoint procedure for the blog_id, username and password, each. It should pull all the information just once now. It also now correctly recognizes a cancel command from the multi-select menu.
Does anyone know why you sometimes get a beachball cursor when the menu comes up and sometimes you don't? By that I mean that the beachball doesn't go away, you can actually click your choices with it. I'd like to prevent that if I can.
Thanks, Brett
On 10/1/06 4:16 AM, "a!e muñoz" bomberstudios@gmail.com wrote:
For some strange reason, the dialog to choose the blog appears three
times (I
have 3 blogs in my setup file)
Would fix it myself, but I'm still in Ruby
infancy :D
BTW, thanks for a killer
bundle...
-------------------------------------------------------------------
Ale
Muñoz
http://sofanaranja.com http://appleweblog.com --------------------------
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Works like a charm!
Thank you very much! :D
--
Ale Muñoz
On 1/10/2006, at 15:31, Brett Terpstra wrote:
[...] Does anyone know why you sometimes get a beachball cursor when the menu comes up and sometimes you don't? By that I mean that the beachball doesn't go away, you can actually click your choices with it. I'd like to prevent that if I can.
This is because TM is actually responding to events while running the command which in turn opens the AppleScript dialog.
That would normally mean no busy wheel at all, but that’s not good UI, e.g. for commands which takes a long time to run. So TextMate will activate the wheel cursor itself if the command has been running for 3 seconds *and* did not bring up any dialogs.
So the busy wheel will appear when it takes more than 3 seconds to reach the first dialog of the command. I can increase the delay to 5 or maybe 7 seconds.
No, don't increase the delay just because I write commands that take ridiculously long times to run, assuming a 3 second delay is working for everything else. I don't suppose there's a cursor command in Applescript that lets you set the cursor or override the busy wheel?
On 10/1/06 9:26 PM, "Allan Odgaard" throw-away-1@macromates.com wrote:
On 1/10/2006, at 15:31, Brett Terpstra wrote:
[...] Does anyone know why you sometimes get a beachball cursor when the menu comes up and sometimes you don't? By that I mean that the beachball doesn't go away, you can actually click your choices with it. I'd like to prevent that if I can.
This is because TM is actually responding to events while running the command which in turn opens the AppleScript dialog.
That would normally mean no busy wheel at all, but that¹s not good UI, e.g. for commands which takes a long time to run. So TextMate will activate the wheel cursor itself if the command has been running for 3 seconds *and* did not bring up any dialogs.
So the busy wheel will appear when it takes more than 3 seconds to reach the first dialog of the command. I can increase the delay to 5 or maybe 7 seconds.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 2/10/2006, at 4:46, Brett Terpstra wrote:
No, don't increase the delay just because I write commands that take ridiculously long times to run, assuming a 3 second delay is working for everything else.
No, it comes up for a few other commands as well, mostly only the first time the command is executed (where “resources” needs to be loaded from disk).
I don't suppose there's a cursor command in Applescript that lets you set the cursor or override the busy wheel?
I am not aware of any. But come to think of it, I could actually poll the state of open dialogs every half second or so, after I have activated the busy wheel, and disable it again, if a dialog window opens.
Woohoo! I'm a contributor!
Thanks, Brett
On 10/2/06 5:23 AM, "Allan Odgaard" throw-away-1@macromates.com wrote:
On 1/10/2006, at 15:31, Brett Terpstra wrote:
Here's a fix [...]
I have now added this version to the blogging bundle (and removed the old category snippet).
I made it sort the list of category names and then I did minor code changes which have no functional value ;)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate