So you want to move to Bitakora from COREBlog. But you have many entries and don't want to lose them?
Don't fret. Bitakora can import those entries. The problem is, we need to have those entries in xml, as specified by Bitakora import.txt
Go to your COREBlog instance and create a Script (Python):
msj= """<?xml version="1.0" encoding="UTF-8"?>
<posts>
"""
for i in container.rev_entry_items(start=0,count=100):
msj+= """ <post>
<author> %s </author>
<title><![CDATA[ %s ]]></title>
<date> %s </date>
<body><![CDATA[ %s ]]></body>
<tags><![CDATA[ ]]></tags>
<comments>
""" % (i.author,i.title, i.date_created().strftime('%d/%b/%Y %H:%M'),i.rendered_body)
if len(i.comments):
for c in i.comment_list():
msj += """
<comment>
<author><![CDATA[ %s ]]> </author>
<date> 2006/07/29 </date>
<body><![CDATA[ %s ]]></body>
<url><![CDATA[ %s ]]></url>
<email><![CDATA[ %s ]]></email>
</comment>
""" % (c.author,c.body,c.url,c.email)
msj+="""</comments>
</post>
"""
msj += '</posts>'
print msj
return printed
Test the script and you'll get the entries in a format Bitakora understands.
Now, go to your Bitakora instance/admin, and find prefs tab. At the end of the page, import your entries.
One snag. I can't seem to get comment created_date. It always raise an unauthorized error. Haven't yet looked at it. It's the weekend! Probably an External Method will work. Oh, and another. If you use restructered text, you wont get a rendered html. :(
Trackback is http://myzope.kedai.com.my/blogs/kedai/93/tbping
Woot!
We used to have our COREBlog posts in structured text and instead of using rendered_html you can use body and convert to HTML using::
from Products.PythonScripts.standard import structured_text
structured_text(i.body)
I think that with reStructured text something similar can be done.
Regards,
Mikel
Bitakora author :P
will try it soon. btw - it seems that bitakora is taking the back seat? no new release?
Well, now we are very busy with other projects (Plone) but we have some ideas to improve Bitakora specially regarding comment spam and so on.
Also, I have some ideas to start using Five and Zope3 technologies and get rid of some very ugly things I've done in Bitakora ;)
I also hope to have a public SVN server with Bitakora code, we'll have it sooner than later :)
is cool. hope i can contribute somehow.
:)
