aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc/renderer.h
blob: c0bf289c13bcbedeeeb174d40e48b4a93ef0ca41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * blogc: A blog compiler.
 * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
 *
 * This program can be distributed under the terms of the BSD License.
 * See the file LICENSE.
 */

#ifndef _RENDERER_H
#define _RENDERER_H

#include <stdbool.h>
#include <squareball.h>

const char* blogc_get_variable(const char *name, sb_trie_t *global, sb_trie_t *local);
char* blogc_format_date(const char *date, sb_trie_t *global, sb_trie_t *local);
char* blogc_format_variable(const char *name, sb_trie_t *global, sb_trie_t *local,
    sb_slist_t *foreach_var);
sb_slist_t* blogc_split_list_variable(const char *name, sb_trie_t *global,
    sb_trie_t *local);
char* blogc_render(sb_slist_t *tmpl, sb_slist_t *sources, sb_trie_t *listing_entr,
    sb_trie_t *config, bool listing);

#endif /* _RENDERER_H */