$php.=qq{\$sparkline->RenderResampled($width, $height);\n};
}
- if ($params{preview}) {
- return "[[".gettext("sparkline previewing not implemented")."]]";
- }
-
$php.=qq{\$sparkline->Output();\n?>\n};
# Use the sha1 of the php code that generates the sparkline as
return "[[".gettext("sparkline failed to run php")."]]";
}
- writefile($fn, $config{destdir}, $png, 1);
+ if (! $params{preview}) {
+ writefile($fn, $config{destdir}, $png, 1);
+ }
+ else {
+ # can't write the file, so embed it in a data uri
+ eval q{use MIME::Base64};
+ error($@) if $@;
+ return "<img src=\"data:image/png;base64,".
+ encode_base64($png)."\" />";
+ }
}
return '<img src="'.
* A "php" program in the path, that can run standalone php programs.
* [[cpan Digest::SHA1]]
-On a Debian system, this can be accomplished by installing the
-`libsparkline-php`, `php5-gd`, `php5-cli`, and `libdigest-sha1-perl`
-packages.
+On a Debian system, this can be accomplished by installing these packages:
+`libsparkline-php` `php5-gd` `php5-cli` `libdigest-sha1-perl`
# examples
msgstr ""
"Project-Id-Version: ikiwiki-bg\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-01-12 01:19+0200\n"
"Last-Translator: Damyan Ivanov <dam@modsodtsys.com>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
msgid "sparkline bad width value"
msgstr "приставката „linkmap”: грешка при изпълнение на „dot”"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "функцията „getctime” не е реализирана"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "приставката „linkmap”: грешка при изпълнение на „dot”"
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "функцията „getctime” не е реализирана"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-02-17 12:07+0100\n"
"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
msgid "sparkline bad width value"
msgstr "linkmapu se nepodařilo spustit dot"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "getctime není implementováno"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "linkmapu se nepodařilo spustit dot"
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "Byla rozpoznána smyčka direktivy %s na %s v hloubce %i"
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "getctime není implementováno"
+
#~ msgid "in late morning %A"
#~ msgstr "%A pozdě dopoledne"
msgstr ""
"Project-Id-Version: es\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-02-12 10:31+0100\n"
"Last-Translator: Víctor Moral <victor@taquiones.net>\n"
"Language-Team: spanish <es@li.org>\n"
msgid "sparkline bad width value"
msgstr "El complemento linkmap no ha podido ejecutar el programa dot"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "la funcionalidad getctime no está incluida"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "El complemento linkmap no ha podido ejecutar el programa dot"
msgstr ""
"se ha detectado un bucle de preprocesado %s en la página %s en la vuelta "
"número %i"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "la funcionalidad getctime no está incluida"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-02-13 13:02+0100\n"
"Last-Translator: Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
msgid "sparkline bad width value"
msgstr "Échec de lancement de dot par linkmap"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "getctime n'est pas implémenté"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "Échec de lancement de dot par linkmap"
msgstr ""
"%s une boucle a été détectée dans le prétraitement de %s, à la profondeur de "
"%i"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "getctime n'est pas implémenté"
msgstr ""
"Project-Id-Version: ikiwiki-gu\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-01-11 16:05+0530\n"
"Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n"
"Language-Team: Gujarati <team@utkarsh.org>\n"
msgid "sparkline bad width value"
msgstr "લીંકમેપ ડોટ ચલાવવામાં નિષ્ફળ"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "getctime અમલમાં મૂકાયેલ નથી"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "લીંકમેપ ડોટ ચલાવવામાં નિષ્ફળ"
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "getctime અમલમાં મૂકાયેલ નથી"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "sparkline bad width value"
msgstr ""
-#: ../IkiWiki/Plugin/sparkline.pm:112
-msgid "sparkline previewing not implemented"
-msgstr ""
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
msgid "sparkline failed to run php"
msgstr ""
msgstr ""
"Project-Id-Version: ikiwiki 1.37\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-01-05 16:33+100\n"
"Last-Translator: Paweł Tęcza <ptecza@net.icm.edu.pl>\n"
"Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n"
msgid "sparkline bad width value"
msgstr "awaria wtyczki linkmap"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "niedostępna funkcja getctime"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "awaria wtyczki linkmap"
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "niedostępna funkcja getctime"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-01-10 23:47+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
msgid "sparkline bad width value"
msgstr "linkmap misslyckades att köra dot"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "getctime inte implementerad"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "linkmap misslyckades att köra dot"
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s förbehandlingsslinga detekterades på %s, djup %i"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "getctime inte implementerad"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-03-07 01:22-0500\n"
+"POT-Creation-Date: 2007-03-07 02:29-0500\n"
"PO-Revision-Date: 2007-01-13 15:31+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
msgid "sparkline bad width value"
msgstr "linkmap không chạy dot được"
-#: ../IkiWiki/Plugin/sparkline.pm:112
-#, fuzzy
-msgid "sparkline previewing not implemented"
-msgstr "chưa thực hiện getctime"
-
-#: ../IkiWiki/Plugin/sparkline.pm:148
+#: ../IkiWiki/Plugin/sparkline.pm:144
#, fuzzy
msgid "sparkline failed to run php"
msgstr "linkmap không chạy dot được"
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "vòng lặp tiền xử lý %s được phát hiện trên %s ở độ sâu %i"
+
+#, fuzzy
+#~ msgid "sparkline previewing not implemented"
+#~ msgstr "chưa thực hiện getctime"