Exemplo n.º 1
0
def output_file(fname=None):
    """Output text file of Cocoa classes to given filename."""
    if fname is None:
        fname = "./cocoa_indexes/classes.txt"
    if not os.path.isdir(os.path.dirname(fname)):
        os.mkdir(os.path.dirname(fname))

    cocoa_frameworks = (
        "Foundation",
        "AppKit",
        "AddressBook",
        "CoreData",
        "PreferencePanes",
        "QTKit",
        "ScreenSaver",
        "SyncServices",
        "WebKit",
    )
    iphone_frameworks = ("UIKit", "GameKit")
    iphone_sdk_path = "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk"
    headers_and_frameworks = (
        find_headers("", cocoa_frameworks).items() + find_headers(iphone_sdk_path, iphone_frameworks).items()
    )

    superclasses = get_superclasses(get_classes(headers_and_frameworks))
    write_file(fname, superclasses)
Exemplo n.º 2
0
def output_file(fname=None):
    '''Output text file of Cocoa classes to given filename.'''
    if fname is None:
        fname = './cocoa_indexes/classes.txt'
    if not os.path.isdir(os.path.dirname(fname)):
        os.mkdir(os.path.dirname(fname))

    frameworks = ('Foundation', 'AppKit', 'AddressBook', 'CoreData',
                  'PreferencePanes', 'QTKit', 'ScreenSaver', 'SyncServices',
                  'WebKit')
    headers_and_frameworks = find_headers(frameworks).items()

    superclasses = get_superclasses(get_classes(headers_and_frameworks))
    write_file(fname, superclasses)
Exemplo n.º 3
0
def output_file(fname=None):
    '''Output text file of Cocoa classes to given filename.'''
    if fname is None:
        fname = './cocoa_indexes/classes.txt'
    if not os.path.isdir(os.path.dirname(fname)):
        os.mkdir(os.path.dirname(fname))

    frameworks = ('Foundation', 'AppKit', 'AddressBook', 'CoreData',
                  'PreferencePanes', 'QTKit', 'ScreenSaver', 'SyncServices',
                  'WebKit')
    headers_and_frameworks = find_headers(frameworks).items()

    superclasses = get_superclasses(get_classes(headers_and_frameworks))
    write_file(fname, superclasses)
Exemplo n.º 4
0
def output_file(fname=None):
    '''Output text file of Cocoa classes to given filename.'''
    if fname is None:
        fname = './cocoa_indexes/classes.txt'
    if not os.path.isdir(os.path.dirname(fname)):
        os.mkdir(os.path.dirname(fname))

    cocoa_frameworks = ('Foundation', 'AppKit', 'AddressBook', 'Cocoa', 'CloudKit', 'CoreAudio', 'CoreData', 'CoreFoundation', 'CoreGraphics', 'CoreLocation', 'CoreServices', 'EventKit', '' ,'PreferencePanes', 'QTKit', 'ScreenSaver', 'Security', 'StoreKit' ,'SyncServices', 'WebKit')
    iphone_frameworks = ('CFNetwork', 'CoreAudio', 'CoreData', 'CoreFoundation', 'CoreGraphics', 'CoreImage', 'CoreLocation', 'EventKit', 'EventKitUI', 'Foundation', 'MapKit', 'QuartzCore', 'Security', 'StoreKit', 'UIKit', 'GameKit', 'WebKit')
    iphone_sdk_path = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk'
    headers_and_frameworks = find_headers('', cocoa_frameworks).items() + \
                             find_headers(iphone_sdk_path, iphone_frameworks).items()

    superclasses = get_superclasses(get_classes(headers_and_frameworks))
    write_file(fname, superclasses)
Exemplo n.º 5
0
def output_file(fname=None):
    '''Output text file of Cocoa classes to given filename.'''
    if fname is None:
        fname = './cocoa_indexes/classes.txt'
    if not os.path.isdir(os.path.dirname(fname)):
        os.mkdir(os.path.dirname(fname))

    cocoa_frameworks = ('Foundation', 'AppKit', 'AddressBook', 'CoreData',
                        'PreferencePanes', 'QTKit', 'ScreenSaver',
                        'SyncServices', 'WebKit')
    iphone_frameworks = ('UIKit', 'GameKit')
    iphone_sdk_path = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk'
    headers_and_frameworks = find_headers('', cocoa_frameworks).items() + \
                             find_headers(iphone_sdk_path, iphone_frameworks).items()

    superclasses = get_superclasses(get_classes(headers_and_frameworks))
    write_file(fname, superclasses)
Exemplo n.º 6
0
def output_file(fname=None):
    '''Output text file of Cocoa classes to given filename.'''
    if fname is None:
        fname = './cocoa_indexes/classes.txt'
    if not os.path.isdir(os.path.dirname(fname)):
        os.mkdir(os.path.dirname(fname))

    cocoa_frameworks = ('Foundation', 'AppKit', 'AddressBook', 'CoreData',
                        'PreferencePanes', 'QTKit', 'ScreenSaver',
                        'SyncServices', 'WebKit')
    iphone_frameworks = ('UIKit', 'GameKit')
    iphone_sdk_path = '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk'
    headers_and_frameworks = find_headers('', cocoa_frameworks).items() + \
                             find_headers(iphone_sdk_path, iphone_frameworks).items()

    superclasses = get_superclasses(get_classes(headers_and_frameworks))
    write_file(fname, superclasses)
Exemplo n.º 7
0
def output_file(fname=None):
    """Writes syntax entries to file or prints them if no file is given."""
    if fname:
        cocoa_definitions.write_file(fname, generate_syntax_file())
    else:
        print "\n".join(generate_syntax_file())
Exemplo n.º 8
0
def output_file(fname=None):
    '''Writes syntax entries to file or prints them if no file is given.'''
    if fname:
        cocoa_definitions.write_file(fname, generate_syntax_file())
    else:
        print "\n".join(generate_syntax_file())