<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Huddled Masses &#187; Web</title>
	<atom:link href="http://huddledmasses.org/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://huddledmasses.org</link>
	<description>You can do more than breathe for free...</description>
	<lastBuildDate>Sat, 28 Jan 2012 21:37:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<cloud domain='huddledmasses.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Convert Twitter users into FriendFeed Imaginary Friends!</title>
		<link>http://huddledmasses.org/convert-twitter-users-into-friendfeed-imaginary-friends/</link>
		<comments>http://huddledmasses.org/convert-twitter-users-into-friendfeed-imaginary-friends/#comments</comments>
		<pubDate>Sat, 16 May 2009 20:15:47 +0000</pubDate>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
				<category><![CDATA[Huddled]]></category>
		<category><![CDATA[Application programming interface]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[FriendFeed]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WatiN]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://joelbennett.net/?p=1170</guid>
		<description><![CDATA[So a lot of people seem to be taking the latest missteps by Twitter&#8217;s management (and the accompanying admission of bad design) as an opportunity to try out some alternatives. Many of them seem to be coming over to FriendFeed (which has been better than Twitter for a long time, but nevermind that) ... so [...]]]></description>
			<content:encoded><![CDATA[	<p>So a lot of people seem to be taking the <a href="http://blog.twitter.com/2009/05/whoa-feedback.html">latest missteps</a> by Twitter&#8217;s management (and <a href="http://blog.twitter.com/2009/05/replies-kerfuffle.html">the accompanying admission of bad design</a>) as an opportunity to try out some alternatives. Many of them seem to be coming over to FriendFeed (which has been better than Twitter for a long time, but nevermind that) ... so I thought I&#8217;d update and release a PowerShell 2.0 script I wrote to create <a href="http://friendfeed.com/settings/imaginary">imaginary friends</a> out of your friends that stay on Twitter.</p>

	<p>The first part of it is a WatiN script (that automates your browser) called <code>New-ImaginaryFriend</code> which takes three parameters: a name for the imaginary friend, a url for an avatar for the friend, and a HashTable&#8230;  Of course, we sort-of cheat by using the HashTable &#8230; it&#8217;s basically a bunch of key-value pairs of remote services and user names. You can use it to add twitter ID&#8217;s like <code>twitter=&#34;jsnover&#34;</code> or blogs like <code>blog=&#34;http://HuddledMasses.org/&#34;</code> etc.  You can even add multiple sources (eg: twitter + diigo, two blogs, etc) to a single new imaginary friend  <img src='http://huddledmasses.org/wordpress/wp-includes/' alt='8)' class='wp-smiley' /> ...</p>

	<p>This script is done using WatiN because the FriendFeed <span class="caps">API</span> doesn&#8217;t support creating imaginary friends yet, and as a result it&#8217;s slow, and requires IE (and doesn&#8217;t seem to work very well with IE8 &#8212; at least, I couldn&#8217;t get it to set the avatars using IE 8 on Windows 7, so I commented out the avatar part of the next-to-last line).</p>

	<p>The other part of the script is a pair of functions: the first is <code>Get-FriendFeedFriends</code> which retrieves profile information for all your friends in a slick format that includes all their services and such &#8230; you may find other uses for this later  <img src='http://huddledmasses.org/wordpress/wp-includes/' alt=';-)' class='wp-smiley' /> , the second is <code>Get-TwitterFriends</code> &#8230; Both have an <code>-Exclude</code> parameter so you can pass it a list of people to ignore.</p>

	<p>When you put these three functions together, you can just import the FriendFeed module, and start creating friends (don&#8217;t forget <em>this</em> version of the scripts only works with IE6 or IE7 for the purpose of avatars, as WatiN can&#8217;t seem to set the file upload value in IE8 yet).</p>

	<div class="posh code posh" style="font-family:monospace;"><br />
<span style="color: #0066cc; font-style: italic;">Import-<span style="font-style: normal;">Module</span></span> FriendFeed<br />
<span style="color: #666666; font-style: italic;">## Get any twitter friends who aren't on friendfeed</span><br />
<span style="color: #666666; font-style: italic;">## Make sure you use FriendFeed's built in &quot;add all your twitter friends&quot; first</span><br />
<span style="color: #660033; font-weight: bold;">$twits</span> <span style="color: #66cc66;">=</span> <span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">TwitterFriends</span></span> `<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">-Nickname</span> jaykul<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">-Exclude</span> $<span style="color: #333;">&#40;</span><span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">FriendFeedFriends</span></span> jaykul <span style="color: #66cc66;">|</span> <span style="color: #660033;">select</span> <span style="color: #000066;">-expand</span> twitter<span style="color: #333;">&#41;</span><br />
<br />
<span style="color: #666666; font-style: italic;">## Add them to friend feed</span><br />
<span style="color: #666699; font-weight: bold;">foreach</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$twit</span> <span style="color: #666699; font-weight: bold;">in</span> <span style="color: #660033; font-weight: bold;">$twits</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #0066cc; font-style: italic;">New-<span style="font-style: normal;">ImaginaryFriend</span></span> <span style="color: #660033; font-weight: bold;">$twit</span>.<span style="color: #003366;">name</span> @<span style="color: #333;">&#123;</span>twitter<span style="color: #66cc66;">=</span><span style="color: #660033; font-weight: bold;">$twit</span>.<span style="color: #003366;">screen_name</span><span style="color: #333;">&#125;</span> <span style="color: #660033; font-weight: bold;">$twit</span>.<span style="color: #003366;">profile_image_url</span><br />
<span style="color: #333;">&#125;</span></div>

	<p>You can <a href="/downloads/FriendFeedModule+Dependencies.zip">download all of the required modules at once</a> (<a href="/downloads/FriendFeedModule+Dependencies.7z">7z</a>), or grab the latest versions of them from PoshCode: <a href="http://poshcode.org/1110">FriendFeed</a>, <a href="http://poshcode.org/1107">HttpRest</a>, and  <a href="http://poshcode.org/1108">WatiN</a> &#8230; but if you do that, you&#8217;ll still need to get the binaries separately  <img src='http://huddledmasses.org/wordpress/wp-includes/' alt=':-/' class='wp-smiley' /> </p>

<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/2f4a4fcd-2d3b-4c5e-b812-d1c5f2b5624b/" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=2f4a4fcd-2d3b-4c5e-b812-d1c5f2b5624b" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://huddledmasses.org/convert-twitter-users-into-friendfeed-imaginary-friends/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Get-Web (Another round of wget for PowerShell)</title>
		<link>http://huddledmasses.org/get-web-another-round-of-wget-for-powershell/</link>
		<comments>http://huddledmasses.org/get-web-another-round-of-wget-for-powershell/#comments</comments>
		<pubDate>Fri, 02 May 2008 02:08:08 +0000</pubDate>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
				<category><![CDATA[Huddled]]></category>
		<category><![CDATA[Get-Web]]></category>
		<category><![CDATA[Http]]></category>
		<category><![CDATA[HttpWebRequest]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[wGet]]></category>
		<category><![CDATA[Xml]]></category>

		<guid isPermaLink="false">http://HuddledMasses.org/?p=520</guid>
		<description><![CDATA[Well, after multiple attempts at a wget PowerShell script (the last one works very well for downloading web pages, files, as long as you don&#8217;t need to send post parameters or anything like that) ... I found myself writing a script last week that included a custom HTTP POST function as well as using some [...]]]></description>
			<content:encoded><![CDATA[	<p>Well, after multiple attempts at a <a href="http://huddledmasses.org/wget-2-for-powershell/">wget PowerShell script</a> (the last one works very well for downloading web pages, files, as long as you don&#8217;t need to send post parameters or anything like that) ... I found myself writing a script last week that included a custom <span class="caps">HTTP</span> <span class="caps">POST</span> function as well as using some prior functionality I wrote (<code>ConvertFrom-Html</code>) to convert <span class="caps">HTML</span> files to <span class="caps">XML</span> documents &#8212; which PowerShell can deal with nicely.</p>

	<p>So I&#8217;ve taken my <a href="http://huddledmasses.org/converting-html-to-xml-in-powershell/">Huddled.Html</a> code and worked it in together with a few extra bits &#8230; and I&#8217;m releasing it under the new name &#8220;PoshHttp&#8221; (which has the sole benefit of being short, in the case when you need to type the full command names, like: <code>PoshHttp\Get-Web</code>.</p>

	<p>In lieu of providing proper documentation for this, there&#8217;s a script below which shows off some of the features of the <code>Get-Web</code> cmdlet &#8230; but first, you&#8217;re going to want to <a href="/downloads/PoshHttp.7z">download PoshHttp</a> and I can give you a basic overview.</p>

	<h4>Get-Web </h4>

	<p>Downloads a file from the web <span class="caps">URI</span>, optionally passing <span class="caps">POST</span> or <span class="caps">GET</span> parameters which it accepts as a Hashtable. If the resulting file is an xml or html file, it converts it to <span class="caps">XML</span> and outputs it as an <code>XmlDocument</code> object. If they are not, it saves them to file, and outputs the <code>FileInfo</code> object. </p>

	<ul>
		<li><strong>Plain</strong> will prevent the conversion to xml</li>
		<li><strong>Save</strong> will force saving to file (either xml or binaries)</li>
		<li><strong>Path</strong> lets you specify the file name/path (normally, it selects a path based on what you&#8217;re downloading).</li>
	</ul>
	<ul>
		<li><strong>Force</strong> will prevent it from asking if you want to overwrite files</li>
	</ul>

	<h4>ConvertFrom-Html</h4>

	<p>Converts <span class="caps">HTML</span> to <span class="caps">XML</span>. I&#8217;ll eventually tweak this so it supports passing it a file path and even saving the xml in-place on the original file &#8230; but for now you can use it on a stream of text, like this: <code>(Get-Content file.html | ConvertFrom-Html).save( &#34;file.xml&#34; )</code>.  Note that it outputs an xmldocument object &#8230; you can get the xml as text to the console using <code>Get_OuterXml()</code>.</p>

	<h4> ConvertTo-Hashtable</h4>

	<p>Converts a url-style query string or NameValueCollection into a Hashtable. It&#8217;s mainly to make it easier to use the Get-Web in cases where you&#8217;re getting the <span class="caps">URL</span> or <span class="caps">POST</span> data from elsewhere.</p>

	<p>Here&#8217;s a script with a few example uses of Get-Web: <span id="more-520"></span></p>

	<div class="posh code posh" style="font-family:monospace;"><br />
<span style="color: #666666; font-style: italic;">## Find the url of the image (download an html file as an xmldocument)</span><br />
<span style="color: #660033; font-weight: bold;">$ImgURL</span> <span style="color: #66cc66;">=</span> <span style="color: #333;">&#40;</span><span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> http:<span style="color: #66cc66;">//</span>dilbert.<span style="color: #003366;">com</span><span style="color: #66cc66;">/</span>fast<span style="color: #66cc66;">/</span><span style="color: #333;">&#41;</span>.<span style="color: #003366;">html</span>.<span style="color: #003366;">body</span>.<span style="color: #003366;">div</span>.<span style="color: #003366;">img</span>.<span style="color: #003366;">src</span><br />
<br />
<span style="color: #666699; font-weight: bold;">if</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$Host</span>.<span style="color: #003366;">Name</span> <span style="color: #000066;">-eq</span> <span style="color: #009900;">&quot;PoshConsole&quot;</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#In PoshConsole, show it inline</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$ImgUrl</span> <span style="color: #66cc66;">|</span> <span style="color: #0066cc; font-style: italic;">Out-<span style="font-style: normal;">WPF</span></span> <span style="color: #000066;">-source</span> <span style="color: #009900;">&quot;&lt;Image Height='174' Source='{Binding Path=AbsoluteUri}' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' /&gt;&quot;</span><br />
<span style="color: #333;">&#125;</span> <span style="color: #666699; font-weight: bold;">else</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">## Use Get-Web to download an image (it's saved to file by default), and open it in my default viewer</span><br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">## When Get-Web saves a file, it outputs the [FileInfo] which can be invoked with &amp;</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&amp;</span><span style="color: #333;">&#40;</span><span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://dilbert.com$ImgURL&quot;</span> <span style="color: #000066;">-force</span><span style="color: #333;">&#41;</span><br />
<span style="color: #333;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">###################################################################################################</span><br />
<span style="color: #666666; font-style: italic;">## Determine the language of a snippet of text (5 words minimum for best results)</span><br />
<span style="color: #666699; font-weight: bold;">function</span> <span style="color: #0066cc; font-style: italic;">Resolve-<span style="font-style: normal;">Language</span></span><span style="color: #333;">&#40;</span><span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">string</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$text</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">## This time, we're using Get-Web with POST parameters ...</span><br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">return</span> <span style="color: #333;">&#40;</span><span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://www.xrce.xerox.com/cgi-bin/mltt/LanguageGuesser&quot;</span> <span style="color: #000066;">-Post</span> <span style="color: #333;">&#40;</span>@<span style="color: #333;">&#123;</span>Text<span style="color: #66cc66;">=</span><span style="color: #660033; font-weight: bold;">$text</span><span style="color: #333;">&#125;</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#41;</span>.<span style="color: #003366;">SelectSingleNode</span><span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;//font&quot;</span><span style="color: #333;">&#41;</span>.<span style="color: #009900;">&quot;#text&quot;</span>.<span style="color: #003366;">Trim</span><span style="color: #333;">&#40;</span><span style="color: #333;">&#41;</span><br />
<span style="color: #333;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">###################################################################################################</span><br />
<span style="color: #666666; font-style: italic;">## Translate text to English ... This is obviously reworkable as a general translation tool</span><br />
<span style="color: #666666; font-style: italic;">## But I don't have much use for that, since I only speak Spanish, English, and code ...</span><br />
<span style="color: #666699; font-weight: bold;">function</span> <span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">English</span></span><span style="color: #333;">&#40;</span><span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">string</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$text</span>,<span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">string</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$FromLanguage</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">if</span><span style="color: #333;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #660033; font-weight: bold;">$FromLanguage</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$FromLanguage</span> <span style="color: #66cc66;">=</span> <span style="color: #0066cc; font-style: italic;">Resolve-<span style="font-style: normal;">Language</span></span> <span style="color: #660033; font-weight: bold;">$text</span><br />
&nbsp; &nbsp;<span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$post</span> <span style="color: #66cc66;">=</span> @<span style="color: #333;">&#123;</span>text<span style="color: #66cc66;">=</span><span style="color: #660033; font-weight: bold;">$text</span><span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">switch</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$FromLanguage</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Arabic&quot;</span> &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;ar|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Chinese&quot;</span> &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;zh|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Dutch&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;nl|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;French&quot;</span> &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;fr|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;German&quot;</span> &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;de|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Greek&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;el|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Italian&quot;</span> &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;it|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Japanese&quot;</span> &nbsp; &nbsp; <span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;ja|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Korean&quot;</span> &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;ko|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Portuguese&quot;</span> &nbsp; <span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;pt|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Russian&quot;</span> &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;ru|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&quot;Spanish&quot;</span> &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#123;</span> <span style="color: #660033; font-weight: bold;">$post</span><span style="color: #333;">&#91;</span><span style="color: #009900;">&quot;langpair&quot;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;es|en&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; default <span style="color: #333;">&#123;</span> <span style="color: #666699; font-weight: bold;">return</span> <span style="color: #009900;">&quot;Sorry, but I can't translate $FromLanguage&quot;</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">## Using Get-Web with POST parameters ... nothing remarkable, but it's just nice with the previous function ...</span><br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">return</span> <span style="color: #333;">&#40;</span><span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://www.google.com/translate_t&quot;</span> <span style="color: #000066;">-Post</span> <span style="color: #660033; font-weight: bold;">$post</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#41;</span>.<span style="color: #003366;">SelectSingleNode</span><span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;//div[@id='result_box']&quot;</span><span style="color: #333;">&#41;</span>.<span style="color: #009900;">&quot;#text&quot;</span>.<span style="color: #003366;">Trim</span><span style="color: #333;">&#40;</span><span style="color: #333;">&#41;</span><br />
<span style="color: #333;">&#125;</span><br />
<br />
<br />
<span style="color: #666666; font-style: italic;">####################################</span><br />
<span style="color: #666666; font-style: italic;">## Figure out the real url behind those shortened forms</span><br />
<span style="color: #666699; font-weight: bold;">function</span> <span style="color: #0066cc; font-style: italic;">Resolve-<span style="font-style: normal;">URL</span></span><span style="color: #333;">&#40;</span><span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">string</span><span style="color: #333;">&#91;</span><span style="color: #333;">&#93;</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$urls</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span> <br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">regex</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$snip</span> &nbsp;<span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;(?:https?://)?(?:snurl|snipr|snipurl)\.com/([^?/ ]*)\b&quot;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">regex</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$tiny</span> &nbsp;<span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;(?:https?://)?TinyURL.com/([^?/ ]*)\b&quot;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">regex</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$isgd</span> &nbsp;<span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;(?:https?://)?is.gd/([^?/ ]*)\b&quot;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span><span style="color: #003366; font-weight: bold;">regex</span><span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$twurl</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;(?:https?://)?twurl.nl/([^?/ ]*)\b&quot;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">switch</span> <span style="color: #000066;">-regex</span> <span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$urls</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$snip</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">## Notice that {{ Get-Web ... -plain }} returns plain text, not an xml doc</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066cc; font-style: italic;">write-<span style="font-style: normal;">output</span></span> <span style="color: #660033; font-weight: bold;">$snip</span>.<span style="color: #333399; font-weight: bold; font-style: italic;">Replace</span><span style="color: #333;">&#40;</span> <span style="color: #660033; font-weight: bold;">$_</span>, <span style="color: #333;">&#40;</span><span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://snipurl.com/resolveurl?id=$($snip.match( $_ ).groups[1].value)&quot;</span> <span style="color: #000066;">-plain</span><span style="color: #333;">&#41;</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$tiny</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">## GET parameters this time ...</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$doc</span> <span style="color: #66cc66;">=</span> <span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://tinyurl.com/preview.php&quot;</span> <span style="color: #000066;">-Get</span> @<span style="color: #333;">&#123;</span>num<span style="color: #66cc66;">=</span><span style="color: #660033; font-weight: bold;">$tiny</span>.<span style="color: #333399; font-weight: bold; font-style: italic;">match</span><span style="color: #333;">&#40;</span> <span style="color: #660033; font-weight: bold;">$_</span> <span style="color: #333;">&#41;</span>.<span style="color: #003366;">groups</span><span style="color: #333;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #333;">&#93;</span>.<span style="color: #003366;">value</span><span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066cc; font-style: italic;">write-<span style="font-style: normal;">output</span></span> <span style="color: #660033; font-weight: bold;">$tiny</span>.<span style="color: #333399; font-weight: bold; font-style: italic;">Replace</span><span style="color: #333;">&#40;</span> <span style="color: #660033; font-weight: bold;">$_</span>, <span style="color: #009900;">&quot;$($doc.SelectSingleNode(&quot;</span><span style="color: #009900;">&quot;//a[@id='redirecturl']&quot;</span><span style="color: #009900;">&quot;).href)&quot;</span> <span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$isgd</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$doc</span> <span style="color: #66cc66;">=</span> <span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://is.gd/$($isgd.match( $_ ).groups[1].value)-&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066cc; font-style: italic;">write-<span style="font-style: normal;">output</span></span> <span style="color: #660033; font-weight: bold;">$isgd</span>.<span style="color: #333399; font-weight: bold; font-style: italic;">Replace</span><span style="color: #333;">&#40;</span> <span style="color: #660033; font-weight: bold;">$_</span>, <span style="color: #009900;">&quot;$($doc.SelectSingleNode(&quot;</span><span style="color: #009900;">&quot;//div[@id='main']/p/a&quot;</span><span style="color: #009900;">&quot;).href)&quot;</span><span style="color: #333;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$twurl</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$doc</span> <span style="color: #66cc66;">=</span> <span style="color: #0066cc; font-style: italic;">Get-<span style="font-style: normal;">Web</span></span> <span style="color: #009900;">&quot;http://tweetburner.com/links/$($twurl.match( $_ ).groups[1].value)&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066cc; font-style: italic;">write-<span style="font-style: normal;">output</span></span> <span style="color: #660033; font-weight: bold;">$twurl</span>.<span style="color: #333399; font-weight: bold; font-style: italic;">Replace</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$_</span>, <span style="color: #009900;">&quot;$($doc.selectsingleNode(&quot;</span><span style="color: #009900;">&quot;//div[@id='main-content']/p/a&quot;</span><span style="color: #009900;">&quot;).href)&quot;</span> <span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; default <span style="color: #333;">&#123;</span> <span style="color: #0066cc; font-style: italic;">write-<span style="font-style: normal;">output</span></span> <span style="color: #660033; font-weight: bold;">$_</span> <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #333;">&#125;</span><br />
<span style="color: #333;">&#125;</span></div>]]></content:encoded>
			<wfw:commentRss>http://huddledmasses.org/get-web-another-round-of-wget-for-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>If I were versioning the web &#8230;</title>
		<link>http://huddledmasses.org/if-i-were-versioning-the-web/</link>
		<comments>http://huddledmasses.org/if-i-were-versioning-the-web/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 20:58:13 +0000</pubDate>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
				<category><![CDATA[Huddled]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web2.0]]></category>

		<guid isPermaLink="false">http://HuddledMasses.org/if-i-were-versioning-the-web/</guid>
		<description><![CDATA[This &#8220;Web 2.0&#8221; nonsense is still ridiculous, and I thought I&#8217;d just throw this out there to express my annoyance. The one thing you&#8217;ll notice here is that at no point do we get a new version just because you started using the same old tech for different purposes. Water does not become Water 2.0 [...]]]></description>
			<content:encoded><![CDATA[	<p>This &#8220;Web 2.0&#8221; nonsense is <strong>still</strong> ridiculous, and I thought I&#8217;d just throw this out there to express my annoyance. The one thing you&#8217;ll notice here is that at no point do we get a new version just because you started using the same old tech for different purposes.  Water does not become Water 2.0 just because you use it to wash your car instead of drinking it, nor because you put it in bottles and pretend it&#8217;s worth it&#8217;s weight in gasoline.  Neither does the web get a new version just because some corporate muckety-muck discovered blogging, nor even when someone finally notices XmlHttpRequest and dreams up a new acronym for &#8220;fetching data from a webservice via a javascript in a web page&#8221;.  What we can do is change the version number when we make a significant change in the underlying technologies.</p>

	<ul>
		<li><span class="caps">HTML</span> = 1.0</li>
		<li>Client-Side Script (Js/Vbs) = 2.0</li>
		<li>Style Sheets = 2.5</li>
		<li>Server-Side Scripting (Perl/Php/etc)= 3.0</li>
		<li>Server-Side Databases = 3.5 (the first real web apps &#8212; apps that didn&#8217;t just manipulate something you already has) </li>
		<li><span class="caps">XML</span> and XmlHttpRequest (partial page reloads) = 4.0</li>
	</ul>
	<ul>
		<li>The single-browser web (Netscape dies and the web becomes a uniform platform of IE5 compatible sites). = 4.1</li>
	</ul>

	<p>And at some future point in time &#8230;
	<ul>
		<li>Client-Side Databases = 5.0 (this is in the HTML5 spec released this month)</li>
		<li>Rise of MicroFormats = 6.0 (this is where microformats emerge as recognized standards)</li>
	</ul>
	<ul>
		<li>Social Web = 7.0 </li>
	</ul></p>

	<p>In the Social Web, browsers become true portals, with integrated identity management, instant messaging, contact management and feed aggregation. Micro-formats are one of the supported standards, and browsers can parse them and store and track their information.  When you comment on a website, your OpenID is tracked with a microformat vcard, plus your browser offers to ping your OpenId enabled tracking service so your friends can follow a central feed of all your comments and forum participation across the whole web (based on your anonymous OpenID).  All of this happens without third party plugins that nobody installs.</p>

	<p>So yeah &#8230; Web 2.0?  The Social Web?  No. I think not.</p>]]></content:encoded>
			<wfw:commentRss>http://huddledmasses.org/if-i-were-versioning-the-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

