class

Import::FeedConfig

Inherits Reference / Object

Configuration for a single feed

Constructors

from_any(any, feed_name : String) : self

Load from config (YAML::Any from config)

new(urls : Array(String), template : String, output_folder : String, format : String = "md", source_extension : Nil | String = nil, lang : String = "en", tags : String = "", skip_titles : Array(String) = [] of String, start_at : Nil | String = nil, fields : Hash(String, String) = {} of String => String, static : Hash(String, String) = {} of String => String, feed_format : Nil | String = nil, token : Nil | String = nil)

Instance methods

feed_format

Feed format: "json" for JSON APIs, nil for RSS/Atom

feed_format=(feed_format : String | Nil)

Feed format: "json" for JSON APIs, nil for RSS/Atom

fields

Field mappings: metadata_field -> source_field Example: {"title" => "title", "date" => "published", "content" => "body"}

fields=(fields : Hash(String, String))

Field mappings: metadata_field -> source_field Example: {"title" => "title", "date" => "published", "content" => "body"}

file_extension

Get the actual file extension to use

format
format=(format : String)
json_feed?

Check if this is a JSON/Pocketbase feed

lang
lang=(lang : String)
output_folder
output_folder=(output_folder : String)
skip_titles
skip_titles=(skip_titles : Array(String))
source_extension
source_extension=(source_extension : String | Nil)
start_at
start_at=(start_at : String | Nil)
static

Static field values (applied to all items) Example: {"tags" => "blog, imported"}

static=(static : Hash(String, String))

Static field values (applied to all items) Example: {"tags" => "blog, imported"}

tags
tags=(tags : String)
template
template=(template : String)
token

Authorization token for API requests

token=(token : String | Nil)

Authorization token for API requests

urls
urls=(urls : Array(String))