Include the URL of all hyperlinks in the document's text

In an effort to go "all txt" I need to find a way to make the links in .doc files visible in the text, so that the URLs will remain accessible when I paste the the text into .txt documents.

Will any feature in Pages, Word or OpenOffice allow me to have all the URLs' hyperlinks in a document written beside the hyperlink, in the text? In something like a description[link] pattern.

In some cases there is no description in the link, only the URL. Duplication in these cases would not be problematic.


Solution 1:

If use have basic Word documents, catdoc will probably achieve what you need. It's easy to install on OS X through Homebrew, running brew install catdoc.

Let's convert this Word file.

The output is:

$ catdoc test.doc 
This is   HYPERLINK "http://www.example.com"  a hyperlink .

As you can see, the hyperlink is placed before the description, and the field code can be removed by a simple search and replace for HYPERLINK (note the spaces).