<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Splitting WordPress Export / Import file</title>
	<atom:link href="http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/</link>
	<description>Life with MINIs (and other cars!)</description>
	<lastBuildDate>Thu, 17 Nov 2011 02:33:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Mike</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6953</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 20 Oct 2011 02:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6953</guid>
		<description>@GBMINI: thanks, you were exactly right. I deleted junk comments, tried again and it worked! Awesome, thanks again for the fast reply and helping random strangers out just like that :-)</description>
		<content:encoded><![CDATA[<p>@GBMINI: thanks, you were exactly right. I deleted junk comments, tried again and it worked! Awesome, thanks again for the fast reply and helping random strangers out just like that <img src='http://www.gbmini.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GBMINI</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6952</link>
		<dc:creator>GBMINI</dc:creator>
		<pubDate>Wed, 19 Oct 2011 13:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6952</guid>
		<description>The problem seems to be that your website has a massive number of comments - perhaps spam comments. The program reads article by article and the error is saying that one article has blown the 20,000 line section limit.
No idea just how big your sections are, but 20,000 is already a huge limit.

Your best bet would be to try clearing out some of the junk from the website.</description>
		<content:encoded><![CDATA[<p>The problem seems to be that your website has a massive number of comments &#8211; perhaps spam comments. The program reads article by article and the error is saying that one article has blown the 20,000 line section limit.<br />
No idea just how big your sections are, but 20,000 is already a huge limit.</p>
<p>Your best bet would be to try clearing out some of the junk from the website.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6951</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 19 Oct 2011 03:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6951</guid>
		<description>I installed the original install (http://www.gbmini.net/downloads/WPsplitter.zip) and run it, selected the xml file, it started doing something and then showed this error message:
&quot;Too many lines in &quot;NoFollow - Some Links Don&#039;t Count @24051&quot;

Any idea how to get around this?
Thanks a lot!</description>
		<content:encoded><![CDATA[<p>I installed the original install (<a href="http://www.gbmini.net/downloads/WPsplitter.zip" rel="nofollow">http://www.gbmini.net/downloads/WPsplitter.zip</a>) and run it, selected the xml file, it started doing something and then showed this error message:<br />
&#8220;Too many lines in &#8220;NoFollow &#8211; Some Links Don&#8217;t Count @24051&#8243;</p>
<p>Any idea how to get around this?<br />
Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EERac</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6783</link>
		<dc:creator>EERac</dc:creator>
		<pubDate>Sun, 28 Nov 2010 03:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6783</guid>
		<description>Whoops, just realized the above link to the python script expires in a month, here&#039;s a link to my reply on wordpress.org that contains the actual code:

http://wordpress.org/support/topic/wxr-file-splitter?replies=7#post-1809736</description>
		<content:encoded><![CDATA[<p>Whoops, just realized the above link to the python script expires in a month, here&#8217;s a link to my reply on wordpress.org that contains the actual code:</p>
<p><a href="http://wordpress.org/support/topic/wxr-file-splitter?replies=7#post-1809736" rel="nofollow">http://wordpress.org/support/topic/wxr-file-splitter?replies=7#post-1809736</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EERac</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6782</link>
		<dc:creator>EERac</dc:creator>
		<pubDate>Sun, 28 Nov 2010 03:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6782</guid>
		<description>Just realized that the python code I posted 6 months ago got horribly mangled (whitespace went away, greater than symbols turned things into malformed html, quotes turned into unicode characters). Here is an untainted version:

http://wordpress.pastebin.ca/2004312</description>
		<content:encoded><![CDATA[<p>Just realized that the python code I posted 6 months ago got horribly mangled (whitespace went away, greater than symbols turned things into malformed html, quotes turned into unicode characters). Here is an untainted version:</p>
<p><a href="http://wordpress.pastebin.ca/2004312" rel="nofollow">http://wordpress.pastebin.ca/2004312</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xavi</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6769</link>
		<dc:creator>xavi</dc:creator>
		<pubDate>Wed, 03 Nov 2010 20:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6769</guid>
		<description>Gracias,

Gran aplicacion, me ha salvado el blog y la vida.

Salu2 desde spain</description>
		<content:encoded><![CDATA[<p>Gracias,</p>
<p>Gran aplicacion, me ha salvado el blog y la vida.</p>
<p>Salu2 desde spain</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MathieuB</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6640</link>
		<dc:creator>MathieuB</dc:creator>
		<pubDate>Sat, 10 Jul 2010 15:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6640</guid>
		<description>I used your alternative install and successfully splitted and imported a 8.9MB Wordpress export. Thank you so much for this nifty useful tool, you&#039;ve made my life so much easier =D</description>
		<content:encoded><![CDATA[<p>I used your alternative install and successfully splitted and imported a 8.9MB WordPress export. Thank you so much for this nifty useful tool, you&#8217;ve made my life so much easier =D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EERac</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6560</link>
		<dc:creator>EERac</dc:creator>
		<pubDate>Sat, 27 Mar 2010 23:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6560</guid>
		<description>If anyone is interested, here is a python script that can also split up a wordpress xml file. When run via the command line, the first argument specifies the file to split up, the second specifies how many chunks it should be split into (default is 2 is no number is given)

--------------

#!/usr/bin/python

# This script is designed to take a wordpress xml export file and split it into some
# number of chunks (2 by default). The number of lines per chunk is determined by counting
# the number of occurences of a particular line, &#039;\n&#039; by default, and breaking up the
# such that each chunk has an equal number occurences of that line. The appropriate header
# and footer is added to each chunk.

import os
import sys
import math

# first argument specifies the wordpress .xml file to split up
if len(sys.argv)  2 else 2
line_delimiter = &#039;\n&#039;

delimiter_count = 0
for line in lines :
	if line == line_delimiter :
		delimiter_count += 1

print &#039;&#039;
print &#039;File &quot;%s&quot; contains %s items&#039; % (input_file_string, delimiter_count)

delimiter_count = 1.0*delimiter_count
delimiters_per_chunk = int(math.ceil(delimiter_count/number_of_chunks))

print &#039;Creating %s files with at most %s items each:&#039; % (number_of_chunks, delimiters_per_chunk)

header = &quot;&quot;
footer = &quot;\n\n\n&quot;
chunk_number = 1
output_file_name = &quot;%s_%s%s&quot; % (input_file_name, chunk_number, input_file_extension)
output_file = open(output_file_name, &#039;w&#039;)
print &#039;   Writing chunk %s to file %s...&#039; % (chunk_number, output_file_name)

delimiter_count = 0
for line in lines :
	if line == line_delimiter : delimiter_count += 1
	
	if chunk_number is 1 and delimiter_count is 0 : header += line
	
	if delimiter_count &gt; delimiters_per_chunk :
		output_file.write(footer)
		output_file.close()
		chunk_number += 1
		delimiter_count = 1
		
		output_file_name = &quot;%s_%s%s&quot; % (input_file_name, chunk_number, input_file_extension)
		output_file = open(output_file_name, &#039;w&#039;)
		print &#039;   Writing chunk %s to file %s...&#039; % (chunk_number, output_file_name)
		output_file.write(header)
		
	output_file.write(line)

output_file.close()
print &#039;Done!\n&#039;</description>
		<content:encoded><![CDATA[<p>If anyone is interested, here is a python script that can also split up a wordpress xml file. When run via the command line, the first argument specifies the file to split up, the second specifies how many chunks it should be split into (default is 2 is no number is given)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>#!/usr/bin/python</p>
<p># This script is designed to take a wordpress xml export file and split it into some<br />
# number of chunks (2 by default). The number of lines per chunk is determined by counting<br />
# the number of occurences of a particular line, &#8216;\n&#8217; by default, and breaking up the<br />
# such that each chunk has an equal number occurences of that line. The appropriate header<br />
# and footer is added to each chunk.</p>
<p>import os<br />
import sys<br />
import math</p>
<p># first argument specifies the wordpress .xml file to split up<br />
if len(sys.argv)  2 else 2<br />
line_delimiter = &#8216;\n&#8217;</p>
<p>delimiter_count = 0<br />
for line in lines :<br />
	if line == line_delimiter :<br />
		delimiter_count += 1</p>
<p>print &#8221;<br />
print &#8216;File &#8220;%s&#8221; contains %s items&#8217; % (input_file_string, delimiter_count)</p>
<p>delimiter_count = 1.0*delimiter_count<br />
delimiters_per_chunk = int(math.ceil(delimiter_count/number_of_chunks))</p>
<p>print &#8216;Creating %s files with at most %s items each:&#8217; % (number_of_chunks, delimiters_per_chunk)</p>
<p>header = &#8220;&#8221;<br />
footer = &#8220;\n\n\n&#8221;<br />
chunk_number = 1<br />
output_file_name = &#8220;%s_%s%s&#8221; % (input_file_name, chunk_number, input_file_extension)<br />
output_file = open(output_file_name, &#8216;w&#8217;)<br />
print &#8216;   Writing chunk %s to file %s&#8230;&#8217; % (chunk_number, output_file_name)</p>
<p>delimiter_count = 0<br />
for line in lines :<br />
	if line == line_delimiter : delimiter_count += 1</p>
<p>	if chunk_number is 1 and delimiter_count is 0 : header += line</p>
<p>	if delimiter_count &gt; delimiters_per_chunk :<br />
		output_file.write(footer)<br />
		output_file.close()<br />
		chunk_number += 1<br />
		delimiter_count = 1</p>
<p>		output_file_name = &#8220;%s_%s%s&#8221; % (input_file_name, chunk_number, input_file_extension)<br />
		output_file = open(output_file_name, &#8216;w&#8217;)<br />
		print &#8216;   Writing chunk %s to file %s&#8230;&#8217; % (chunk_number, output_file_name)<br />
		output_file.write(header)</p>
<p>	output_file.write(line)</p>
<p>output_file.close()<br />
print &#8216;Done!\n&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Worstell</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6559</link>
		<dc:creator>Robert Worstell</dc:creator>
		<pubDate>Sat, 27 Mar 2010 17:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6559</guid>
		<description>Thanks for this great little utility. It did the job and saved my bacon! Have to blog about this one to let people know. I know I&#039;m gushing, but that XML import file is a headache to try to edit - and you saved me hours of work. Thanks again!</description>
		<content:encoded><![CDATA[<p>Thanks for this great little utility. It did the job and saved my bacon! Have to blog about this one to let people know. I know I&#8217;m gushing, but that XML import file is a headache to try to edit &#8211; and you saved me hours of work. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GBMINI</title>
		<link>http://www.gbmini.net/wp/2008/11/splitting_wordpress_export_import_file/comment-page-1/#comment-6464</link>
		<dc:creator>GBMINI</dc:creator>
		<pubDate>Mon, 23 Nov 2009 19:25:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gbmini.net/wp/?p=1409#comment-6464</guid>
		<description>I&#039;ve uploaded a &lt;a href=&quot;http://gbmini.net/downloads/WPsplitterSetup.zip&quot; rel=&quot;nofollow&quot;&gt;Microsoft-install version of WPsplitter here&lt;/a&gt;; it might help with Windows 7 issues.
You&#039;ll need to download it, unzip the files, then run the SETUP.EXE included within.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve uploaded a <a href="http://gbmini.net/downloads/WPsplitterSetup.zip" rel="nofollow">Microsoft-install version of WPsplitter here</a>; it might help with Windows 7 issues.<br />
You&#8217;ll need to download it, unzip the files, then run the SETUP.EXE included within.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

