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

send bundle always requires a file yet CLI indicate it does not #2

Open
gedw99 opened this issue Jul 12, 2022 · 7 comments
Open

send bundle always requires a file yet CLI indicate it does not #2

gedw99 opened this issue Jul 12, 2022 · 7 comments

Comments

@gedw99
Copy link

gedw99 commented Jul 12, 2022

cd ./01 && /Users/apple/workspace/go/bin/nasefa send -bundleName b01
❌ Usage error: must provide at least one file

make: *** [01-send] Error 2

with a file it works

make 01-send
cd ./01 && /Users/apple/workspace/go/bin/nasefa send -bundleName b01 ./../text-01.txt
ℹ️ Created file bundle 'b01'
ℹ️ Uploading file 1/1: ./../text-01.txt
✅ Done

Yet the CLI seems to be saying that no file is needed:

nasefa send -h
send [options] <file> ... 
  -bundleName string
        Unique ID for this file bundle, used for download (randomly generated if not provided)
  -expire duration
        Automatically delete this file bundle after a certain amount of time
  -to value
        Tag name for recipients in auto-download (can be repeated)
@HeCorr
Copy link

HeCorr commented Jul 12, 2022

-bundleName is part of the [options] and if you look at the output you provided, it clearly says send [options] <file>.

<file> indicates that you must provide a file.

@gedw99
Copy link
Author

gedw99 commented Jul 13, 2022

Yes i see your point thanks... I did not quite explain myself it seems...

There is an "add" command and so a user can add many files to a bundle, and and then just send what they added.
In which can you want to sent without adding a file.

To me the APi command structure is more precise because you add as many as you want and then you send.

You dont caught cause in uncanny valley having to remember to only add 2 files and then add your last file with a send. This makes it harder to build build higher level tooling on top IMHO.

@mprimi
Copy link
Owner

mprimi commented Jul 13, 2022

Thank you for the comments @gedw99 & @HeCorr

The current interface is indeed a little clunky.

  • send creates the bundle, adds file, then notifies any receivers in auto-receive mode
  • add just adds, create just creates, neither of them notifies receivers

At the moment, there's no way to create, add and then finally "send" (i.e. notify).
To do what you mention, I could add a send-existing or similar, that just notifies of a bundle created with create+add

@HeCorr
Copy link

HeCorr commented May 19, 2023

To do what you mention, I could add a send-existing or similar

why not modify the send behavior to send existing files from the bundle if no file path has been supplied?
i.e., make the <file> argument optional and if it's not specified, check and send the whole bundle if it exists. if not, print usage info.

maybe also a flag to make the behavior explicit: nasefa send -bundle (which would ignore the <file> arg).

I think that would be a more user-friendly implementation than adding an extra command.

@mprimi
Copy link
Owner

mprimi commented May 19, 2023

I like your proposal.

However as you might have noticed, this project is not currently actively worked on. I would love to get back to it, but realistically I don't think it's going to happen in the next few months.

@gedw99
Copy link
Author

gedw99 commented May 19, 2023

Thanks fair enough. We all have other things going on .

i am happy to refactor it to work with a gui and cli if anyone is interested ?

@HeCorr
Copy link

HeCorr commented Jun 22, 2023

I would love to get back to it, but realistically I don't think it's going to happen in the next few months.

That's totally understandable. I too would contribute if I wasn't busy myself.

i am happy to refactor it to work with a gui and cli if anyone is interested ?

I don't currently use this tool but why not? :) go ahead and have fun

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

3 participants