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 -~----------~----~----~----~------~----~------~--~---
