Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fjebaker/atomz
An Atom syndication feed generator for Zig.
https://github.com/fjebaker/atomz
atom feed generator syndication zig
Last synced: 19 days ago
JSON representation
An Atom syndication feed generator for Zig.
- Host: GitHub
- URL: https://github.com/fjebaker/atomz
- Owner: fjebaker
- License: gpl-3.0
- Created: 2024-08-02T22:34:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-03T13:54:01.000Z (5 months ago)
- Last Synced: 2024-10-16T19:20:38.156Z (2 months ago)
- Topics: atom, feed, generator, syndication, zig
- Language: Zig
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# atomz
An Atom feed generator for Zig.
```zig
const std = @import("std");
const atomz = @import("atomz");pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();var feed = atomz.Feed.init(allocator);
defer feed.deinit();try feed.setTitle("My new feed");
try feed.setAuthor("Syliva");var entry = try feed.newEntry();
try entry.setTitle("The conquest of cake");const ptr = try entry.newField("content", "This would be the content.");
try ptr.put("type", "text/html");try feed.write(std.io.getStdOut().writer());
}
```This will output the following:
```
My new feed
Syliva
The conquest of cake
This would be the content.
```