#8382 py3: forgepastebin, tracwikiimporter

unreleased
closed
py3 (9)
General
nobody
2021-01-08
2020-11-05
No

These aren't part of core Allura for licensing and demonstration reasons, but would be good to keep maintaining them.

TracWikiImporter doesn't have much test coverage, and doesn't get used much at all. Main Allura codebase has a test that uses it: forgeimporters.trac.tests.functional.test_trac:TestTracImportController

Discussion

  • Dave Brondsema

    Dave Brondsema - 2020-12-31
    • status: open --> review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2020-12-31

    forgepastebin,tracwikiimporter,allura:db/8382

    Need to do releases and version bumps. I found http://www.cansas.org/trac/wiki as a small real trac instance you can test importing from.

     
  • Dillon Walls

    Dillon Walls - 2021-01-07
    • status: review --> open
     
  • Dillon Walls

    Dillon Walls - 2021-01-07
    • in trac importer, were these two page['text']/page['labels'] lines intended to be removed? tracwikiimporter/scripts/wiki_from_trac/loaders.py,
    diff --git tracwikiimporter/scripts/wiki_from_trac/loaders.py tracwikiimporter/scripts/wiki_from_trac/loaders.py
    index e9ab881..c877f45 100644
    --- tracwikiimporter/scripts/wiki_from_trac/loaders.py
    +++ tracwikiimporter/scripts/wiki_from_trac/loaders.py
    @@ -69,11 +74,9 @@ def import_wiki(cli, project, tool, options, doc_txt):
         else:
             pages = doc
         if options.verbose:
    -        print "Processing %d pages" % len(pages)
    +        print("Processing %d pages" % len(pages))
         for page in pages:
    -        title = page.pop('title').encode('utf-8')
    -        page['text'] = page['text'].encode('utf-8')
    -        page['labels'] = page['labels'].encode('utf-8')
    +        title = six.ensure_text(page.pop('title'))
             r = cli.call(url + '/' + title, **page)
    
    • I'm sure you know what you're doing but I quite understand lines like this:
    -        name='paste'
    +        name = str('paste')
    
     
  • Dave Brondsema

    Dave Brondsema - 2021-01-07

    Those are intentional yes :)

     
  • Dillon Walls

    Dillon Walls - 2021-01-08
    • status: open --> closed
     

Log in to post a comment.