legacy_datatxt: Remote "data.txt" board (legacy API)

Description Usage Arguments Examples

View source: R/legacy_datatxt.R

Description

Use board that for a website that uses the data.txt specification. A data.txt file is a YAML that provides some basic metadata about a directory of files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
legacy_datatxt(
  url,
  headers = NULL,
  cache = board_cache_path(name),
  needs_index = TRUE,
  browse_url = url,
  index_updated = NULL,
  index_randomize = FALSE,
  path = NULL,
  versions = FALSE,
  name = NULL,
  ...
)

board_register_datatxt(
  url,
  name = NULL,
  headers = NULL,
  cache = board_cache_path(name),
  ...
)

Arguments

url

Path to the data.txt file or directory containing it.

headers

Optional list of headers to include or a function to generate them.

cache

Cache path. Every board requires a local cache to avoid downloading files multiple times. The default stores in a standard cache location for your operating system, but you can override if needed.

needs_index

Does this board have an index file?

browse_url

Not currently used

index_updated

Callback function used to update index

index_randomize

When retrieving data.txt at a parameter with random query string to defeat caching?

path

Subdirectory within url

versions

Should this board be registered with support for versions?

name

An optional name used identify the board. This is no longer generally needed since you should be passing around an explicit board object.

...

Additional parameters required to initialize a particular board.

Examples

1
2
3
4
5
6
7
8
9
# register website board using datatxt file
board_register_datatxt(
  url = "https://datatxt.org/data.txt",
  name = "txtexample",
  cache = tempfile()
)

# find pins
pin_find(board = "txtexample")

pins documentation built on Oct. 2, 2021, 5:06 p.m.