gitout

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

repo_writer.h (983B)


      1 #ifndef GITOUT_WRITER_REPO_WRITER_H_
      2 #define GITOUT_WRITER_REPO_WRITER_H_
      3 
      4 #include <stddef.h>
      5 
      6 #include "git/commit.h"
      7 #include "git/file.h"
      8 #include "git/reference.h"
      9 #include "git/repo.h"
     10 
     11 typedef enum {
     12   kRepoWriterTypeHtml,
     13   kRepoWriterTypeGopher,
     14 } RepoWriterType;
     15 
     16 typedef struct RepoWriter RepoWriter;
     17 
     18 RepoWriter* repowriter_create(RepoWriterType type, GitRepo* repo);
     19 void repowriter_free(RepoWriter* repo);
     20 
     21 void repowriter_set_log_cachefile(RepoWriter* writer, const char* cachefile);
     22 void repowriter_set_log_commit_limit(RepoWriter* writer, size_t count);
     23 void repowriter_set_baseurl(RepoWriter* writer, const char* baseurl);
     24 
     25 void repowriter_begin(RepoWriter* writer);
     26 void repowriter_add_commit(RepoWriter* writer, const GitCommit* commit);
     27 void repowriter_add_reference(RepoWriter* writer, const GitReference* ref);
     28 void repowriter_add_file(RepoWriter* writer, const GitFile* file);
     29 void repowriter_end(RepoWriter* writer);
     30 
     31 #endif  // GITOUT_WRITER_REPO_WRITER_H_