Skip to content

rweekly/rweekly.highlights

Repository files navigation

rweekly.highlights

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

The goal of rweekly.highlights is to create the Weekly Highlights Poll Slack Text for R Weekly editors.

Version 0.1.0 - Major Update

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

Installation

You can install rweekly.highlights from GitHub with:

devtools::install_github("rweekly/rweekly.highlights",
                         dependencies = TRUE)

Usage

Basic Usage

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:

  1. A local draft.md file in your working directory (if present), or
  2. The remote draft from the R Weekly GitHub repository

Features

  • 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

Duplicate Checking

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.md file in your working directory
  • The _posts directory 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.

Development Environment

This package uses Nix for reproducible environments. The default.nix file contains all required R packages and system dependencies.

Output Format

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.

Architecture

The application follows golem's modular structure:

  • R/app_ui.R - Main UI using bslib components
  • R/app_server.R - Main server logic
  • R/mod_highlights.R - Highlights selection module
  • R/fct_parse_draft.R - Draft parsing functions
  • R/fct_slack_format.R - Slack poll formatting functions
  • R/dup.R - Duplicate link detection utilities
  • inst/golem-config.yml - Application configuration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT + file LICENSE

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors