SRevie...e::SVG(3pm)

πŸ’– NAME πŸ’–

SReview::Template::SVG β€” bestie, it's the module that takes an SVG template and turns it 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

🌸 DESCRIPTION 🌸

okay so picture this: SReview::Template::SVG rolls up, uses SReview::Template to cook your input file into a templated SVG file, and then it runs inkscape over that templated SVG to convert it into a PNG file at the location you asked for. literally the whole glow-up, start to finish πŸ’…

And the input file? Super flexible. It can be a file chilling on your local file system, or it can be an HTTP or HTTPS URL β€” and in that case the template at that location gets downloaded first, transparently. no extra steps, no drama, it just handles it 🫢


πŸŽ€ TEMPLATE TAGS πŸŽ€

On top of the Mojo::Template syntax on $talk that SReview::Template already gives you, 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
heads up bestie: all these values are XML-escaped first. every single one. don't forget it πŸ’–

✨ 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. iykyk β€” it's a vibe check on your Inkscape era 🌈

πŸ“ workdir

The location for temporary files that the module needs. just give it a lil home for its stuff, okay? 🏠


and that's the whole page, bestie!! this one's from perl v5.40.1, dated 2026-02-15, and it lives in the SRevie...e::SVG(3pm) docs under User Contributed Perl Documentation. go forth and template your little heart out πŸ‘‘πŸ’–

πŸ“¦ where this page comes from