Skip to main content

Create feed (Atom)

Creates the text of an Atom feed

Function CreateFeedAtom(Val FeedTitle, Val FeedLink, Val FeedID, Val Items, Val UpdateDate = Undefined) Export

ParameterCLI optionTypeRequiredDescription
FeedTitle--nameStringFeed title
FeedLink--linkStringFeed URL
FeedID--idStringFeed unique identifier (usually a URL)
Items--itemsArray of StructureFeed items. See GetFeedItemStructureAtom
UpdateDate--dateDate, UndefinedUpdate date. Current if not filled
Returns

String - Atom XML feed

1C:Enterprise/OneScript code example
FeedTitle = "Test Atom feed";
FeedLink = "https://example.com";
FeedID = "https://example.com/feed";

ItemsArray = New Array;

ElementStructure = OPI_RSS.GetFeedItemStructureAtom(True);
ElementStructure["title"] = "First record";
ElementStructure["id"] = "https://example.com/entry1";
ElementStructure["link"] = "https://example.com/entry1";
ElementStructure["updated"] = OPI_Tools.GetCurrentDate();
ElementStructure["summary"] = "First record summary";
ElementStructure["content"] = "Full content of the first record";
ElementStructure["author"] = "First Author";
ElementStructure["published"] = OPI_Tools.GetCurrentDate();

ItemsArray.Add(ElementStructure);

ElementStructure = OPI_RSS.GetFeedItemStructureAtom(True);
ElementStructure["title"] = "Second record";
ElementStructure["id"] = "https://example.com/entry2";
ElementStructure["link"] = "https://example.com/entry2";
ElementStructure["updated"] = OPI_Tools.GetCurrentDate();
ElementStructure["summary"] = "Second record summary";
ElementStructure["content"] = "Full content of the second record";
ElementStructure["author"] = "Second Author";
ElementStructure["published"] = OPI_Tools.GetCurrentDate();

ItemsArray.Add(ElementStructure);

Result = OPI_RSS.CreateFeedAtom(FeedTitle, FeedLink, FeedID, ItemsArray);
# JSON data can also be passed as a path to a .json file

oint rss CreateFeedAtom \
--name "Test Atom feed" \
--link "https://example.com" \
--id "https://example.com/feed" \
--items "[{'title':'First record','id':'https://example.com/entry1','link':'https://example.com/entry1','updated':'06/18/2026 16:10:16','summary':'First record summary','content':'Full content of the first record','author':'First Author','published':'06/18/2026 16:10:16'},{'title':'Second record','id':'https://example.com/entry2','link':'https://example.com/entry2','updated':'06/18/2026 16:10:18','summary':'Second record summary','content':'Full content of the second record','author':'Second Author','published':'06/18/2026 16:10:18'}]"
Result
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n <title>Test At..."