Git Product home page Git Product logo

ffeedd's Introduction

ffeedd

ffeedd (Fun feed D) is a RSS 2.0 and Atom 1.0 generator. The RSS and Atom output from the example program has been validated by the w3.org feed validator and passed the validations.

valid rss valid atom

How to use

Create a Feed class, fill in your data, add your FeedItems to Feed.items and run Feed.createAtomFeed() or Feed.createRSSFeed(), these functions will return a string with the generated feed.
Here's a snippet from the example program

import ffeedd.feed;
import ffeedd.item;
import ffeedd.author;
import std.datetime;
...
// Feed name, link to the page, description of the feed
auto f = new Feed("ryhn.link", "https://ryhn.link/blog", "My very cool blog");
f.published = Clock.currTime().to!DateTime();
f.updated = Clock.currTime().to!DateTime() + 1.hours;
foreach (i; 0 .. 6)
{
	auto item = new FeedItem("Blog post " ~ i.to!string(),
		"https://ryhn.link/blog/" ~ i.to!string(), 
		"This is the " ~ i.to!string() ~ " post");
	item.published = Clock.currTime().to!DateTime();
	item.updated = Clock.currTime().to!DateTime() + (i+2).hours;
	item.authors ~= Author("Writer " ~ i.to!string(), "writer" ~ i.to!string()~ "@ryhn.link");
	f.items ~= item;
}
writeln(f.createAtomFeed());
writeln(f.createRSSFeed());

ffeedd's People

Contributors

ryhon0 avatar

Stargazers

 avatar Chris Josten avatar  avatar Laeeth Isharc avatar  avatar

Watchers

James Cloos avatar

Forkers

laeeth codemyst

ffeedd's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.