transferwee icon indicating copy to clipboard operation
transferwee copied to clipboard

Basic installation help?

Open noisyneil opened this issue 2 years ago • 2 comments

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.

noisyneil avatar Jun 06 '23 19:06 noisyneil

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 avatar Jun 06 '23 19:06 iamleot

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!

noisyneil avatar Jun 06 '23 23:06 noisyneil