Пример #1
0
def generate_wiki():
    """Automatically generate wiki pages."""
    git_pull()
    sys.path += ['/Users/jaakko/Scripts']
    import dew
    dew.login()
    # Today's event data.
    ev = builder.Event(latestAvailable=True)
    if ev.release_type() == 'stable':
        dew.submitPage('Latest Doomsday release',
            '#REDIRECT [[Doomsday version %s]]' % ev.version())
    dew.logout()
Пример #2
0
def generate_wiki():
    """Automatically generate wiki pages."""
    git_pull()
    sys.path += ['/Users/jaakko/Scripts']
    import dew
    dew.login()
    # Today's event data.
    ev = builder.Event(latestAvailable=True)
    if ev.release_type() == 'stable':
        dew.submitPage('Latest Doomsday release',
                       '#REDIRECT [[Doomsday version %s]]' % ev.version())
    dew.logout()
Пример #3
0
    print indexPage['variable']
    for amb in ambigs:
        print amb.title
        print amb.content
    sys.exit()   
    
        
dew.login()
        
dew.submitPage('Console command reference', indexPage['command'], comment)
dew.submitPage('Console variable reference', indexPage['variable'], comment)

print 'Submitting deambiguation pages...'

for amb in ambigs:
    print '-', amb.title
    dew.submitPage(amb.title, amb.content, comment)

print 'Submitting pages...'

for col in collections:
    pages = pagesForCollection[col]
    count = len(pages)
    i = 0
    for page in pages.values():
        i += 1
        print '-', col, ": %i / %i" % (i, count)
        dew.submitPage(page.title, page.content, comment)

dew.logout()
Пример #4
0
print('Writing %i pages to Manual:' % len(content))

for c in content:
    print('... %s' % c[0])
    dew.submit_page(c[0], c[1], comment)

#dew.submitPage('Console command reference', indexPage['command'], comment)
#dew.submitPage('Console variable reference', indexPage['variable'], comment)
#
# print 'Submitting deambiguation pages...'
#
# for amb in ambigs:
#     print '-', amb.title
#     dew.submitPage(amb.title, amb.content, comment)
#
# print 'Submitting pages...'
#
# for col in collections:
#     pages = pagesForCollection[col]
#     count = len(pages)
#     i = 0
#     for page in pages.values():
#         i += 1
#         print '-', col, ": %i / %i" % (i, count)
#         dew.submitPage(page.title, page.content, comment)
#
dew.logout()

print('Done.')