コード例 #1
0
    if teamColours:
        ipRed.stitch(outputFolder + sep + itemName + ' RED 3D.jpg', n, verticalRotations)
        ipBlu.stitch(outputFolder + sep + itemName + ' BLU 3D.jpg', n, verticalRotations)
    else:
        ip.stitch(outputFolder + sep + itemName + ' 3D.jpg', n, verticalRotations)
    # Upload images to wiki
    if teamColours:
        uploadFile(outputFolder, itemName + ' RED 3D.jpg')
        uploadFile(outputFolder, itemName + ' BLU 3D.jpg')
    else:
        uploadFile(outputFolder, itemName + ' 3D.jpg')
    # All done yay
    print '\nAll done'

if __name__ == '__main__':
    wiki.login('darkid')
    starttime = time()

    # Poot values here
    automateDis(key = 'models.workshop.weapons.c_models.c_atom_launcher.c_atom_launcher.mdl',
                numberOfImages = 24,
                n = 0,
                rotationOffset = -6,
                verticalOffset = None,
                initialRotation = (0.000000, 0.000000, 0.000000),
                initialTranslation = (79.149429, 0.000000, 1.789900),
                verticalRotations = 0,
                screenshotPause = False,
                teamColours = False,
                pathToHlmv = r'F:\Steam\steamapps\common\Team Fortress 2\bin',
                itemName = 'User Darkid Test',
コード例 #2
0
ファイル: dupefiles2.py プロジェクト: seb26/testpy
# -*- coding: UTF-8 -*-

import wikitools
import settings
import datetime
import time
import rawdata
from wikitools import wiki, api
from collections import defaultdict

print 'Logging in.'
wiki = wikitools.Wiki(settings.apiurl)
wiki.login(settings.username, settings.password)
print 'Logged in.'

report_title = settings.page_prefix + 'Duplicate files'

report_template = '''
List of all files with matching {{w|SHA-1}} hashes; %s unique files, <onlyinclude>%s</onlyinclude> duplicated files in total. Data as of %s.

== List ==
%s
'''

"""
res = { 'query': { 'allimages': [

    { 'name': 'FileA.png', 'sha1': '477c3d4234936fd32f02a08b9a76e902d3efd9c4' },
    { 'name': 'FileB.png', 'sha1': '477c3d4234936fd32f02a08b9a76e902d3efd9c4' },
    { 'name': 'FileX.png', 'sha1': 'bbc9033429c4132f236091f6ab18f70ebad863dc' },
    { 'name': 'FileY.png', 'sha1': 'bbc9033429c4132f236091f6ab18f70ebad863dc' },
コード例 #3
0
ファイル: query.py プロジェクト: seb26/testpy
def login():
    print 'Logging in as %s...' % config.username
    if not wiki.login(config.username, config.password, remember=True):
        pass
    userStats()