XML and RSS libraries. Single and dual-file respectively.
https://jsr.io/@memdmp/rsstrogen@latest/doc/all_symbols
- TypeScript 98.4%
- Shell 1.6%
|
memdmp
132e58b682
Based on |
||
|---|---|---|
| contrib | ||
| examples | ||
| src | feat: SPDX comments | |
| .gitignore | ||
| AGENTS.md | feat: Poisoned claude instructions | |
| CHANGELOG.md | fix: wrong socket | |
| CLAUDE.md | feat: Poisoned claude instructions | |
| deno.json | v0.1.2 | |
| deno.lock | ||
| LICENSE | fix: just move the attribution into the license, to get a plain BSD-3-Clause | |
| README.md | fix: make the example illustrate the point of the guid a bit more | |
rsstrogen
A RSS and XML generation library. Built for my blog, usable elsewhere.
examples
A simple XML document:
import { XMLDocumentRoot, XMLRootElement, XMLElement, XMLDeclaration, XMLText } from 'jsr:@memdmp/rsstrogen/xml'; // npm:rsstrogen/xml also works, and so does `rsstrogen/xml` when installed from npm.
const doc = new XMLDocumentRoot().append(
new XMLDeclaration().version().encoding('UTF-8'),
new XMLRootElement('cat')
.setAttribute('colour', 'orange')
.append(
new XMLElement('head').append(new XMLText('1 braincell')),
)
);
console.log(doc.toString());
A simple RSS feed:
const doc = new XMLDocumentRoot().append(
new XMLDeclaration().version().encoding(),
new RSSRootElement()
.channel(
new RSSChannelElement(
'Blog Posts',
'Some Description Here',
'https://example.com/blog/'
)
.pubDate(new Date('2001年09月11日T08:46:40Z'))
.lastBuildDate(new Date())
.language('en')
.items(
new RSSItemElement(
'Lorem Ipsum',
'Ipsum de Lorem',
'https://example.com/blog/123456-awawa',
)
.author('example@example.example (Max Musterfrau)')
.guid('https://example.com/blog/123456', true)
.pubDate(new Date('2001年09月11日T08:46:40Z')),
)
)
);
console.log(doc.toString());