class
Import::FeedConfig
- Import::FeedConfig
- Reference
- Object
Overview
Configuration for a single feed
Defined in:
import.crConstructors
-
.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 Method Summary
-
#feed_format : String | Nil
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 : Hash(String, String)
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 : String
Get the actual file extension to use
- #format : String
- #format=(format : String)
-
#json_feed?
Check if this is a JSON/Pocketbase feed
- #lang : String
- #lang=(lang : String)
- #output_folder : String
- #output_folder=(output_folder : String)
- #skip_titles : Array(String)
- #skip_titles=(skip_titles : Array(String))
- #source_extension : String | Nil
- #source_extension=(source_extension : String | Nil)
- #start_at : String | Nil
- #start_at=(start_at : String | Nil)
-
#static : Hash(String, String)
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 : String
- #tags=(tags : String)
- #template : String
- #template=(template : String)
-
#token : String | Nil
Authorization token for API requests
-
#token=(token : String | Nil)
Authorization token for API requests
- #urls : Array(String)
- #urls=(urls : Array(String))
Constructor Detail
Instance Method Detail
Field mappings: metadata_field -> source_field Example: {"title" => "title", "date" => "published", "content" => "body"}
Field mappings: metadata_field -> source_field Example: {"title" => "title", "date" => "published", "content" => "body"}
Static field values (applied to all items) Example: {"tags" => "blog, imported"}
Static field values (applied to all items) Example: {"tags" => "blog, imported"}