Jump to content


Photo

TinyURL Service 0.2


  • Please log in to reply
8 replies to this topic

#1 Sparks

Sparks

    Atlantis Author

  • Root Admin
  • PipPipPip
  • 1,791 posts
  • Gender:Female
  • Location:Seattle, WA
  • Interests:Cocoa, Obj-C, iPhone, horses, writing

Posted 05 April 2007 - 01:57 PM

Note: version 0.3 of this service is out. Notes here.

So, evidently this little service tool has gotten some posting coverage, in TUAW and a few other places. Yipe! So, here's a quick second release. smile.gif

I've added a new 'Shrink URL to Clipboard' service as requested, so that you can still shrink a URL in a non-editable text-field; it just puts the result on the clipboard instead of replacing the original.

http://www.riverdark...isc/TinyURL.zip (service)
http://www.riverdark...TinyURL-src.zip (source code)

I've repackaged it as a simple drag-and-drop as was suggested; you can drop it into ~/Library/Services to have it just for one user, or into /Library/Services to have it system-wide. To uninstall the old version, just delete /System/Library/Services/TinyURL.service; a restart /is/ still required, but that's a limitation of Apple's system-service stuff... I can't really get around it.
Rachel "Sparks" Blackman
Riverdark Studios

#2 geo

geo

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 08 April 2007 - 10:29 AM

Hi, I just discovered your tool and I think it will be quite useful.

However, I have a comment and a problem:

1. On my System (10.4.9 on MacBook, Germany) there is no folder: /System/Library/Services. This is the same if I run the system in German or English.
In my Libary there is a folder "Services" in "Documentation" (i.e.: /System/Library/Documentation/Services), where I put TinyURL.service, and apparently it works fine.

2. I shrunk this link, which I have bookmarked:

http://www.teltarif....a...0&spalten=5

and got this result:

http://tinyurl.com/2ojeg9

which, when put in Safari, brings this answer from the server:

BAD request!
Both key/value pairs and simple query used!


So, does Tiny URL not work for database queries, or what did I wrong?

The problem might be related to special characters encoded in the URL (Ägypten = German Umlaut: Ä), I tried with Afghanistan, and it worked.

Thanks,
Georg

#3 Sparks

Sparks

    Atlantis Author

  • Root Admin
  • PipPipPip
  • 1,791 posts
  • Gender:Female
  • Location:Seattle, WA
  • Interests:Cocoa, Obj-C, iPhone, horses, writing

Posted 08 April 2007 - 12:43 PM

Ah... yeah, I thought TinyURL would need some things escaped that it appears from your link that it didn't, and in fact keeps right intact in the goo.

I'll change the escaping logic later and do another release, but I'm about to head out for Easter dinner (lunch, whatever), so I'll toy with that later.
Rachel "Sparks" Blackman
Riverdark Studios

#4 jaysoffian

jaysoffian

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 09 April 2007 - 07:52 PM

FYI, http://www.macosxhin...200502042003188

I wrote a TinyURL service way back then. It doesn't work properly in Mail.app since 10.4 for a reason I haven't ever investigated.

#5 Sparks

Sparks

    Atlantis Author

  • Root Admin
  • PipPipPip
  • 1,791 posts
  • Gender:Female
  • Location:Seattle, WA
  • Interests:Cocoa, Obj-C, iPhone, horses, writing

Posted 09 April 2007 - 08:48 PM

No service works completely reliably in 10.4 Mail.app, except the read-only services. It's because Mail.app mucks about with the pasteboards in a way that occasionally breaks services. (Basically, where every other app takes from the services pasteboard, Mail.app seems to sometimes take replacement text from the default system pasteboard, i.e., the Copy/Paste clipboard.)

The 'Shrink URL to Clipboard' works all the time in Mail.app, but you need to fire that one off, pause a moment, then paste. Annoying. If I combined the two (wrote to clipboard /and/ did a services replace), it would work in Mail.app all the time (but at the cost of overwriting your current clipboard contents).

And cool, on the Applescript! I basically did this one because I had the 'shrinkURL' method already written for another project, and a friend asked for it as a service. I really did not expect it to get linked all over the place like this, but hey, if people find it useful, I'm glad.
Rachel "Sparks" Blackman
Riverdark Studios

#6 gh_isoar2

gh_isoar2

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 18 April 2007 - 05:31 PM

Sparks,

Wonderful service - works great! Suggestion: update the .txt file, it describes TinyURL as a file, but it's actually physically a directory, which can be confusing if you're using Terminal to do the install.

Thanks!

#7 Sparks

Sparks

    Atlantis Author

  • Root Admin
  • PipPipPip
  • 1,791 posts
  • Gender:Female
  • Location:Seattle, WA
  • Interests:Cocoa, Obj-C, iPhone, horses, writing

Posted 18 April 2007 - 05:35 PM

Hrm... maybe I should just call it a 'bundle' and assume that folks using Terminal to do the install know that a bundle is a directory that appears as a file in Finder. Folks using the Finder are used to hearing plugins called 'Bundles' anyway, so... would that clarify?
Rachel "Sparks" Blackman
Riverdark Studios

#8 Jean

Jean

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 22 April 2007 - 11:22 AM

Thank you! Thank you! for this wonderful innovation. It had occurred to me that TinyURL
would be cool, as a Firefox add-on, but that would have left other browsers out in the cold.
I lucked out and noticed your creation in a write up of the add-on.
Testing <http://tinyurl.com/2kytck> (Ah ha! Don't highlight the brackets!) wink.gif

My installer of the .3 version asked me for an application.
So instead, I dragged the basic file to the house as discussed above and restarted.
There they were. "Shrink URL ..." I anticipate that posting shortened urls to Usenet will be much easier to do.

Thanks again.

#9 gh_isoar2

gh_isoar2

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 09 May 2007 - 06:41 PM

QUOTE (Sparks @ Apr 18 2007, 09:35 PM) <{POST_SNAPBACK}>
Hrm... maybe I should just call it a 'bundle' and assume that folks using Terminal to do the install know that a bundle is a directory that appears as a file in Finder. Folks using the Finder are used to hearing plugins called 'Bundles' anyway, so... would that clarify?



(Sorry to take so long to get back to you on this). Sure, that would be sufficiently clear.

Thanks again for this great tool.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users