<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
	  <title>Ask MetaFilter questions tagged with texttoHTML</title>
      <link>http://ask.metafilter.com/tags/texttoHTML</link>
      <description>Questions tagged with 'texttoHTML' at Ask MetaFilter.</description>
	  <pubDate>Tue, 21 Feb 2006 10:11:24 -0800</pubDate> <lastBuildDate>Tue, 21 Feb 2006 10:11:24 -0800</lastBuildDate>

      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>	  
	<item>
	<title>Converting A Plain Text List Of URLs Into An HTML List of Clickable Links</title>
	<link>http://ask.metafilter.com/33038/Converting%2DA%2DPlain%2DText%2DList%2DOf%2DURLs%2DInto%2DAn%2DHTML%2DList%2Dof%2DClickable%2DLinks</link>	
	<description>What&apos;s the easiest way  to convert a plain text list of URLs with descriptions into an HTML page of clickable links? I have a long list of URLs and descriptions in a plain text file, formatted like so&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;### This is a page about monkeys&lt;br /&gt;http://www.monkeypage.com&lt;br /&gt;### This is a page about weasels&lt;br /&gt;http://www.weaselpage.com&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
and would like to convert them into an XHTML list formatted like so&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&lt;li&gt;&lt;a title=&quot;This is a page about monkeys&quot; href=&quot;http://www.monkeypage.com&quot;&gt;This is a page about monkeys&lt;/a&gt;&lt;/li&gt;&lt;br&gt;
&lt;li&gt;&lt;a title=&quot;This is a page about weasels&quot; href=&quot;http://www.weaselpage.com&quot;&gt;This is a page about weasels&lt;/a&gt;&lt;/li&gt;&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
What would be the best way to do a conversion like this? I&apos;m running OS 10.4.5, and I&apos;m guessing a good method would involve command line stuff I&apos;m aware of but don&apos;t really understand - regular expressions, grep, and the like. Alternatively, since the resulting page is destined for the web, I suppose another option would be a PHP or Perl script to convert the text file on the fly (I only mention PHP and Perl because I have some, very limited, experience with them, and would be lost if someone suggested, eg., a Python solution). I also assume some of the more advanced text editors would be up to the job (though from what I&apos;ve seen of them, I&apos;m a bit intimidated by the likes of vim or emacs!)&lt;br&gt;
&lt;br&gt;
If this is a simple proposition, I&apos;d be very grateful if someone could give examples of commands/possible scripts, if not, pointers to resources about manipulating text files in this way would be great too (I keep everything in plain text files, so am keen to learn about manipulating and  repurposing them in general).</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2006:site.33038</guid>
	<pubDate>Tue, 21 Feb 2006 10:11:24 -0800</pubDate>
	<category>ASCII</category>
	<category>conversion</category>
	<category>HTML</category>
	<category>links</category>
	<category>manipulation</category>
	<category>text</category>
	<category>texttoHTML</category>
	<category>URLs</category>
	<category>XHTML</category>
	<dc:creator>jack_mo</dc:creator>
	</item>
	
	</channel>
</rss>

