export_sbj: Export a ScrapeBot JSON recipe file ('.sbj')

Description Usage Arguments Value See Also Examples

View source: R/export_sbj.R

Description

Given a recipe (UID), this function exports the recipe's SBJ representation.

Usage

1
export_sbj(connection, recipe_uid, sbj_file = NULL)

Arguments

connection

A connection object, as retrieved from connect_scrapebot().

recipe_uid

The recipe's UID, for which the SBJ should be exported.

sbj_file

If set to a file path, the SBJ file is directly written to this path. Otherwise (or NULL), character-string representation is returned.

Value

If sbj_file is set to a valid file path, this path is returned after a successful write. Otherwise, the SBJ raw text is returned.

See Also

import_sbj()

Examples

1
2
3
4
5
6
7
8
## Not run: 

connection <- connect('my_db on localhost')
export_sbj(connection, 42)
export_sbj(connection, 42, 'my_recipe.sbj')
disconnect(connection)

## End(Not run)

MarHai/ScrapeBotR documentation built on March 10, 2021, 10:10 a.m.