Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic installation help? #52

Open
noisyneil opened this issue Jun 6, 2023 · 2 comments
Open

Basic installation help? #52

noisyneil opened this issue Jun 6, 2023 · 2 comments
Assignees

Comments

@noisyneil
Copy link

Can anyone advise on how to install this? I'm a python/github noob.

I've run the following:

python -m pip install requests
git clone https://github.com/iamleot/transferwee.git
cd transferwee
transferwee upload file /Users/noisyneil/Desktop/Test.txt

...and got zsh: command not found: transferwee.

Any help appreciated.

@iamleot
Copy link
Owner

iamleot commented Jun 6, 2023

Hello!
That's good and yeah, if you have requests installed (that apart Python 3.x is the only dependency!, but hopefully it should after that python -m pip install requests!) this should be fine!

I usually have it just under ~/bin or similar.

You can try to do:

./transferwee.py upload /Users/noisyneil/Desktop/Test.txt

...and it should work.

If you would like to call it via just transferwee you need to rename it from transferwee.py to transferwee and put it some directory under your PATH.

You can see your $PATH via:

echo $PATH

...and it is a comma-separated list of several directories that are used to pick up binary/scripts so you can just calls them without any prefix, for example here I have:

$ echo $PATH
/home/leot/bin:/home/leot/localbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R7/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/games

So I could just:

mv transferwee.py /home/leot/bin/transferwee

and I can just type transferwee.

(Probably you will have something similar under your home directory that should be /Users/noisyneil.)

Hope this help!

@iamleot iamleot self-assigned this Jun 6, 2023
@noisyneil
Copy link
Author

noisyneil commented Jun 6, 2023

Thanks so much for such a detailed and thoughtful response! 🙏🏼

This is looking promising, as it seemed to do something. It did fail though. Any idea what this data error might mean?

(base) noisyneil@Neils-MacBook-Pro ~ % cd transferwee
(base) noisyneil@Neils-MacBook-Pro transferwee % ./transferwee.py upload /Users/noisyneil/Desktop/Test.txt
Traceback (most recent call last):
  File "/Users/noisyneil/transferwee/./transferwee.py", line 650, in <module>
    print(upload(args.files, args.n, args.m, args.f, args.t))
  File "/Users/noisyneil/transferwee/./transferwee.py", line 554, in upload
    for f, b in zip(files, blocks["data"]["blocks"]):
KeyError: 'data'

Regarding calling it with a simpler command: I don't mind what the command is, as I'll be automating it via Keyboard Maestro. With that in mind, what happens when the transfer is complete? Is the download link added to the system clipboard?

Thanks again!

iamleot added a commit that referenced this issue Jun 8, 2023
The authorization token is actually a JWT and in its payload there are
all the WETRANSFER_STORM_* URLs that we should use and - hopefully -
with the right region.

Possible fix for GitHub issue #50 and #52.
iamleot added a commit that referenced this issue Jun 8, 2023
The authorization token is actually a JWT and in its payload there are
all the WETRANSFER_STORM_* URLs that we should use and - hopefully -
with the right region.

Possible fix for GitHub issue #50 and #52.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants