View source: R/highlevel_functions.R
| get_decklist_from_code | R Documentation | 
Deck lists are stored and shared in an RFC 4648 base-32 code. This top-level function takes such an code and extracts the cards and their count according to the rules (laid out here)
get_decklist_from_code(code, format = "df")
| code | character deck code in base 32 (RFC 4648) | 
| format | output format of deck list, can be either "df" or "simple" | 
dataframe with cardcode, count, faction, set and card number (for format "df") or a character vector with format '{count}:{cardcode}' (for format "simple")
get_decklist_from_code(
"CEDACAIFDUAQEBAIAECAIBICAECDGNACAMCQIBQDAMCAKDISAIAQCBBWAIAQKEZPAIAQGBIMAMAQKAIZEE"
)
# returns (format: "df")
#    cardcode count faction set card_number
# 1   01SI029     3      SI   1         029
# 2   02PZ008     3      PZ   2         008
# 3   04PZ005     3      PZ   4         005
# 4   01PZ051     3      PZ   1         051
# 5   01PZ052     3      PZ   1         052
# 6   03SI004     3      SI   3         004
# 7   03SI006     3      SI   3         006
# 8   03PZ005     3      PZ   3         005
# 9   03PZ013     3      PZ   3         013
# 10  03PZ018     3      PZ   3         018
# 11  01PZ054     2      PZ   1         054
# 12  01SI019     2      SI   1         019
# 13  01SI047     2      SI   1         047
# 14  03SI012     1      SI   3         012
# 15  01SI001     1      SI   1         001
# 16  01SI025     1      SI   1         025
# 17  01SI033     1      SI   1         033
#
# returns(format: simple)
# c("3:01SI029", "3:02PZ008", "3:04PZ005", "3:01PZ051", "3:01PZ052",
#   "3:03SI004", "3:03SI006", "3:03PZ005", "3:03PZ013", "3:03PZ018",
#   "2:01PZ054", "2:01SI019", "2:01SI047", "1:03SI012", "1:01SI001",
#   "1:01SI025", "1:01SI033")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.