nextcloud / nextcloud/user_usage_report

CSV output: consolidate the header with the fields provided by the JSON output

Open
#201 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
45
Forks
12
Avg merge
13h 25m
Merged PRs (30d)
19

Description

Run the following command and observe the output:

# occ usage-report:generate --verbose | head -1
"user-id","date as 'c'","assigned quota (5 GB)","used quota (500 MB)",number of files,number of shares,number of uploads,number of downloads

The header of the CSV file contains spaces and other characters ( (, ), ') that should be in general be avoided as they make it trickier to parse and process the data by a program.

In addition it is not clear why the values 5 GB and 500 MB are there.

My proposal is to name the fields in the header of the CSV output as the fields of the JSON output

  • user_id
  • date
  • quota
  • used
  • files
  • shares
  • uploads
  • downloads

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the occ usage-report:generate command and inspect how its CSV header is assembled alongside the JSON fields. Run the command shown in the issue, then verify that the CSV header uses user_id, date, quota, used, files, shares, uploads, and downloads without the descriptive units.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.