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

Added simple help description to the client CLI #1412

Closed

Conversation

JohannesNicholas
Copy link
Contributor

Hi,
This is my first pull request to this project.
Feel free to provide feedback or recommendations.

The following changes change the output help output of the command line.

Running python filesender.py --help currently will output:

usage: filesender.py [-h] [-v] [-i] [-p] [-s SUBJECT] [-m MESSAGE] [-g] [--threads THREADS] [--timeout TIMEOUT] [--retries RETRIES] -u USERNAME -a APIKEY -r RECIPIENTS files [files ...]

positional arguments:
  files                 path to file(s) to send

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose
  -i, --insecure
  -p, --progress
  -s SUBJECT, --subject SUBJECT
  -m MESSAGE, --message MESSAGE
  -g, --guest
  --threads THREADS
  --timeout TIMEOUT
  --retries RETRIES

required named arguments:
  -u USERNAME, --username USERNAME
  -a APIKEY, --apikey APIKEY
  -r RECIPIENTS, --recipients RECIPIENTS

With these changes, it outputs:

usage: filesender.py [-h] [-v] [-i] [-p] [-s SUBJECT] [-m MESSAGE] [-g] [--threads THREADS] [--timeout TIMEOUT] [--retries RETRIES] -u USERNAME -a APIKEY -r RECIPIENTS files [files ...]

File Sender CLI client.
Source code: https://github.com/filesender/filesender/blob/master/scripts/client/filesender.py

positional arguments:
 files                 path to file(s) to send

optional arguments:
 -h, --help            show this help message and exit
 -v, --verbose
 -i, --insecure
 -p, --progress
 -s SUBJECT, --subject SUBJECT
 -m MESSAGE, --message MESSAGE
 -g, --guest
 --threads THREADS
 --timeout TIMEOUT
 --retries RETRIES

required named arguments:
 files                 path to file(s) to send

optional arguments:
 -h, --help            show this help message and exit
 -v, --verbose
 -i, --insecure
 -p, --progress
 -s SUBJECT, --subject SUBJECT
 -m MESSAGE, --message MESSAGE
 -g, --guest
 --threads THREADS
 --timeout TIMEOUT
 --retries RETRIES

required named arguments:
 -u USERNAME, --username USERNAME
 -a APIKEY, --apikey APIKEY
 -r RECIPIENTS, --recipients RECIPIENTS

A config file can be added to C:\Users\Joey/.filesender/filesender.py.ini to avoid having to specify username and apikey on the command line.

Example (Config file is present):
python filesender.py -r reciever@example.com file1.txt

@github-actions
Copy link

If there are selenium UI results for this code they will be at filesenderuici@2addac6

@github-actions
Copy link

If there are selenium UI results for this code they will be at filesenderuici@bce7d09

@github-actions
Copy link

If there are selenium UI results for this code they will be at filesenderuici@0e0d0eb

@github-actions
Copy link

If there are selenium UI results for this code they will be at filesenderuici@d1307f0

@madsi1m
Copy link
Contributor

madsi1m commented Mar 26, 2023

Hi @JohannesNicholas,

You probably dont want to hard code the following as filesender exists on many other urls/institutes.

let base_url = 'https://cloudstor.aarnet.edu.au/sender'

Look at how this works https://github.com/filesender/filesender/blob/development/www/clidownload.php that fills in site specific values

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

Successfully merging this pull request may close these issues.

None yet

2 participants