View Source SmeeFeds.Export (SmeeFeds v0.3.1)
Converts lists of federations into other formats suitable for export and use in other applications.
Some exports are focused on presenting the data (such as markdown/1
, others are lossy summaries (csv/1
) and some are
contain all data (json/1
).
Summary
Functions
Creates a CSV export of the provided federations as a single string.
Produces a string containing all passed federations in the JSON format used for SmeeFeds default data.
Produces a string containing all passed federations in the JSON format used for SmeeFeds default data, and then writes it directly to disk at the specified filename/path.
Produces a string containing all passed federations in the normal Smee JSON format.
Creates a file containing all passed federations in the normal Smee JSON format.
Produces a simple Markdown-formatted table summarising the provided list of federations.
Functions
@spec csv(federations :: [SmeeFeds.Federation.t()]) :: binary()
Creates a CSV export of the provided federations as a single string.
Not all information is included - the CSV only contains ID, name, URL, countries, policy url and metadata URLs for the main aggregate and MDQ service. Other information is not included.
@spec dd_json!(federations :: [SmeeFeds.Federation.t()]) :: binary()
Produces a string containing all passed federations in the JSON format used for SmeeFeds default data.
This format is best used for creating new default data sets, and is not for general purpose serialization.
It is possible to use additional lines in federation records:
active: false
- prevents the record from loadingcomment: "a comment"
- notes that will be ignored when the data is loadedtodo: "task details"
- developer notes that will be ignored when the data is loaded
The JSON should contain all federation information and can be used by SmeeFeds as a replacement for the default source of federation information. Federations are stored in a map.
@spec dd_json_file!(federations :: [SmeeFeds.Federation.t()], path :: binary()) :: :ok
Produces a string containing all passed federations in the JSON format used for SmeeFeds default data, and then writes it directly to disk at the specified filename/path.
This format is best used for creating new default data sets, and is not for general purpose serialization.
It is possible to use additional lines in federation records:
active: false
- prevents the record from loadingcomment: "a comment"
- notes that will be ignored when the data is loadedtodo: "task details"
- developer notes that will be ignored when the data is loaded
The JSON should contain all federation information and can be used by SmeeFeds as a replacement for the default source of federation information. Federations are stored in a map.
@spec json!(federations :: [SmeeFeds.Federation.t()]) :: binary()
Produces a string containing all passed federations in the normal Smee JSON format.
This format is best for general-purpose serialisation of the federation records.
Federations are stored as a list.
@spec json_file!(federations :: [SmeeFeds.Federation.t()], path :: binary()) :: :ok
Creates a file containing all passed federations in the normal Smee JSON format.
This format is best for general-purpose serialisation of the federation records.
Federations are stored as a list.
@spec markdown(federations :: [SmeeFeds.Federation.t()]) :: binary()
Produces a simple Markdown-formatted table summarising the provided list of federations.
Not all information is included - the CSV only contains ID, name, URL, countries, policy url and metadata URLs for the main aggregate and MDQ service. Other information is not included.
The Markdown output can be used with most modern markdown parsers, including Github comments.