<HTML>
<HEAD>
<TITLE>Re: [consulting] Database migration script or copy/paste?</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Victor, <BR>
<BR>
Thanks. That sounds incredible. I totally agree with you. I&#8217;m fine spending hours setting up an automated system that works because just with the few sites that I&#8217;ve done I&#8217;m disgusted that it takes so long to insert content.<BR>
<BR>
Holly<BR>
<BR>
<BR>
On 4/20/10 6:01 AM, &quot;Victor Kane&quot; &lt;victorkane@gmail.com&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>You will save a great deal of time with the mis-named &quot;Node Export&quot; module: drupal.org/project/node_export <a href="http://drupal.org/project/node_export">&lt;http://drupal.org/project/node_export&gt;</a>  <BR>
It also handles bulk export, import, and I have used it to import thousands of nodes stored in a CSV format.<BR>
But, as Khalid says, there are no pictures or node references; from the project page:<BR>
<BR>
&quot;Since the bulk export feature has been added, a lot of people have assumed this module will allow you to export the structure of a whole site and keep things like menu links, authors, node references, book hierarchy, etc.. BUT NO IT DOESN'T. The reason is that the ID values that are used to identify the connections between things like that get changed around during an import. There are hooks that allow manipulation of nodes during imports/exports that could allow a programmer to add support for these features by tracking additional data to be able to fix the nodes afterwards, but nobody has gone to the trouble of doing that yet.&quot;<BR>
<BR>
It is indeed amazing that no-one has gone to that trouble, or has shared solutions. For complex data structures, there is the migration module and the table wizard, which were designed for huge sites, and which the makers chose to share.<BR>
<BR>
The node_import module might be of use also, or roll your own script based on many snippets in the Drupal handbook and around the web.<BR>
<BR>
This discussion on drupal.org <a href="http://drupal.org">&lt;http://drupal.org&gt;</a> &nbsp;sums the &quot;state of the art&quot; perfectly:<BR>
<BR>
drupal.org/node/762022#comment-2806388 <a href="http://drupal.org/node/762022#comment-2806388">&lt;http://drupal.org/node/762022#comment-2806388&gt;</a>  and refers you to the discussion where there are some examples: drupal.org/node/178506 <a href="http://drupal.org/node/178506">&lt;http://drupal.org/node/178506&gt;</a>  (creating a node programmatically). <BR>
<BR>
Also: acquia.com/blog/migrating-drupal-way-part-i-creating-node <a href="http://acquia.com/blog/migrating-drupal-way-part-i-creating-node">&lt;http://acquia.com/blog/migrating-drupal-way-part-i-creating-node&gt;</a> <BR>
<BR>
The import_html module is an option, but it brings a lot of overhead into the site in my opinion.<BR>
<BR>
A script to import static HTML would work by iterating over the files in a directory and then using common PHP functions to read in the text, and then extracting the body and sticking it into the body of the Drupal node. You can use a regular expression for that, or, this module is very interesting: drupal.org/project/querypath <a href="http://drupal.org/project/querypath">&lt;http://drupal.org/project/querypath&gt;</a> <BR>
Based on a &quot;scraper&quot; kind of program, It allows an &quot;xpath&quot; like approach for common html files. Check it out.<BR>
<BR>
Any of these approaches are better than copying and pasting. A developer needs to shun copying and pasting. Even if you spend more time automating the process than brute force, you will have reusable tools.<BR>
<BR>
Victor Kane<BR>
<a href="http://awebfactory.com.ar">http://awebfactory.com.ar</a><BR>
<a href="http://projectflowandtracker.com">http://projectflowandtracker.com</a><BR>
<BR>
On Tue, Apr 20, 2010 at 2:17 AM, Holly Ferree &lt;hferree@gmail.com&gt; wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi Bob,<BR>
<BR>
Thanks for the input. I'm not web to scripts... I just didn't know what else<BR>
to call them... I just want to know if there is a better way to insert a lot<BR>
of content without so much clicking and copying/pasting. :)<BR>
<BR>
I am so thrilled to know about all these modules that I can try!<BR>
<BR>
I was curious if Excel could be used (it's all tables anyways)... Would you<BR>
export it was a .csv?<BR>
<BR>
Thanks,<BR>
<FONT COLOR="#888888">Holly<BR>
</FONT><BR>
<BR>
On 4/20/10 12:12 AM, &quot;Bob Schmitt&quot; &lt;bobschmitt@xinsys.net&gt; wrote:<BR>
<BR>
&gt; I've had pretty good luck with the Import/Export module<BR>
&gt; (<a href="http://drupal.org/project/import_export_tool)">http://drupal.org/project/import_export_tool)</a> and the Node Export module<BR>
&gt; (<a href="http://drupal.org/project/node_export).">http://drupal.org/project/node_export).</a> I can't remember which one is the<BR>
&gt; best, but I have used them to dump/import more than 30K nodes organized in in<BR>
&gt; 7 cck node types. It worked pretty well except for importing multiple taxonomy<BR>
&gt; terms per node.<BR>
&gt;<BR>
&gt; I've also used these modules to migrate content from other sites into Drupal<BR>
&gt; sites using Excel and FilemakerPro as intermediary platforms to massage the<BR>
&gt; data into the correct formats prior to the migration.<BR>
&gt;<BR>
&gt; Strictly speaking, neither of these are database migration scripts, but the<BR>
&gt; get the job done.<BR>
&gt;<BR>
&gt; bob<BR>
&gt;<BR>
&gt; On Apr 19, 2010, at 9:11 PM, Holly Ferree wrote:<BR>
&gt;<BR>
&gt; Hi All,<BR>
&gt;<BR>
&gt; What is the most efficient way of transferring a site's content of 10 pages<BR>
&gt; or more into drupal? (basically past the realm that you would want to copy<BR>
&gt; and paste all the content to where another option would be easier to add a<BR>
&gt; good amount of content would be the way to go)<BR>
&gt;<BR>
&gt; I have done the copy/paste of hundreds of lines of content from Word and<BR>
&gt; done the whole create content &gt; page, paste and format content, save page,<BR>
&gt; repeat process till I thought I would die of boredom...<BR>
&gt;<BR>
&gt; Please tell me there is a better way! (these sites have been from scratch or<BR>
&gt; have not used a database previously. )<BR>
&gt;<BR>
&gt; Thanks,<BR>
&gt;<BR>
&gt; Holly Ferree, Graphic Designer, BFA<BR>
&gt; hferree@gmail.com<BR>
&gt; <a href="http://www.designbyholly.com/">http://www.designbyholly.com/</a><BR>
&gt;<BR>
&gt;<BR>
&gt; PS I would also prefer to do it myself and not hire someone who doesn't mind<BR>
&gt; repetitive work... :)<BR>
&gt;<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; consulting mailing list<BR>
&gt; consulting@drupal.org<BR>
&gt; <a href="http://lists.drupal.org/mailman/listinfo/consulting">http://lists.drupal.org/mailman/listinfo/consulting</a><BR>
&gt;<BR>
&gt; Bob Schmitt<BR>
&gt; 432 Harrison Ave.<BR>
&gt; Helena, MT 59601<BR>
&gt; Voice: +1.406.459.6537<BR>
&gt; Skype: captbobalou<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; consulting mailing list<BR>
&gt; consulting@drupal.org<BR>
&gt; <a href="http://lists.drupal.org/mailman/listinfo/consulting">http://lists.drupal.org/mailman/listinfo/consulting</a><BR>
<BR>
Holly Ferree, Graphic Designer, BFA<BR>
hferree@gmail.com<BR>
<a href="http://www.designbyholly.com/">http://www.designbyholly.com/</a><BR>
<BR>
<BR>
_______________________________________________<BR>
consulting mailing list<BR>
consulting@drupal.org<BR>
<a href="http://lists.drupal.org/mailman/listinfo/consulting">http://lists.drupal.org/mailman/listinfo/consulting</a><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'>_______________________________________________<BR>
consulting mailing list<BR>
consulting@drupal.org<BR>
<a href="http://lists.drupal.org/mailman/listinfo/consulting">http://lists.drupal.org/mailman/listinfo/consulting</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'><BR>
<BR>
</SPAN></FONT></FONT><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Holly Ferree, Graphic Designer, BFA<BR>
813.786.0852<BR>
hferree@gmail.com<BR>
<a href="http://www.designbyholly.com/">http://www.designbyholly.com/</a><BR>
</SPAN></FONT>
</BODY>
</HTML>