Export to text file

arcane - October 3, 2009 - 02:24
Project:Node Export
Version:6.x-2.17
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I have a few thousand nodes to export. Is there a way to export to a text file on the filesystem directly instead of to a textbox?

#1

danielb - October 3, 2009 - 02:53

I've been thinking about this, the idea came up in another issue - but I haven't had a chance to do anything about it yet. It shouldn't be too hard, I have a similar feature in one of my other modules.

In the meantime, you could call the function that does the exporting and make a file thing yourself somehow :/

#2

arcane - October 3, 2009 - 04:36

Ok, I can try that, which function does the exporting?

#3

danielb - October 4, 2009 - 23:40

hmm! there isn't really a nice function for this, a few things will have to change I guess

the code for it would be

  $nids = array(4, 5, 6); // nodes with node ids: 4, 5, and 6.
  foreach ($nids as $nid) {
    $node_codes[] = node_export_node_export(node_load($nid), TRUE, 1);
  }
  $node_code = "array(\n  ". implode(",\n  ", $node_codes) .",\n)";

something like that

#4

John Carbone - October 5, 2009 - 15:13

In the same boat here. Few thousand nodes to move. Definitely would be a great add-on feature. Firefox tanks pretty hard when copying and pasting anything over about 200 simple nodes.

Awesome module though, thanks for sharing it.

#5

danielb - October 6, 2009 - 01:39
Status:active» fixed

I've added text file support to 6.x-2.17, you just have to turn it on in the config.

#6

arcane - October 6, 2009 - 03:42

Thanks I'll take a look!!

#7

arcane - October 6, 2009 - 04:04

I unpacked the new tar file over the old directory, and saved the new settings (I used the defaults). I get the following error when i try to do an export:

Cannot redeclare node_export_settings() (previously declared in /var/www/dev.mysite.com/public_html/sites/all/modules/node_export/node_export.module:242) in /var/www/dev.mysite.com/public_html/sites/all/modules/node_export/node_export.pages.inc on line 77, referer: http://dev.mysite.com/admin/content/node/overview

#8

danielb - October 6, 2009 - 05:15

Disable the module, delete the module completely, add the new module back, renable.

#9

DarrellDuane - October 6, 2009 - 21:23
Version:6.x-2.9» 6.x-2.17
Status:fixed» needs work

Thanks for adding this functionality in, we also have a lot of data we're working with and its great to handle it outside of the browser.

I'm getting these errors now that I've upgraded:

Warning: Call-time pass-by-reference has been deprecated in C:\Drupal-6.14\sites\all\modules\node_export\node_export.module on line 263

Warning: Call-time pass-by-reference has been deprecated in C:\Drupal-6.14\sites\all\modules\node_export\node_export.module on line 276

#10

danielb - October 6, 2009 - 23:36
Status:needs work» fixed

thanks

#11

John Carbone - October 7, 2009 - 00:49

Oh wow, that's awesome!! I wish I'd checked this thread sooner... I just finished my import (copy and paste style) this afternoon. Doh! : ) I'll have to keep it in mind for future use though. Thanks again danielb.

#12

arcane - October 11, 2009 - 21:44

Thanks danielb, works like a charm!!

#13

System Message - October 25, 2009 - 21:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.