Skip navigation
Ivan O\'Brien
Currently Being Moderated

How to automatically make twitter @name fields into hyperlinks in Indesign?

Aug 30, 2011 9:11 AM

Hi folks,

   I have a book of tweets coming out and would like to publish Kindle, ePub and PDF versions of it, which would need hyperlinks throughout to work at all. So what I need is a way to automatically convert

@Me

into

<A HREF="http://www.twitter.com/Me">@Me</A>

as it were.

There are about 1000 of them, so I don't want to have to do it manually!

I have already used a GREP style to automatically format the @text (it's always one word, so it's easy) but the automatic hyperlink tool does not seem to allow customisation of what hyperlinks look like.

Does anybody have any ideas as to the best way to approach this?

 

Thanks,

 

Ivan

 
Replies
  • Currently Being Moderated
    Aug 30, 2011 10:00 AM   in reply to Ivan O\'Brien

    Scripting.

     

    You might ask on the InDesign Scripting forum for someone to brew a quick script.

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Aug 30, 2011 10:15 AM   in reply to Ivan O\'Brien

    I would search-and-replace them all changing @Me into http://twitter.com/Me (or whatever), then autohyperlink them, and then search-and-replace them back to @Me.

     

    You could also do this in an external text editor by exporting the stor(ies) to InDesign Tagged Text and setting up the hyperlinks there.

     
    |
    Mark as:
  • Currently Being Moderated
    Calculating status...
    Feb 21, 2013 4:32 PM   in reply to Ivan O\'Brien

    I'm having a real problem putting a retweet into a document and then having the link work when I pdf it.  Can anyone please contact me and give us a hand.. It may not be complicated for you but it's knocking me out..

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Feb 21, 2013 10:58 PM   in reply to cdmazoff

    Well, please ask a more specific question.

    What's your goal, what are you trying, and how is it failing? Please include a screenshot.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 22, 2013 10:27 AM   in reply to John Hawkinson

    Wow.. that was quick John!!!  Thank you.  But I spend many many hours yesterday going round in circles and finally figured out how to do what I wanted which was to embed a retweet in a pdf.. The finished product is now at.. http://www.hcvadvocate.org/community/community_pdf/Las%20Vegas,%20NV%2 0%20March%205,%202013.pdf .. Thanks!!

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Feb 22, 2013 3:16 PM   in reply to cdmazoff

    cdmazoff: OK, glad you solved your problem. But once you post here that you're having a problem, it would be good for you to post explaining the problem and what your solution was, so that others having the same problem can benefit from your efforts. So when you have a moment, please post the details! Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 22, 2013 4:20 PM   in reply to John Hawkinson

    Hello John... Thanks.. My problem in large part stems from the way InDesign handles hyperlinks and what happens during the pdf process.. I have been having real problems with the "shared" destination default etc.. Anyways:  then I had to put in a twitter link and I couldn't find any clear description of how to do this in InDesign or the help community. I went around in circles.. The problem was with html tags.. and twitter exceptions and etc.. Anyways: the whole thing worked out after I spent many hours on the net.. mostly trying to find the right language to use to phrase the problem..  Not being a "tweeter" complicated issues.. (I had to do this for those who do tweet)... The answer, in short was this:

    1. get a retweet button;
    2. put retweet button in InDesign doc. 
    3. Post a tweet (in this case it was "Save the Date: HCV Training March 26, Houston TX  [link to permanent pdf of the training flyer]..
    4. Twitter will generate a short url.
    5. In Twitter, hover mouse over post and then "More" pops up
    6. Click on Embed
    7. Copy Embed code
    8. Paste embed code to text file
    9. Make URL hyperlink for retweet button and in the Destination put: http://twitter.com/share?text=Save%20The%20Date%20Houston%20March%2026 &url=http://t.co/AQVrqixC0O
    10. Note: The above contains the message (after the text=) which must use %20 in lieu of any spaces in the text description.  Then after the &url= paste the short url that you copied from the embed code.
    11. Make sure that the InDesign link is NOT a shared destination and that it is a URL
    12. Save file and export to PDF

     

    As you can see... this took a while to figger out.. I found several posts on the internet but none stood alone... So here you go.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points