Giter Site home page Giter Site logo

megatools's Introduction

Megatools (1.10.3)

PyPI version Codacy Badge Maintainability

(UNDER CONSTRUCTION)

Simple python Megatools wrapper

Megatools Megatools (github)

Installation

pip install megatools

Usage

Initialization

from megatools import Megatools

megatools = Megatools() # Use megatools command in path

# OR

megatools = Megatools(executable="D:\\megatools\\megatools.exe")

Get mega link filename

filename = megatools.get_filename("https://mega.nz/#!PpVB0CTZ!bwa51HbeKaVjuCff_lzbH4nQnV27uBxmcF89PnnACvY")

# boot_T295XXU2ASJ1.img.tar

dl - download exported files from mega.nz

# Basic usage

megatools.dl("https://mega.nz/#!PpVB0CTZ!bwa51HbeKaVjuCff_lzbH4nQnV27uBxmcF89PnnACvY")

# With all optional arguments and their default values

megatools.dl("https://mega.nz/#!PpVB0CTZ!bwa51HbeKaVjuCff_lzbH4nQnV27uBxmcF89PnnACvY",
  path=None,
  no_progress=False,
  print_names=False,
  disable_resume=False,
  username=None,
  password=None,
  reload=False,
  limit_speed=0,
  proxy=None,
  netif=None,
  ip_proto=None,
  config=None,
  ignore_config_file=False,
  display_output=False,
  debug=None,
  version=None)

For more informations, please see megatools dl command

megatools dl --help

ls - list files stored at mega.nz

# Basic usage

files = megatools.dl("[email protected]", "mysuperpassword")

# /Root
# /Root/document.txt
# /Root/movie.mp4
# /Root/test
# /Root/test/document.txt
# /Root/test/movie.mp4
# /Trash

# Specified folder

files = megatools.dl("[email protected]", "mysuperpassword", folder="/Root/test")

# /Root/test
# /Root/test/document.txt
# /Root/test/movie.mp4

# With all optional arguments and their default values

files = megatools.ls(
    "[email protected]",
    "mysuperpassword",
    folder="",
    names=False,
    recursive=False,
    long=False,
    header=False,
    human=False,
    print0=False,
    export=False,
    limit_speed=0,
    proxy=None,
    netif=None,
    ip_proto=None,
    config=None,
    ignore_config_file=False,
    debug=None,
    version=False,
)

For more informations, please see megatools ls command

megatools ls --help

Another commands incomming

TODO

  • Better get_filename algo, especially about error/returncode

megatools's People

Contributors

harkame avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.