Pulls dev.to analytics from the Forem API for a given organization.
Each fetch writes two CSVs under data/YYYY-MM-DD/:
{org}-analytics-{date}.csv— lifetime readers, reactions and comments per article.{org}-window-{date}.csv— the same articles, but counting only activity in the last 7 calendar days, plus read time and follows.
The window is whole UTC days ending on the current date, so it doesn't shift with
the time of day a run happens. Use --days N for a different span, or
--skip-window to write only the lifetime CSV. See docs/USAGE.md.
- Ruby 3.4+
- Bundler
This project requires Ruby 3.4 or higher. If you have multiple Ruby versions installed, use the provided wrapper scripts to ensure the correct version is used:
PowerShell:
.\run.ps1 <command> [options]CMD:
run.bat <command> [options]The wrapper scripts will automatically use Ruby 3.4 (either via uru if installed, or by modifying the PATH).
Alternatively, if you have a Ruby version manager like uru, you can manually switch to Ruby 3.4:
uru 3.4- Copy
.env.exampleto.envand configure your settings - Install dependencies:
bundle install - Run commands using the wrapper scripts (see Usage below)
For detailed usage instructions, see docs/USAGE.md.