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

better help output formatting (Issue #298) #320

Merged
merged 3 commits into from
Dec 28, 2018
Merged

Conversation

norbusan
Copy link
Collaborator

Instead of the rejected docopt help formatting, here is a version that still uses getopt but not the default option formatter. Output of -h is as follows:

$ ./onedrive -h
OneDrive - a client for OneDrive Cloud Services

Usage:
  onedrive [options] --synchronize
      Do a one time synchronization
  onedrive [options] --monitor
      Monitor filesystem and sync regularly
  onedrive [options] --display-config
      Display the currently used configuration
  onedrive [options] --display-sync-status
      Query OneDrive service and report on pending changes
  onedrive -h | --help
      Show this help screen
  onedrive --version
      Show version

Options:

  --check-for-nomount
      Check for the presence of .nosync in the syncdir root. If found, do not perform sync.
  --confdir ARG
      Set the directory used to store the configuration files
  --create-directory ARG
      Create a directory on OneDrive - no sync will be performed.
  --destination-directory ARG
      Destination directory for renamed or move on OneDrive - no sync will be performed.
  --debug-https
      Debug OneDrive HTTPS communication.
  --disable-notifications
      Do not use desktop notifications in monitor mode.
  --display-config
      Display what options the client will use as currently configured - no sync will be performed.
  --display-sync-status
      Display the sync status of the client - no sync will be performed.
  -d --download-only
      Only download remote changes
  --disable-upload-validation
      Disable upload validation when uploading to OneDrive
  --enable-logging
      Enable client activity to a separate log file
  --get-O365-drive-id ARG
      Query and return the Office 365 Drive ID for a given Office 365 SharePoint Shared Library
  --local-first
      Synchronize from the local directory source first, before downloading changes from OneDrive.
  --logout
      Logout the current user
  -m --monitor
      Keep monitoring for local and remote changes
  --no-remote-delete
      Do not delete local file 'deletes' from OneDrive when using --upload-only
  --print-token
      Print the access token, useful for debugging
  --resync
      Forget the last saved state, perform a full sync
  --remove-directory ARG
      Remove a directory on OneDrive - no sync will be performed.
  --single-directory ARG
      Specify a single local directory within the OneDrive root to sync.
  --skip-symlinks
      Skip syncing of symlinks
  --source-directory ARG
      Source directory to rename or move on OneDrive - no sync will be performed.
  --syncdir ARG
      Set the directory used to sync the files that are synced
  --synchronize
      Perform a synchronization
  --upload-only
      Only upload to OneDrive, do not sync changes from OneDrive locally
  -v+ --verbose
      Print more details, useful for debugging (repeat for extra debugging)
  --version
      Print the version and exit
  -h --help
      This help information.

I had to hard-code the list of options that take arguments because this information is not available in the opts structure.

@norbusan norbusan changed the title better help output formatting better help output formatting (Issue #298) Dec 28, 2018
@bugz8unny69
Copy link

This is a massive improvement and close to what I see on the daily basis's.

@abraunegg
Copy link
Owner

Looks good. The only change I would make would be:

Set the directory used to sync the files that are synced

to

Set the local directory used to sync the files that are synced

@bugz8unny69
Copy link

How about this?

Set local sync directory used to synchronize with onedrive

@norbusan
Copy link
Collaborator Author

Set the local directory used to sync the files that are synced

Pushed a change according to that. I still don't like the double "sync", though, but not being native I don't try to come up with something better ;-)

@abraunegg
Copy link
Owner

Let me wordsmith something better

@bugz8unny69
Copy link

that are synced

This throws me off, if I was a completely 'newbie'. I would have hard time understand what that means.

@abraunegg
Copy link
Owner

What about:

Specify the local directory used for synchronization to OneDrive

@norbusan
Copy link
Collaborator Author

pushed

@norbusan norbusan merged commit b9890ae into master Dec 28, 2018
@norbusan norbusan deleted the norbert/betterHelp branch December 28, 2018 09:01
@lock
Copy link

lock bot commented Jan 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants