Package 'ppwicker'

Title: Functions to interact with piecepack wiki
Description: Functions to interact with piecepack wiki <https://ludism.org/ppwiki/>. Can download piecepack game metadata and update the Games wiki page.
Authors: Trevor L Davis [aut, cre] , Alex Schroeder [aut] (Uses `wikiput.pl`)
Maintainer: Trevor L Davis <[email protected]>
License: GPL-3
Version: 0.1.2
Built: 2024-11-03 05:06:02 UTC
Source: https://github.com/piecepackr/ppwicker

Help Index


Build candidate replacement for Games wiki page

Description

build_games() builds a candidate replacement for Games piecepack wiki page

Usage

build_games(update = FALSE)

Arguments

update

If already downloaded previously, should we download again?

Value

A character vector with the text for the candidate replacement for Games wiki page. As a side effect also saves to file.path(tools::R_user_dir("ppwicker", "cache"), "games.creole").


Download piecepack wiki game metadata

Description

download_game_metadata() downloads piecepack wiki game metadata.

Usage

download_game_metadata(update = FALSE, games = NULL)

Arguments

update

If already downloaded previously, should we download again?

games

Which games to download metadata for. If NULL (the default) download all of them.

Value

Returns a (tibble) data frame of piecepack wiki game metadata. If no previous download or update = TRUE as a side effect we download piecepack wiki game metadata to tools::R_user_dir("ppwicker", "cache").


Update Games wiki page(s)

Description

update_games() updates piecepack wiki Games page(s) using wikiput.pl.

Usage

update_games(
  update = FALSE,
  minor = FALSE,
  summary = "Update Games page",
  username = getOption("ppwicker_username"),
  password = getOption("ppwicker_password"),
  games = NULL
)

Arguments

update

If already downloaded previously, should we download again?

minor

Is this a ‘minor’ wiki edit?

summary

Summary for wiki edit

username

Piecepack wiki username

password

Piecepack wiki password

games

If NULL (default) we update the "Games" wiki page. Otherwise we update the wiki page for each game in games using the wiki markup in the txt subdirectory of tools::R_user_dir("ppwicker", "cache"). Name needs to be the same as the wiki article URL.

Details

You may need a wiki admin password to use this function, any attempt at using this function with a NULL password failed.