-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
bunny
committed
Oct 20, 2023
1 parent
a8bc40a
commit 094c2ba
Showing
4 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
dist/WeTransferTool-0.3.tar.gz | ||
dist/WeTransferTool-0.4.tar.gz | ||
WeTransferTool.egg-info/dependency_links.txt | ||
WeTransferTool.egg-info/PKG-INFO | ||
WeTransferTool.egg-info/requires.txt | ||
WeTransferTool.egg-info/SOURCES.txt | ||
WeTransferTool.egg-info/top_level.txt | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import argparse | ||
from WeTransferTool import We | ||
import json | ||
|
||
def main_func(): | ||
parser = argparse.ArgumentParser() | ||
wet = We() | ||
|
||
parser.add_argument('-dl', help="Wetransfer file URL", type=str) | ||
parser.add_argument('-ul', help="File/Folder path", type=str) | ||
parser.add_argument('-mw', help="Maximum number of workers (parallel downloads)", type=int, default=10) | ||
args = parser.parse_args() | ||
dl = args.dl | ||
ul = args.ul | ||
mw = args.mw | ||
if not dl and not ul: | ||
print("Need atleast one argument. Try wetransfertool -h") | ||
if ul: | ||
print(json.dumps(wet.upload(path=ul, max_workers=mw), indent=4)) | ||
if dl: | ||
wet.download(dl) | ||
|
||
# if __name__=="__main__": | ||
# main_func() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters