The goal of rweekly.highlights is to create the Weekly Highlights Poll Slack Text for R Weekly editors.
This version represents a significant refactoring of the application:
- golem framework: The app now uses the golem framework for production-grade Shiny applications
- bslib UI: Modern UI components using bslib instead of shinythemes
- Split output: Poll text is now split into two sections (5 items each) for easier management
- Modular structure: Code is organized into modules and functions following golem best practices
You can install rweekly.highlights from GitHub with:
devtools::install_github("rweekly/rweekly.highlights",
dependencies = TRUE)The app started by run_app() lets you pick up to 10 links from the current R Weekly draft to be voted upon by R Weekly editors.
library(rweekly.highlights)
run_app()The draft is fetched from:
- A local
draft.mdfile in your working directory (if present), or - The remote draft from the R Weekly GitHub repository
- Checkbox interface: Select up to 10 highlights from the current draft
- Validation notifications: Visual feedback when you have selected less than, exactly, or more than 10 items
- Duplicate detection: Automatically checks for duplicate links when running from a local draft
- Split output: The 10 selected items are split into two Slack poll commands:
- Section 1: First 5 items
- Section 2: Second 5 items
When running from the rweekly.org repository (with _posts directory present), the app can check for duplicate links across recent issues:
# Run with duplicate checking (only works in rweekly.org repository)
run_app(check_dups = TRUE)
# Run without duplicate checking (default for development)
run_app(check_dups = FALSE)Note: Duplicate checking requires:
- A local
draft.mdfile in your working directory - The
_postsdirectory from the rweekly.org repository - Running the app from the rweekly.org repository root
In development mode (package directory), duplicate checking is automatically skipped even if check_dups = TRUE.
This package uses Nix for reproducible environments. The default.nix file contains all required R packages and system dependencies.
When you select 10 highlights, the app generates two Slack poll commands:
Section 1 (First 5 items):
/poll "Which of the following items in R Weekly 2026-W06 should be highlighted? (Part 1)"
"Item 1 Title
URL 1" "Item 2 Title
URL 2" ... (5 items total)
Section 2 (Second 5 items):
/poll "Which of the following items in R Weekly 2026-W06 should be highlighted? (Part 2)"
"Item 6 Title
URL 6" "Item 7 Title
URL 7" ... (5 items total)
Copy and paste each section into the '#highlights' Slack channel.
The application follows golem's modular structure:
R/app_ui.R- Main UI using bslib componentsR/app_server.R- Main server logicR/mod_highlights.R- Highlights selection moduleR/fct_parse_draft.R- Draft parsing functionsR/fct_slack_format.R- Slack poll formatting functionsR/dup.R- Duplicate link detection utilitiesinst/golem-config.yml- Application configuration
Contributions are welcome! Please feel free to submit a Pull Request.
MIT + file LICENSE