-
Notifications
You must be signed in to change notification settings - Fork 22
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
Data transfer to user provided FTP #3
Data transfer to user provided FTP #3
Conversation
password: xxxx | ||
project: xxxx | ||
uppmaxid: xxxx""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format is not preserved in the help
output i.e. I expect it to print as such but it collapses the yaml
format and prints as one line. Any suggestions ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.python.org/2/library/argparse.html#formatter-class
Passing
RawDescriptionHelpFormatter
asformatter_class=
indicates that description and epilog are already correctly formatted and should not be line-wrapped:
formatter_class=argparse.RawDescriptionHelpFormatter,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or you can use the syntax that @mariogiov discovered:
config_file_format = ("Input config file should be in following format, especially the key/header "
"names should be same as in the example, else the list 'config_keys' in "
"source code should be changed to match the key names as in config file"
"[ftp]"
"domain: xxxx"
"port: xxxx"
"username: xxxx"
"password: xxxx"
"project: xxxx"
"uppmaxid: xxxx")
Is not that nice, just that you know it exists, but better use @ewels ' syggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!!! Thank you guys 😃 👍
Will fix it.
Cool - did that work then? |
Yup!! It was super nice, but just a heads up So for this context I moved the config format to description text. Now it looks neat. |
Great! |
Oh - @guillermo-carrasco : I don't have write access to this repo.. |
Data transfer to user provided FTP
Sometimes user outside sweden have problem with accessing data in UPPMAX, so they ask to upload the data in a FTP server which they setup. This is a standalone script which can be run and it uploads the data preserving the tree structure.
Though its not more often, it might come handy when the occasion comes and save lot of time in writing a script again.