Thanks, I found some similar code in the trac source
and tried it and it worked... 

http://trac-hacks.org/wiki/MoinToTracScript

Also included is an updated script to convert
a Twiki Wiki to moinmoin.

Thanks for the help


On Thu, 2006-11-16 at 21:42 -0800, Matt Good wrote:
> kris wrote:
> > Thanks for the pointers,  using that I can write a small script
> > to import the pages, but the attachments have me stumped.
> >
> > Does anybody know how to define an attachment to a page?
> >
> > Here's a 1st draft of moin2trac script:
> > ...snip...
> 
> Since you're using Python using the Trac model objects would be a
> little more straightforward:
> http://trac.edgewall.org/wiki/TracDev/DataModels#WikiPage
> 
> There's no Attachment example there, but this should get you started,
> we'd love a more complete example if you'd like to contribute one :)
> 
> file = open(filename)
> filesize = os.fstat(file.fileno())[6]
> attachment = Attachment(env, 'wiki', 'WikiPageName')
> attachment.insert(os.path.basename(filename), file, filesize)
> 
> -- Matt Good
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Trac Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to