emuikernel / wittytwitter

Automatically exported from code.google.com/p/wittytwitter
1 stars 0 forks source link

TinyUrl support #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Enhancement:
- Parse tweet text for likely urls
- Replace found urls with newly created tinyurls
- Post tweet as before

Patch attached, no tests, just my idle hackery. 

For whatever noob reason, tortoise asks me for a destination for the one
new file, it goes to TwitterLib\TinyUrlHelper.cs (patch file has enough
info to do this blind from ./Witty/, but I could easily be mangling it).

Original issue reported on code.google.com by married...@gmail.com on 2 Nov 2007 at 6:12

Attachments:

GoogleCodeExporter commented 8 years ago
Okay I really shouldn't post patches from my wife's account, she's going to be 
way
confused. -- grant@scorcho.org 

Original comment by married...@gmail.com on 2 Nov 2007 at 6:13

GoogleCodeExporter commented 8 years ago
hmm this might be duplicate work with
http://code.google.com/p/wittytwitter/issues/detail?id=44 

Original comment by alan...@gmail.com on 2 Nov 2007 at 6:42

GoogleCodeExporter commented 8 years ago
hmmm, no way to merge bugs. Oh well. I've run through this code and it works 
fine for
me. I made one change. It checks the length of the string against the length of 
the
shortest url tinyUrl can make ("http://tinyurl.com/a") before converting the 
string.
If the sourceUrl.length < 19, it passes the url unchanged.

Original comment by scottck...@gmail.com on 3 Nov 2007 at 1:06

GoogleCodeExporter commented 8 years ago
Pretty good guard, Scott. You could also finesse it further and make the length 
variable depending on whether or not http[s]:// is present or not, but that be 
borderline obsessive optimization.

Original comment by grant.ca...@wharton.upenn.edu on 4 Nov 2007 at 2:31

GoogleCodeExporter commented 8 years ago
duplicate

Original comment by alan...@gmail.com on 1 Dec 2007 at 12:47