Forum: Inkscape My certificate-maker program

C9af522fc39d5de90f21119543c2b9ab?d=identicon&s=25 Steve Litt (Guest)
on 2013-07-15 20:34
(Received via mailing list)
Hi all,

You might be interested in what I did with Inkscape, YAML, and a couple
hundred lines of Pthon...

I teach a troubleshooting course, and a client asked for certificates
of completion for all the client's students. So here's what I did:

I used Inkscape to make the certificate, complete with a nice
triple-line border. Everywhere that needed something specific, such as
venue (for example "ABC Corp in Indianapolis, IN"), I put
@variablename@. Most of those variables, such as venue and date range,
were per-course, but the student name was per-student.

I saved this Inscape file uncompressed for easy parsing. To drive the
run, I used a YAML file something like what you see below my sig. I
think if you look at the YAML file you can pretty much envision the
Python program.

The Python program looped through the YAML graduates list, and for each
one:

* For each key in tokens, replaced @tokenkey@ with the token's value in
  the Inscape file
* Wrote the SVG result to an output file in run_info['output_dir']
* Converted that SVG file to a PDF

My client was delighted both with the quality of the result and the
speed with which I did it.

Because of its native text format and its ability to do complex
graphics, Inkscape provides the ideal bridge between data and graphics.

Thank you for giving us Inkscape.

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


##############################################
run_info:
  template: 03_example_diploma.svg
  # MUST PUT SLASH AT END OF output_dir
  output_dir: ./finishedfiles/

tokens:
  company: Johnson Oil, Incorporated,
  office: Orlando, Florida
  daterange: March 12-13, 2013
  signdate: March 15, 2013

graduates:
  - Alex Anderson
  - Brittany Baumgartner
  - Charles Custer
  - Dianna Donovan
  - Edward Ellsworth
  - Felice Fernandez
##############################################
352dad7f68ab2a8af9b69f75997aee11?d=identicon&s=25 Lars Behrens (Guest)
on 2013-07-15 23:25
(Received via mailing list)
Am 15.07.2013 20:05, schrieb Steve Litt:

> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=4880...

Spam?

--
Cheerz,
Lars
352dad7f68ab2a8af9b69f75997aee11?d=identicon&s=25 Lars Behrens (Guest)
on 2013-07-15 23:28
(Received via mailing list)
Am 15.07.2013 23:24, schrieb Lars Behrens:

>> http://pubads.g.doubleclick.net/gampad/clk?id=4880...
>
> Spam?

Oh, just noticed that this address is underneath all the mails on the
list.

--
Cheerz,
Lars
7f6f9e75239bfcc5bfb41014e9dc9a26?d=identicon&s=25 Martin Owens (Guest)
on 2013-07-16 00:08
(Received via mailing list)
On Mon, 2013-07-15 at 14:05 -0400, Steve Litt wrote:
> Because of its native text format and its ability to do complex
> graphics, Inkscape provides the ideal bridge between data and
> graphics.

I always thought a mail-merge type feature would be useful for inkscape.
Python and the ability to open a few kinds of data-sources, but it would
certainly be better than the same code being rewritten to account for
data-merging.

What are your thoughts Steve? should we have this as a feature by
default?

Martin,
E73df93f2fa8b2d6cfa7f2150dcd6306?d=identicon&s=25 Abrolag (Guest)
on 2013-07-16 00:41
(Received via mailing list)
On Mon, 15 Jul 2013 23:27:19 +0200
Lars Behrens <lars.behrens@kit.edu> wrote:

> Am 15.07.2013 23:24, schrieb Lars Behrens:
>
> >> http://pubads.g.doubleclick.net/gampad/clk?id=4880...
> >
> > Spam?
>
> Oh, just noticed that this address is underneath all the mails on the list.

It's OK. I haven't used up this moth's quota of mistakes either:)

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
B89b03ffaeb3ee9dd974edc0a3d7dfcd?d=identicon&s=25 William Oquendo (Guest)
on 2013-07-16 02:37
(Received via mailing list)
Indeed it would be useful. Some time ago I did the same but with the
help
of
sed and svg2pdf.


On Mon, Jul 15, 2013 at 2:58 PM, Martin Owens <doctormo@gmail.com>
wrote:

> What are your thoughts Steve? should we have this as a feature by
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=4880...
> _______________________________________________
> Inkscape-user mailing list
> Inkscape-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/inkscape-user
>



--

Best regards / Cordialmente,

William-Fernando Oquendo
C9af522fc39d5de90f21119543c2b9ab?d=identicon&s=25 Steve Litt (Guest)
on 2013-07-16 05:32
(Received via mailing list)
On Mon, 15 Jul 2013 15:58:11 -0400
Martin Owens <doctormo@gmail.com> wrote:

> What are your thoughts Steve? should we have this as a feature by
> default?
>
> Martin,

Hi Martin,

I'm a big fan of do one thing and do it well, and IMHO Inkscape's one
thing is graphics.

My viewpoint is that every added line of code gives bugs more places to
hide, so I'm very skeptical of adding non-core features. Especially
when it's so easy to do what I did.

So my opinion is "no". If the project would like, I could make some
sort of howto to explain how to do it.

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance
010c3268d8ea73ea04547c6fa009c5b6?d=identicon&s=25 Jakob Gager (Guest)
on 2013-07-16 07:50
(Received via mailing list)
I commonly use this inkscape extension
(http://wiki.colivre.net/Aurium/InkscapeGenerator)
to have some sort of mail-merge feature. I does more or less the same as
Steve introduced in a
similar way.
 From my point of view I would recommend it, especially if you don't
wont to try yourself writing
an inkscape plugin :)

Cheers
Jakob
9625234ca6ba67c5e03b0f84219141fc?d=identicon&s=25 Maarten van der Velde (Guest)
on 2013-07-16 10:33
(Received via mailing list)
I've done something similar using Ruby to convert Inkscape-layers to the
glyphs of a SVG font. My earlier post about that got completely ignored,
but I believe the both the technique and the application could be
interesting for others...?

This script turns Inkscape into a font-editor. Ofcourse, this was
already
possible, but slightly clumpsy. With my Ruby script, you can use
Inkscape's
guides for the font-metrics.

Another Ruby scripts creates a starting template with a appropiately
named
layer for every glyph and guides for the font-metrics.

Groetsels!

Maarten
5ee1eccd15b00b7820e7fde77c63730e?d=identicon&s=25 Eneko Gotzon Ares (Guest)
on 2013-07-16 23:04
(Received via mailing list)
On 16 Jul 2013, at 05:17, Steve Litt wrote:

> I'm a big fan of do one thing and do it well.

+1

--
Eneko Gotzon Ares
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.