Skip

Image Merge With Layout Control
January 20, 2012 7:53 AM   Subscribe

I'm trying to determine if there is an easier way than using Excel/Word to do a layout image merge from a database. Windows 7 standard Office Suite or freeware preferred.

I'm working on board game design that uses iconography in standard ways and repetitive patterns. In the past I've done this sort of effort by hand, most recently using Inkscape and Scribus, along with Photoshop. I have also done simple text work with Word, track components with Excel, etc.

I'm now embarking on an effort that I can anticipate will require lots of tweaking of fine data and I want to avoid wasted effort recreating layouts every time I make a change in the icons or associated numbers and text. The ideal way to track the game related data is probably an excel spreadsheet.

From my searching, it is theoretically possible to get word to do image imports and try to lay out tiles/cards within that program and use mail merge to automate generation of a new set of printable materials when I make changes. But, I have also seen that the process is finicky and a bit buggy requiring some workarounds (such as always merging to a new document, then selecting all in the new document and f9 to refresh the data). Also, getting Word to preserve any sort of useful layout for this, I can already anticipate will be a nightmare.

Before I start on that track I'm interested in whether the Hive Mind has a suggestion of better/easier tools for this. I'm not averse to a bit of investment, but probably can't stretch as far as a tool like InDesign (though I'd be curious if it has a mode for this).
posted by meinvt to Computers & Internet (5 answers total)
 
If you had it all in Inkscape you could do it with almost any programming language, since SVG files are plain text. (In which case you'd want to store the spreadsheet you're using to control everything as a .csv file, which would also be plain text.)
posted by XMLicious at 8:05 AM on January 20, 2012


While this sounds intriguing, I still have no idea how/where to start. I was nearly a CS major, but haven't programmed anything significant in 15 years. Is there a framework or reference somewhere to how this would be set up or structured?

(It is frustrating to know that at one time you were coding matrix transforms and animation interfaces in OpenGL, and later find yourself unable to do something that obviously could be automated. A bit "Flowers for Algernon", but that is where I find myself.)
posted by meinvt at 8:24 AM on January 20, 2012


There isn't going to be a specific reference for it, really (though you'll find the specs for SVG on the w3.org site, but being specs they won't really be too useful for learning anything).

You'd probably want to start off by saving a graphic in Inkscape, opening the .svg file in a text editor, and then seeing if you can modify the text file to make the changes you want "by hand" in the text editor. (For example, put an object at x:326px y:749px, find those unique numbers inside the .svg file, and then you can move the object around by changing the numbers in the file.) Then you'd work out how to make the same changes in an automated fashion in whatever programming language you choose.

You will probably find tutorials around for whatever programming language you choose that'll show you how to open, alter, and save a text file and load a .csv file up as an array so you can loop through it. There will also probably be libraries available for working with SVG and XML as object models but that's likely more heavy-duty than you'll need.

Oh, I just remembered - when I've used Inkscape there was a menu option to pop up a view of the XML for (that is, the text of) the document you're working on, so that you can see what changes when you press a particular Inkscape button or reposition things, so that might be handy too for figuring out how the text in the file controls how your document looks.

As far as choosing a programming language, what languages did you work in at school?
posted by XMLicious at 8:45 AM on January 20, 2012


Ahh, that starts to make more sense. My programming history reads like a time machine. Basic from '84 to '90 (and some C64 assembly). Then Pascal, LISP and C. And far more LPC than I'd like to admit. My final programming was mostly C on unix platforms through about '97.

I know there are plenty of threads about "which programming language should I learn" so unless you think there is one that is particularly apropos for the task of iterative edits on text files I don't need to go into that digression.
posted by meinvt at 8:57 AM on January 20, 2012


If you're already familiar with C, maybe Perl? It's particularly suited to processing text and scripting. But yeah, this would be a really straightforward project so it doesn't really matter that much.
posted by XMLicious at 9:14 AM on January 20, 2012


« Older Is there a feature phone with ...   |  Freelance Audio book narration... Newer »
This thread is closed to new comments.


Post