What formats can Nabble import?

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

What formats can Nabble import?

Dean Brettle
Hi,

Thank you very much for all your hard work on Nabble!

I have a set of 8 forums (total of ~1000 threads and ~5000 posts) on my website that I'd like to import to Nabble.  These aren't mailing lists so I don't have an mbox file.  However, I do have full access to the DB containing the posts, so I can theoretically write some code to export to any format.  Should I fake an mbox file or create a file in Nabble's export format or something else?  What makes it easiest for you?

Also, is there a way to get the messages from different forums imported into different Nabble subforums?

If it matters, links to the existing forums can be found at the top of the right sidebar on:

http://www.brettle.com/neatupload


and

http://www.brettle.com/neathtml

If you click through those links, the original forum topics are listed below the new embedded Nabble forums.

Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
Hi Dean, thanks for your message. As you realized, Nabble can import two formats: mbox and our custom XML archives. Since your forums are not mailing lists, maybe you should go with our custom XML format. You may first export some example forums to that format and look at how each file is structured. If you think this is too complex, there is a third option: I give you a sample database (postgresql) and you insert records directly into it. But I think you should try the custom XML first. Please let me know what you think.
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Dean Brettle
The XML format definitely sounds like the way to go.  Two quick questions that I couldn't resolve looking at example exports:

1.  Are there particular exportIds and ownerAnonymousIds I should use or avoid so I don't collide with messages or users in other forums, or do those Ids just need to be unique within a forum?
2.  The sample exports I've looked at so far have filenames of the form node###.xml.  Since I'll have more than 1000 nodes, can I use node####.xml instead (note extra digit), or will that confuse your importer?

Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
Dean Brettle wrote
1.  Are there particular exportIds and ownerAnonymousIds I should use or avoid so I don't collide with messages or users in other forums, or do those Ids just need to be unique within a forum?
You can use a simple counter for exportId. These numbers won't become the node ID in the database, so you can use a counter and it should work. For ownerAnonymousId, you can use any simple string (e.g., anon-123), but this should be used only if you don't have the email of the user (otherwise the user isn't anonymous and should be treated as registered).
Dean Brettle wrote
2.  The sample exports I've looked at so far have filenames of the form node###.xml.  Since I'll have more than 1000 nodes, can I use node####.xml instead (note extra digit), or will that confuse your importer?
That's fine. Just let the counter go. Four or five digits won't be a problem.
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Dean Brettle
OK.  I think I've got it.  Please import:

http://www.brettle.com/brettleNapple.zip

into:

<a href="http:// http://n3.nabble.com/Support-Forums-f688923.html">http://n3.nabble.com/Support-Forums-f688923.html

The forum already contains forum nodes for the forums themselves, so I did not include those nodes in the zip file.  The zip file only contains the nodes for the messages.  The first message in each topic has its parentId set to the the exportId of the pre-existing forum node that it belongs under.  Other messages have their parentIds set to the exportIds of the preceding message node in the topic.  I just used a counter (starting at 0) for the exportIds I created.

If you need any of that changed, just let me know.

Many thanks!
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
Hi Dean, thanks for building the zip file with the export information. We just need a simple change to make it work: please make sure the first node is a forum and all threads are under it. In other words, the first node must be a forum (type=APP) with exportID=0 and you can use any name (e.g., Brettle Temp). All threads must have parentId=0 instead of parentId=689157. Please let me know if you have questions.
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Dean Brettle
Hugo <Nabble> wrote
please make sure the first node is a forum and all threads are under it. In other words, the first node must be a forum (type=APP) with exportID=0 and you can use any name (e.g., Brettle Temp). All threads must have parentId=0 instead of parentId=689157. Please let me know if you have questions.
I can do that, but then how will the importer know which of the existing forums to place the threads in?  Per my earlier post in this thread, I'm trying to import the threads into 8 existing nabble forums.  Do you want a separate zip file for each forum?

Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
Dean Brettle wrote
Do you want a separate zip file for each forum?
Yes, please. So always make sure the first node is a placeholder for the real forum.
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Dean Brettle
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
Hi Dean, sorry for the delay in getting back to you. I checked your files and they can import successfully, but all dates seem to be wrong. Most dates are from 1970 and I believe you are using the wrong approach to generate the date field. Nabble is built on java and we use the Date(long) contructor explained here:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#Date(long)

The value you should print is "the milliseconds since January 1, 1970, 00:00:00 GMT."

Is this what you are using?
If not, is it possible for you to rebuild the archives with the correct dates?
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Dean Brettle
I've recreated the archives in the same locations.  I was using seconds instead of milliseconds.  Thanks for catching that!


Reply | Threaded
Open this post in threaded view
|

import from pipermail files to Nabble

Graham Perrin
In reply to this post by Dean Brettle
Dean Brettle wrote
What formats can Nabble import?
For the benefit of anyone else reading this topic:

* import of concatenated pipermail files is an option, but it may not have the desired effect (at least: scrubbed attachments are not present).
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
In reply to this post by Dean Brettle
Hi Dean, sorry for the delay. I've imported those archives:

http://brettle-temp.749852.n3.nabble.com/
http://brettle-temp.749860.n3.nabble.com/
http://brettle-temp.749864.n3.nabble.com/
http://brettle-temp.749870.n3.nabble.com/
http://brettle-temp.749957.n3.nabble.com/
http://brettle-temp.750441.n3.nabble.com/
http://brettle-temp.750783.n3.nabble.com/

Now you should merge them with your real forums. Here's how to merge:

(1) Open the temp forum (above) and click on "Options > Structure > Change parent", select "Set a New Parent" and paste the link to the real forum (After this step, the temp forum will be a sub-forum of your real forum)

(2) Again, open the temp forum and click on "Options > Structure > Change parent", but this time you will select "Merge into Current Parent". This option will move all topics to the real forum.

Please let me know if you have questions.
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Dean Brettle
Thanks!  FYI, when I tried to "Set a New Parent", I got an error to the effect that the new parent was not on the same host.  I found that I needed to change just the hostname part of the URL to be the same hostname as the temp forum.  Once I did that, it worked like a charm.  I suspect that is related to your recent addition of the custom domain names feature (which is very cool by the way).

Thanks again!
Reply | Threaded
Open this post in threaded view
|

Re: What formats can Nabble import?

Hugo <Nabble>
Thanks for reporting this problem, Dean. I will look into it.
Please let me know if I can help you in any other way.