summaryrefslogtreecommitdiff
path: root/generators.c
diff options
context:
space:
mode:
Diffstat (limited to 'generators.c')
-rw-r--r--generators.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/generators.c b/generators.c
index 654e01a..0a07eb8 100644
--- a/generators.c
+++ b/generators.c
@@ -327,6 +327,13 @@ write_html_album (TGallerySetup *setup,
str_replace (&b, "<!-- $(FOOTER) -->", s1, NULL);
g_free (s1);
}
+ if (strstr (b, "<!-- $(META_GENERATOR) -->")) {
+ s1 = g_strdup_printf ("Cataract Gallery Generator v%s", APP_VERSION);
+ str_replace (&b, "<!-- $(META_GENERATOR) -->", s1, NULL);
+ g_free (s1);
+ }
+ if (strstr (b, "<!-- $(META_AUTHOR) -->") && setup->meta_author)
+ str_replace (&b, "<!-- $(META_AUTHOR) -->", setup->meta_author, NULL);
if (strstr (b, "<!-- $(TOTAL_ITEMS) -->")) {
s1 = g_strdup_printf ("%d", items->items->len);
str_replace (&b, "<!-- $(TOTAL_ITEMS) -->", s1, NULL);
@@ -749,12 +756,19 @@ write_html_image (TGallerySetup *setup,
str_replace (&b, "<!-- $(LINK_PREV) -->", "index.html", NULL);
}
- if (strstr (b, "<!-- $(FOOTER) -->")) {
+ if (strstr (b, "<!-- $(FOOTER) -->") && setup->footer) {
s1 = g_strdup (setup->footer);
fix_entities (&s1);
str_replace (&b, "<!-- $(FOOTER) -->", s1, NULL);
g_free (s1);
}
+ if (strstr (b, "<!-- $(META_GENERATOR) -->")) {
+ s1 = g_strdup_printf ("Cataract Gallery Generator v%s", APP_VERSION);
+ str_replace (&b, "<!-- $(META_GENERATOR) -->", s1, NULL);
+ g_free (s1);
+ }
+ if (strstr (b, "<!-- $(META_AUTHOR) -->") && setup->meta_author)
+ str_replace (&b, "<!-- $(META_AUTHOR) -->", setup->meta_author, NULL);
if (! fputs (b, fout)) {
fprintf (stderr, "write_html_image: error writing to file \"%s\": %s\n", dst, strerror (errno));