<?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>Comments on: How do I do a global wordcount in MT?</title>
      <link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT/</link>
      <description>Comments on Ask MetaFilter post How do I do a global wordcount in MT?</description>
	  	  <pubDate>Sun, 27 Nov 2005 09:47:19 -0800</pubDate>
      <lastBuildDate>Sun, 27 Nov 2005 09:47:19 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: How do I do a global wordcount in MT?</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT</link>	
  	<description>How do I get a global wordcount for every post made on my MT 2.66 blog? &lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;http://code.appnel.com/&quot;&gt;MT Wordcount&lt;/a&gt; only seems to have tags for obtaining the number of words in each entry. I want to know the big number that is the total sum for all (558) entries on the blog.&lt;br&gt;
&lt;br&gt;
Apparently MTWordStats used to do this, but the plugin&apos;s no longer available.&lt;br&gt;
&lt;br&gt;
Thanks!</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.27941</guid>
  	<pubDate>Sun, 27 Nov 2005 09:22:12 -0800</pubDate>
  	<dc:creator>Marquis</dc:creator>
	
	<category>mt</category>
	
	<category>wordcount</category>
	
	<category>movable</category>
	
	<category>type</category>
	
	<category>word</category>
	
	<category>count</category>
	
	<category>plugins</category>
	
	<category>blog</category>
	
</item>
<item>
  	<title>By: chrismear</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT#440156</link>	
  	<description>&lt;a href=&quot;http://justinblanton.com/archives/2005/02/11/movable-type-total-word-count&quot;&gt;This blog post&lt;/a&gt; suggest a hackish way using the Wordcount plugin you mentioned.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.27941-440156</guid>
  	<pubDate>Sun, 27 Nov 2005 09:47:19 -0800</pubDate>
  	<dc:creator>chrismear</dc:creator>
</item>
<item>
  	<title>By: Marquis</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT#440245</link>	
  	<description>Hmm... Couldn&apos;t get that to work? Is there an interim step I&apos;m missing between installing wordcount.pl in my plugins directory and adding that code to one of my templates (and rebuilding)?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.27941-440245</guid>
  	<pubDate>Sun, 27 Nov 2005 12:11:03 -0800</pubDate>
  	<dc:creator>Marquis</dc:creator>
</item>
<item>
  	<title>By: chrismear</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT#440263</link>	
  	<description>I&apos;m not an MT expert by any means, but those steps seem to be all that is necessary. Have you got both bits of code in the template? Does anything funny appear on the page when you view it in your browser (like error messages, or raw code)?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.27941-440263</guid>
  	<pubDate>Sun, 27 Nov 2005 12:42:21 -0800</pubDate>
  	<dc:creator>chrismear</dc:creator>
</item>
<item>
  	<title>By: adamrice</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT#440280</link>	
  	<description>Do you need to do this once, or many times? If once, you can make a dumb template that looks like&lt;br&gt;
&lt;br&gt;
&lt;code&gt;&amp;lt;MTEntries lastn=&amp;quot;999&amp;quot;&amp;gt;&amp;lt;MTEntryBody&amp;gt;&amp;lt;/MTEntries&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
to get a raw-text dump of all your entry text. Then just save the output from it and open it into your word-counting utility of choice</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.27941-440280</guid>
  	<pubDate>Sun, 27 Nov 2005 13:09:49 -0800</pubDate>
  	<dc:creator>adamrice</dc:creator>
</item>
<item>
  	<title>By: alan</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT#440298</link>	
  	<description>How convoluted are you feeling today?  If you have access to a shell command line &lt;strong&gt;and&lt;/strong&gt; a command line version of PHP and are using mysql as an engine,  the following horrendous command (all on one line) will give you a word count.&lt;hr /&gt;&lt;pre&gt;echo &amp;quot;select entry_text from mt_entry where entry_blog_id = &lt;strong&gt;yourblog_id&lt;/strong&gt;;&amp;quot; | &lt;br&gt;
mysql -u &lt;strong&gt;mysql_username&lt;/strong&gt; -h &lt;strong&gt;mysql_server_name&lt;/strong&gt; -p &lt;strong&gt;mysql_database_name&lt;/strong&gt; | &lt;br&gt;
php -r &apos;$stdin = file_get_contents(&amp;quot;php://stdin&amp;quot;);print(str_replace(chr(92).chr(110),chr(10),strip_tags($stdin)));&apos; | &lt;br&gt;
wc -w&lt;/pre&gt;&lt;hr /&gt; I&apos;ve bolded the items you&apos;ll need to customize.&lt;br&gt;
&lt;br&gt;
mysql_username, mysql_server_name and mysql_database_name are the same things you&apos;re using in  your MT configuration file.&lt;br&gt;
&lt;br&gt;
yourblog_id is the mysql id number of the blog you want to do the word count on.  If you don&apos;t know how to get this, the following command should give you the ids of all your blogs&lt;hr /&gt;&lt;pre&gt;echo &amp;quot;select blog_id, blog_name from mt_blog;&amp;quot; | &lt;br&gt;
mysql -u &lt;strong&gt;mysql_username&lt;/strong&gt; -h &lt;strong&gt;mysql_servername&lt;/strong&gt; -p &lt;strong&gt;mysql_database_name&lt;/strong&gt;&lt;/pre&gt;&lt;hr /&gt;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.27941-440298</guid>
  	<pubDate>Sun, 27 Nov 2005 13:29:23 -0800</pubDate>
  	<dc:creator>alan</dc:creator>
</item>
<item>
  	<title>By: Marquis</title>
  	<link>http://ask.metafilter.com/27941/How-do-I-do-a-global-wordcount-in-MT#440381</link>	
  	<description>Adamrice&apos;s silly (and in retrospect, obvious) hack worked a treat. Just under 225,000 words. Ca-razy. Thanks to everyone who took the time to help.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.27941-440381</guid>
  	<pubDate>Sun, 27 Nov 2005 15:57:01 -0800</pubDate>
  	<dc:creator>Marquis</dc:creator>
</item>

    </channel>
</rss>
