Skip to Content

Creating cards from excel/database

9 replies [Last post]
krone9
Offline
Joined: 01/28/2017

Hey guys

Bit new to this so wondering what the best way to generate cards from a database is.

Ideally I'd like to be able to use a background image, define a number of parameters for text on each card and then generate from a spreadsheet/db all the cards in my game.

Before I go and write this in html/css is there something already existing to do this?

If not would anyone else find it useful if I'm keen enough to make it as a customisable web page

Rick-Holzgrafe
Rick-Holzgrafe's picture
Offline
Joined: 07/22/2008
nanDeck or Multideck

If you run on Windows, try nanDeck.

If you run on a Mac, try Multideck.

(Full disclosure: I wrote Multideck.)

krone9
Offline
Joined: 01/28/2017
ok tried nanDeck its very

ok tried nanDeck

its very very clunky but functional - pretty badly designed in terms of User Experience but pretty powerful.

Mildly annoyed that its just crashed and apparently didn't save my work (despite giving me no error on hitting save) so now have to start again.....

nand
nand's picture
Offline
Joined: 07/27/2008
krone9 wrote:ok tried

krone9 wrote:
ok tried nanDeck

its very very clunky but functional - pretty badly designed in terms of User Experience but pretty powerful.


If you have some suggestions I can try to implement them.

krone9 wrote:
Mildly annoyed that its just crashed and apparently didn't save my work (despite giving me no error on hitting save) so now have to start again.....

Sorry to hear that. If you can give me some info about the crash I can see if it's a bug that I can correct.

And if you select "Config" -> "Auto-save" your script will be saved each time you build the deck.

krone9
Offline
Joined: 01/28/2017
Very happy to - I actually

Very happy to - I actually quite like a fair bit of it. The text based simple syntax makes it very quick to recreate. Since posting that I've redone what I'd done so - grumbles about crashing aside - that is quite refreshing.

Drag and drop of elements would be nice (with values to align to absolute numbers)

Its a bit flakey on updates - took me a long time initially to figure out that my changes weren't refreshing so now I make a change, then edit a simple change (like text) to see it refresh the earlier change

I haven't managed to connect a text database file to it yet - thats what crashed it last time...

Whilst its not a pretty tool, the more I use it the more I prefer functionality over form - and I'm not touching some of its more complex functionality like card generation based on formulae yet

krone9
Offline
Joined: 01/28/2017
your tutorials are a little

your tutorials are a little obscure as well - would be good to define each element (eg Text, Font etc) and list out all the parameters.

Now this is where you tell me that that already exists and I've been too rubbish/lazy to find it :)

nand
nand's picture
Offline
Joined: 07/27/2008
krone9 wrote:Drag and drop of

krone9 wrote:
Drag and drop of elements would be nice (with values to align to absolute numbers)

Try right click in the editor, select a directive, and fill the parameters.

krone9 wrote:
Its a bit flakey on updates - took me a long time initially to figure out that my changes weren't refreshing so now I make a change, then edit a simple change (like text) to see it refresh the earlier change

Select "auto build" (on the right) and every change in the editor rebuilds the current card in realtime.

krone9 wrote:
I haven't managed to connect a text database file to it yet - thats what crashed it last time...

If you encounter an error, please send me the text file (my email is in the website), maybe there is some combination of characters that crashes the program.

krone9 wrote:
your tutorials are a little obscure as well - would be good to define each element (eg Text, Font etc) and list out all the parameters.

Now this is where you tell me that that already exists and I've been too rubbish/lazy to find it :)


When you have linked a text file with LINK command, all the column are loaded as [field] labels, then you can write something like:

TEXT=1-100,[field],0,0,100%,100%

Or, adding a frame:

<frame_text>=0,0,100%,100%
text=1-100,[field],<frame_text>

Or, adding a function to calc the [field] length:

<frame_text>=0,0,100%,100%
text=1-{(field)},[field],<frame_text>

krone9
Offline
Joined: 01/28/2017
Autobuild - I have this on

Autobuild - I have this on but its still a bit flakey as described.

the instructions on linking a data file, I suspect, make complete sense to you but reading it as a first time user its VERY hard to understand whats going on.

I had to pick it apart to really understand how it works - now I get it (more if not entirely) but it wasn't super obvious.

nand
nand's picture
Offline
Joined: 07/27/2008
krone9 wrote:Autobuild - I

krone9 wrote:
Autobuild - I have this on but its still a bit flakey as described.

The change rebuilds one element if it pass the syntax check, for example, if you write a text, you should see each character when you type it. Instead, if you delete a parameter for width, the element disappears (width=0) until you enter a valid value.

krone9 wrote:
the instructions on linking a data file, I suspect, make complete sense to you but reading it as a first time user its VERY hard to understand whats going on.

I had to pick it apart to really understand how it works - now I get it (more if not entirely) but it wasn't super obvious.


For example, if you have this "data.txt" file (a header and three lines):

name,desc
first title,"this is the first description, note the quotes for the comma"
second title,"this is the second description, note the quotes for the comma"
thirs title,"this is the third description, note the quotes for the comma"

You can use this script for creating cards (save it in the same folder with data.txt):

link=data.txt

font=arial,16,,#000000
text=1-{(name)},[name],0,0,100%,20%,center,center
font=arial,10,,#000000
text=1-{(desc)},[desc],0,20%,100%,80%,left,wwtop

Instead of a text file, you can use a spreadsheet (.xls, .xlsx, or .ods), the command is always LINK=filename.

krone9
Offline
Joined: 01/28/2017
ok I am starting to love this

ok I am starting to love this a little bit. Its very idiosyncratic though and you desperately need someone to write proper tutorials for it :D

Syndicate content


forum | by Dr. Radut