gout

A static git page generator
git clone https://git.bracken.jp/gout.git
Log | Files | Refs | README | LICENSE

atom.h (978B)


      1 #ifndef GOUT_WRITER_ATOM_ATOM_H_
      2 #define GOUT_WRITER_ATOM_ATOM_H_
      3 
      4 #include <stdio.h>
      5 
      6 #include "git/commit.h"
      7 #include "git/repo.h"
      8 
      9 /* Atom RSS output file. */
     10 typedef struct Atom Atom;
     11 
     12 /* Allocate a new Atom RSS output file writing to the specified stream. */
     13 Atom* atom_create(const GitRepo* repo, FILE* out);
     14 
     15 /* Frees the specified Atom RSS output file. */
     16 void atom_free(Atom* atom);
     17 
     18 /* Sets the base URL for the RSS feed. Example: "https://example.com/git/". */
     19 void atom_set_baseurl(Atom* atom, const char* baseurl);
     20 
     21 /* Writes the Atom RSS header including <feed>, <title>, <subtitle>. */
     22 void atom_begin(Atom* atom);
     23 
     24 /* Writes an RSS <entry> for the commit. */
     25 void atom_add_commit(Atom* atom,
     26                      const GitCommit* commit,
     27                      const char* path,
     28                      const char* content_type,
     29                      const char* tag);
     30 
     31 /* Closes out the Atom <feed>. */
     32 void atom_end(Atom* atom);
     33 
     34 #endif  // GOUT_WRITER_ATOM_ATOM_H_