Esempio n. 1
0
def main():
    if len(sys.argv) != 2:
        errorExit('USAGE: ' + sys.argv[0] + ' <titanium-version>')

    version = sys.argv[1]

    if not TITANIUM_VERSION_REGEX.match(version):
        errorExit('ERROR: Invalid titanium version specified. Must be in the format X.X.X')

    print('Retrieving Titanium JSCA API for version: ' + version)
    jsca = retrieveJsca(version)

    print('Converting API to JavaScript')
    javascript = convertJsca2Js(jsca)

    outputFilePath = 'titanium-mobile-' + version + '.js'
    print('Writing JavaScript to file: ' + outputFilePath)
    writeJsFile(javascript, outputFilePath)
Esempio n. 2
0
def main():
    if len(sys.argv) != 2:
        errorExit("USAGE: " + sys.argv[0] + " <titanium-version>")

    version = sys.argv[1]

    if not TITANIUM_VERSION_REGEX.match(version):
        errorExit("ERROR: Invalid titanium version specified. Must be in the format X.X.X")

    print ("Retrieving Titanium JSCA API for version: " + version)
    jsca = retrieveJsca(version)

    print ("Converting API to JavaScript")
    javascript = convertJsca2Js(jsca, version)

    outputFilePath = "titanium-js/titanium-mobile-" + version + ".js"
    print ("Writing JavaScript to file: " + outputFilePath)
    writeJsFile(javascript, outputFilePath)
Esempio n. 3
0
def main():
    if len(sys.argv) != 2:
        errorExit('USAGE: ' + sys.argv[0] + ' <titanium-version>')

    version = sys.argv[1]

    if not TITANIUM_VERSION_REGEX.match(version):
        errorExit(
            'ERROR: Invalid titanium version specified. Must be in the format X.X.X'
        )

    print('Retrieving Titanium JSCA API for version: ' + version)
    jsca = retrieveJsca(version)

    print('Converting API to JavaScript')
    javascript = convertJsca2Js(jsca, version)

    outputFilePath = 'titanium-js/titanium-mobile-' + version + '.js'
    print('Writing JavaScript to file: ' + outputFilePath)
    writeJsFile(javascript, outputFilePath)
Esempio n. 4
0
    sys.exit(1)

#
# Function tries to find Alloy framework files with the same version which 
# Titanium have. If it finds - download it and convert it too
#
def tryFindAlloy(version):
    print 'Searching for Alloy Framework corresponding to Titanium version ' + version

    try:
        jsca = retrieveJsca(version,'alloy')
    except Exception, e:
        errorExit('Not found for this version')

    print('Converting API to JavaScript')
    javascript = convertJsca2Js(jsca, version)

    outputFilePath = 'titanium-js/titanium-mobile-alloy-' + version + '.js'
    print('Writing JavaScript to file: ' + outputFilePath)
    writeJsFile(javascript, outputFilePath)

def main():
    if len(sys.argv) < 2 or len(sys.argv) > 3:
        errorExit('USAGE: ' + sys.argv[0] + ' <titanium-version> (optional)<alloy-titanium-version>')

    version = sys.argv[1]

    if len(sys.argv) > 2:
        alloy_version = sys.argv[2]
    else:
        alloy_version = version
Esempio n. 5
0

#
# Function tries to find Alloy framework files with the same version which
# Titanium have. If it finds - download it and convert it too
#
def tryFindAlloy(version):
    print 'Searching for Alloy Framework corresponding to Titanium version ' + version

    try:
        jsca = retrieveJsca(version, 'alloy')
    except Exception, e:
        errorExit('Not found for this version')

    print('Converting API to JavaScript')
    javascript = convertJsca2Js(jsca, version)

    outputFilePath = 'titanium-js/titanium-mobile-alloy-' + version + '.js'
    print('Writing JavaScript to file: ' + outputFilePath)
    writeJsFile(javascript, outputFilePath)


def main():
    if len(sys.argv) < 2 or len(sys.argv) > 3:
        errorExit('USAGE: ' + sys.argv[0] +
                  ' <titanium-version> (optional)<alloy-titanium-version>')

    version = sys.argv[1]

    if len(sys.argv) > 2:
        alloy_version = sys.argv[2]