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

Feature Request: Add cmdline parameter to display (human readable) quoa status #2359

Closed
pkolmann opened this issue Mar 29, 2023 · 9 comments
Closed
Labels
Feature Request Feature Request | Enhancement Request Implemented
Milestone

Comments

@pkolmann
Copy link

pkolmann commented Mar 29, 2023

Is your feature request related to a problem? Please describe.

In the /v1.0/me/drive API reply is the current usage of the onedrive returned:

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives/$entity",
  {...},
  "quota": {
    "deleted": 123,
    "remaining": 123456789,
    "state": "normal",
    "total": 1234567890,
    "used": 1234567
  }
}

Would it be possible to have this info as output to a new cmdline parameter (--quota?)

Thanks

Describe the solution you'd like

Display the current returned quota data to use terminal.

Describe alternatives you've considered

Please close this request if you think that this is not possible / interesting...

Additional context

No response

@pkolmann pkolmann added the Feature Request Feature Request | Enhancement Request label Mar 29, 2023
Repository owner locked and limited conversation to collaborators Apr 5, 2023
@abraunegg abraunegg added this to the v2.5.x milestone Apr 13, 2023
@abraunegg abraunegg modified the milestones: v2.5.x, v2.5.0 Oct 19, 2023
@abraunegg
Copy link
Owner

@pkolmann
This feature as been implemented in PR #2520 and is available in v2.5.0-alpha-3 GitHub version: v2.4.25-21-g77c294b or above.

For details on this PR, please refer to #2521

./onedrive --display-quota 

Reading configuration file: /home/alex/.config/onedrive/config
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
Sync Engine Initialised with new Onedrive API instance
Microsoft OneDrive quota information as reported for this Drive ID: b!knrQ8K6YIkqi-IrggfGWyi6Bu-HVzjxMpA7qvZX7Gy6-dlZIIb6fSo7k4cc0dlrV

Deleted:   8793627814
Remaining: 27467060613175
State:     normal
Total:     27487790694400
Used:      11936453411

The numeric values above are expressed in bytes

@abraunegg abraunegg linked a pull request Oct 19, 2023 that will close this issue
Repository owner unlocked this conversation Oct 22, 2023
@pkolmann
Copy link
Author

thanks. Looks very good. If easily possible, a human readable form would be nice, but works for now!

thanks :-)

@abraunegg
Copy link
Owner

Can you give an example of what a human readable form would look like from your perspective ?

@pkolmann
Copy link
Author

Deleted: 8.19 GB (8793627814 bytes)
Remaining: 24.98 TB (27467060613175 bytes)
State: normal
Total: 25.00 TB (27487790694400 bytes)
Used: 11.12 GB (11936453411 bytes)

@pkolmann
Copy link
Author

Maybe even space out the long numbers with dots, like

Deleted: 8.19 GB (8.793.627.814 bytes)
Remaining: 24.98 TB (27.467.060.613.175 bytes)
State: normal
Total: 25.00 TB (27.487.790.694.400 bytes)
Used: 11.12 GB (11.936.453.411 bytes)

abraunegg added a commit that referenced this issue Oct 26, 2023
Update --display-quota output to:

Deleted:   8.19 GB (8793627814 bytes)
Remaining: 25580.69 GB (27467060611614 bytes)
State:     normal
Total:     25600.00 GB (27487790694400 bytes)
Used:      11.12 GB (11936454972 bytes)
@abraunegg
Copy link
Owner

@pkolmann
Please can you rebuild PR #2520 so that you are testing v2.5.0-alpha-3 GitHub version: v2.4.25-33-g16595ef

The updated application output is now:

Deleted:   8.19 GB (8793627814 bytes)
Remaining: 25580.69 GB (27467060611614 bytes)
State:     normal
Total:     25600.00 GB (27487790694400 bytes)
Used:      11.12 GB (11936454972 bytes)

@pkolmann
Copy link
Author

@abraunegg perfect, looks great to me.

Thanks for your work!
Greetings from Austria ;-)

@abraunegg
Copy link
Owner

@pkolmann
Thanks for the feedback - will close this FR given this is bedded down in v2.5.0 alpha codebase.

@abraunegg
Copy link
Owner

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

Repository owner locked as resolved and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request Feature Request | Enhancement Request Implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants