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 |
Jump to:
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
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
Ok, I can try that, which function does the exporting?
#3
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
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
I've added text file support to 6.x-2.17, you just have to turn it on in the config.
#6
Thanks I'll take a look!!
#7
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
Disable the module, delete the module completely, add the new module back, renable.
#9
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
thanks
#11
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
Thanks danielb, works like a charm!!
#13
Automatically closed -- issue fixed for 2 weeks with no activity.