|
From: Guenter M. <mi...@us...> - 2025-10-09 11:44:18
|
On 2025-10-09, Schimon Jehudah via Docutils-users wrote: > On Thu, 9 Oct 2025 Guenter Milde via Docutils-users wrote: >> On 2025-10-08, Schimon Jehudah via Docutils-users wrote: ... >> You should decide, whether the preamble/metadata block should be >> parsed as reStructuredText (rST) at all or be a different format >> If you decide to use rST for the metadata, you can split off the >> preamble and parse it to Docutils-XML which then can be converted to >> Atom Syndication Format with XSLT. > Is there example code? Not directly. It also depends on how you would like to split the preamble from the content * with a pre-processor from the rST file * after parsing, from the Python "doctree" object * with XSLT from the Docutils-XML >> An alternative idea would be using "yaml", [...] > No. I am interested in utilizing only rST. It appears to be a perfect > format for documents, presentations, and internet pages. >> ... >> > Concerning to field "authors"; I have deliberately added semicolon >> > as it it easier to "split" title from address. >> I strongly recommend using an existing standard format. > The purpose of Rivista Voyager is to only utilize standards. ... > I would appreciate example code for hte extraction of "title" and > "address". > Please see fields of the new version of that document. Please provide a **minimal** example. (e.g. input to generate something like https://en.wikipedia.org/wiki/Atom_(web_standard)#Example_of_an_Atom_1.0_feed) ... > .. authors: Schimon Jehudah Zachary ; xmpp:sc...@pi...?message > .. date: 2025-07-14 00:00:00 UTC > .. description: Publishing client software for XMPP. > .. link: xmpp > .. microsummaries: > 5 XMPP publishing client software ; projects > 1 XMPP publishing client software ; desktop > 4 XMPP publishing client software ; html > 1 XMPP publishing client software ; mobile ... If you convert the preamble to a rST bibliography:: :authors: Schimon Jehudah Zachary ; xmpp:sc...@pi...?message :date: 2025-07-14 00:00:00 UTC :description: Publishing client software for XMPP. :link: ... with a suitable rST construct instead of the non-standard ";",¹ and run rst2xml on it, you see the XML representation. How to extract/convert this to atom XML is left as exercise to the reader. Regards, Günter ¹ In rST, the format for data entries is a "field list" or a description list. What to use depends on the context and may be discussed later on a *minimal* example with corresponding Atom element (one item at a time). |