logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SReview::Template::SVG - module to process an SVG template into a PNG file

Configuration

       This module checks the following configuration values:

   command_tune
       If  the  value  "inkscape"  in  this  hash  is  set to "0.9", then the "inkscape" command is invoked with
       command-line parameters for Inkscape version 0.9 or below. In all other  cases,  command-line  parameters
       for Inkscape version 1.0 or above are used instead.

   workdir
       The location for temporary files that the module needs.

perl v5.40.0                                       2025-02-17                        SReview::Template::SVG(3pm)

Description

       "SReview::Template::SVG" uses SReview::Template to process an input file into a templated SVG file, and
       then runs inkscape over it to convert the templated SVG file to a PNG file at the given location.

       The input file can either be a file on the local file system, or it can be an HTTP or HTTPS URL (in which
       case the template at that location will first be downloaded, transparently).

Name

       SReview::Template::SVG - module to process an SVG template into a PNG file

Synopsis

         use SReview::Template::SVG qw/process_template/;
         use SReview::Talk;
         use SReview::Config::Common;

         my $talk = SReview::Talk->new(talkid => ...);
         my $config = SReview::Config::Common::setup();

         process_template($input_svg_template, $output_png_filename, $talk, $config);

         # now a PNG file is written to $output_png_filename

Template Tags

       In addition to the Mojo::Template syntax on $talk that SReview::Template provides,
       "SReview::Template::SVG" also passes the these regexvars to SReview::Template (for more information, see
       SReview::Template):

       @SPEAKERS@
           The value of "$talk->speakers"

       @ROOM@
           The value of "$talk->room"

       @TITLE@
           The value of "$talk>title"

       @SUBTITLE@
           The value of "$talk>subtitle"

       @DATE@
           The value of "$talk>date"

       @APOLOGY@
           The value of "$talk>apology"

       Note that all these values are XML-escaped first.

See Also