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)

Source
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)
Source

Instance methods

feed_format

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

Source
feed_format=(feed_format : String | Nil)

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

Source
fields

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

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

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

Source
file_extension

Get the actual file extension to use

Source
format
Source
format=(format : String)
Source
json_feed?

Check if this is a JSON/Pocketbase feed

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

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

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

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

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

Authorization token for API requests

Source
token=(token : String | Nil)

Authorization token for API requests

Source
urls
Source
urls=(urls : Array(String))
Source