Skip to content

Allow exporting visits in CSV format#2562

Merged
acelaya merged 4 commits intoshlinkio:developfrom
acelaya-forks:visits-export
Dec 29, 2025
Merged

Allow exporting visits in CSV format#2562
acelaya merged 4 commits intoshlinkio:developfrom
acelaya-forks:visits-export

Conversation

@acelaya
Copy link
Member

@acelaya acelaya commented Dec 29, 2025

Part of #2311

This PR enhances all visits commands (short-url:visits, tag:visits, domain:visits, visit:orphan and visit:non-orphan) so that the output can be human-friendly (default behavior) or CSV, via --format=csv.

Additionally, a new --format=paginated option has been added, which behaves similar to current format, but the visits are rendered in 1000-item chunks, with the header printed before every chunk, and the table sized differently if needed.

Both csv and paginated formats can avoid out-of-memory errors if the list of visits is too big.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (6eb9419) to head (248e803).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2562      +/-   ##
=============================================
+ Coverage      94.60%   94.62%   +0.02%     
- Complexity      1637     1644       +7     
=============================================
  Files            273      273              
  Lines           5093     5117      +24     
=============================================
+ Hits            4818     4842      +24     
  Misses           275      275              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@acelaya acelaya merged commit 0d964f0 into shlinkio:develop Dec 29, 2025
21 checks passed
@acelaya acelaya deleted the visits-export branch December 29, 2025 10:07
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.

1 participant