Beispiel #1
0
def main():
    print 'Logging in'
    details=c.logmein()
    email = details[0]
    password = details[1]
    
    mega = Mega({'verbose': True})
    m = mega.login(email, password)    
    
    os.chdir("./multiple_upload")
    files = [x for x in os.listdir('.')]
    print 'Found: '
    files.sort()
    print files
    
    realfiles = rename(files)
    print realfiles
    seed = sys.argv[1]

    rars = rarme(realfiles,seed)

    links = upload(realfiles,rars,m)
    
    write_to_file(realfiles,rars,links)
    print 'Done'
Beispiel #2
0
def main():
    print "Logging in"
    details = c.logmein()
    email = details[0]
    password = details[1]

    mega = Mega({"verbose": True})
    m = mega.login(email, password)

    os.chdir("./big_upload")
    files = [x for x in os.listdir(".")]
    print "Found: "
    files.sort()
    print files

    #    realfiles = rename(files)
    #    print realfiles
    seed = sys.argv[1]

    #    rars = rarme(realfiles,seed)

    links = upload(files, m)

    write_to_file(files, links)
    print "Done"
Beispiel #3
0
def download_single(email,password,url):
    #Make new mega
    mega = Mega({'verbose': True})
    m = mega.login(email, password)
    print 'Downloading... '
    print url
    m.download_url(url)
Beispiel #4
0
def upload_single(filename):
    #Account info
    details=c.logmein()
    email = details[0]
    password = details[1]
    
    #Make new mega
    
    mega = Mega()
    m = mega.login(email, password)
    print 'Uploading: ' + filename
    uploaded = m.upload(filename)
    print 'Uploaded, public link: '
    print m.get_upload_link(uploaded)
Beispiel #5
0
    # Thumbnails for item list
    FILE_ICON = os.path.join(plugintools.get_runtime_path(), 'resources',
                             'images', 'file.png')
    FOLDER_ICON = os.path.join(plugintools.get_runtime_path(), 'resources',
                               'images', 'folder.png')
    IMAGE_ICON = os.path.join(plugintools.get_runtime_path(), 'resources',
                              'images', 'image.png')
    MUSIC_ICON = os.path.join(plugintools.get_runtime_path(), 'resources',
                              'images', 'music.png')
    VIDEO_ICON = os.path.join(plugintools.get_runtime_path(), 'resources',
                              'images', 'video.png')
    DOWNLOAD_PATH = os.path.join(plugintools.get_data_path(), "downloads")

    plugintools.log("mega.init Creating...")
    mega = Mega()

    maindialog.update(50, "Connecting...")
    plugintools.log("mega.init Login...")
    USERNAME = plugintools.get_setting("username")
    PASSWORD = plugintools.get_setting("password")
    #plugintools.log("mega.init USERNAME="******"mega.init PASSWORD="******"":
            plugintools.open_settings_dialog()
Beispiel #6
0
        lines = traceback.format_exception(exc_type, exc_value, exc_tb)
        for line in lines:
            line_splits = line.split("\n")
            for line_split in line_splits:
                plugintools.log(line_split)

    # Thumbnails for item list
    FILE_ICON = os.path.join( plugintools.get_runtime_path(), 'resources' , 'images' , 'file.png' )
    FOLDER_ICON = os.path.join( plugintools.get_runtime_path(), 'resources' , 'images' , 'folder.png' )
    IMAGE_ICON = os.path.join( plugintools.get_runtime_path(), 'resources' , 'images' , 'image.png' )
    MUSIC_ICON = os.path.join( plugintools.get_runtime_path(), 'resources' , 'images' , 'music.png' )
    VIDEO_ICON = os.path.join( plugintools.get_runtime_path(), 'resources' , 'images' , 'video.png' )
    DOWNLOAD_PATH = os.path.join( plugintools.get_data_path() ,"downloads")

    plugintools.log("mega.init Creating...")
    mega = Mega()

    maindialog.update(50,"Connecting...")
    plugintools.log("mega.init Login...")
    USERNAME = plugintools.get_setting("username")
    PASSWORD = plugintools.get_setting("password")
    #plugintools.log("mega.init USERNAME="******"mega.init PASSWORD="******"":
            plugintools.open_settings_dialog()