Multiverse Feedback: Cardlist | Visual spoiler | Export | Booster | Comments | Search | Recent activity
Mechanics | Upcoming releases | Skeleton

CardName: Bugs importing from CSV Cost: Type: Pow/Tgh: / Rules Text: I've always had trouble with the "import data" function, but my current problem is that it won't recognize the separating character in the import data. Flavour Text: Set/Rarity: Multiverse Feedback None

Bugs importing from CSV
I've always had trouble with the "import data" function, but my current problem is that it won't recognize the separating character in the import data.
Updated on 08 Jul 2020 by Alex

History: [-]

2012-08-19 02:01:59: dude1818 created the card Bugs importing from CSV

For example, I set the formatting line to "image%name", click "Replace with new", and try to import " of Bodach" (without quotes anywhere). I get the error "Line 1 of data had 1 fields when expecting 2".

EDIT: That's interesting. The link is supposed to go to but the auto-link code thinks the link is

Heh... I know this is a weird place to mention it, but Avatar of Bodach doesn't tell you what to do if multiple people have the same number of cards in their hand, which also happens to be the most amount of cards in any players hand...

Mm. Yeah, I had problems the last time I tried import data. I wasn't able to get it fixed last time I looked into it: it seemed that the CSV library had got confused. I should have another go at fixing it. Thanks for the prod.

Is importing data working at all yet? As I can't seem to import anything.

Formatting line: name%cost%type%rulestext
example card: example%5%enchantment%test
error: Line 1 of data had 1 fields when expecting 4

I've not been able to track down the problem (and I've tried several times). It's very frustrating. I guess I should remove the link for the moment until I do.

Thats a little annoying as I just finished coding a very rough exporter from Magic Set Editor -> Multiverse.

I'm looking at it as part of the upcoming upgrade/migration. That sounds like an awesome project you've made there, so I'll try hard to sort out whatever's wrong. I fear I may basically have to write myself a CSV decoder though, because I think the problem is in the CSV library I'm using.

any update on this? Is importing still broken?

No, I think not! It seems to be working much better after I upgraded a couple of underlying versions. I was able to import Verdia with very little trouble, for example.

Give it a go, and if things work for you, I'll close this bug.

The import is working now. Though my importer is still a little buggy

I'll post the importer here when I get it to work though.

Here is the current version of the MSE to Multiverse importer

You can see the results with a quick version of dreamscape that I've imported.

2015-06-04 14:43:07: Alex edited Bugs importing from CSV:

seems to be fixed

Looks like there are a few issues:

  • Comments come in, but with all newlines turned into spaces. Dreamscape Purifier for example is pretty hard to read the history as is.
  • More problematically, newlines on rules text also are just turned into whitespace.
  • Looks like artist credit isn't importing correctly.
  • Healing Visionary demonstrates that mana symbols and suchlike in card text aren't translated properly. To a first approximation, <sym-auto&gt; could turn into { and </sym-auto&gt; could turn into }. That wouldn't be correct on costs with multiple adjacent symbols like {3}{w} but it'd be better than nothing.
  • I'd ideally like to translate MSE's <atom-cardname&gt; tag into CARDNAME on import, because it's a pity to throw away information and I'll be doing the reverse translation on export.

The newlines have been turned into spaces because replacing ti with /n didn't seems to work. Could that be fixed on your end?

I'll add artist credit to the export, should be easy

I'll see if I can get the inline mana symbols working a bit better.

CSV ought to allow embedded \n newlines in quote-delimited fields. I'm pretty sure my CSV import handles that. Alternatively, I support " // " as an inline representation of newlines.

If it doesn't seem to work for you, tell me precisely what CSV text you're trying to import (trim it down to one or two cards' worth) and I'll look into it.

I'll try the "//" syntax

The "//" syntax works in the rules text but not on the notes text it seems. I'm currently still trying to fix mana symbols. Are there any way to format them other than {w}? The curly braces are giving me issues.

Oh, bother, I mis-posted earlier. It's not just "//", it's " // " - space slash slash space. Edited.

At the moment mana symbols have to be enclosed in braces {}. I used to support enclosing them in parens () too, but that got annoying in comments when people wanted to make a list of points (a), (b), (c) etc - they'd come out looking like "(a) {b} {c}". Having just one supported format is better for searchability too - this way if you remember a card had an activated ability that cost {w}{u}{b}{r}{g}, there's only one way to type that and only one search needed, rather than two (or thirty-two if you're perverse).

Edit: Huh. It looks like there's a bug at the moment such that (b)(c) are interpreted in comments but not in cards! That's pretty silly. I probably introduced it when I was fixing some bug about nested italics in rules text. I'll get that fixed. So yes, you can put mana symbols in parens () if you want.

I've fixed the curly brace issue so thats ok. I'm just having a problem with detecting what aremana symbols in the text. eg: {w},{t}: {t}arget creature gets +1/+1.

I think I can use "T:", "T," and "T " as detection but for some reason on my end it isn't detecting the "T:" correctly....

I'll take another crack at it on the weekend. Any movement on your end? Anything you need from me?

In theory I could directly import MSE files rather than making people have to export. I'm getting a bit more time in the evenings now than I was a couple of months ago so I could have a go at that myself. I've got a good sample MSE set I can be using.

that would be amazing...

any movement on this?

Urgh. No, sorry. Been busy with other things. I'll try to take some time to look at this though.

I'll just keep bugging you about it every now and then as the inability to exort back and forth between MSE2 is probably the main reason I don't use Magic Multiverse more for my personal sets.

Bugging me about it is completely fine by me :)

I've been wondering, actually. An MSE set and a Multiverse set have a few different assumptions. In particular, Multiverse assumes that the card art and card renders will be hosted on some other website (because I don't want to have to deal with image hosting myself, and the associated collateral such as making sure people don't store porn here). An MSE set assumes the images are included in the archive. That's hard to translate either way round.

Yeh art MSE2 -> Multiverse isn't really an issue if you allow to set a image directory but your right that it doesn't work the other way around.

Not sure of a good fix their...

Maybe I just need to update MSE2 sometime in the future to support hosted images.

I just listened to the podcast interview with Inanimate. I didn't realise you were Reuben C from Goblin Artisans!

So one idea I had was that I could just say that if you want to move a set back and forth between MSE and Multiverse, you upload the card artwork to some website (imgur, your own website, Dropbox, whatever). Then Multiverse assumes the card art URL is [server_root]/[card_code].jpg or [server_root]/[card_name].png or whatever. That doesn't really help me when I want to export from Multiverse to MSE though - I'd still need to download all the images to create the MSE file.

Another thing I could do is phrase the operation not as "Export to MSE", but rather as "Update" an existing MSE file from Multiverse. This will keep whatever card artwork is already in the MSE file. You'd upload the MSE file to Multiverse, it modifies it by updating all the rules text, card names/types/etc, and then re-zips it up and lets you download the modified MSE file.

Yeh thats me! I'm Doombringer on the MTGsalvation forums but Reuben Covington in most other places.

I like the second option a lot as most of the time Multiverse is used for more early development, group projects and getting feedback where the pictures isn't always as important but the ability to update quickly and keep track of changes is.

Any possibility of this feature by the end of the year to allow easy printing of the Tesla set for playtesting?

Well, you can print the Visual Spoiler easily (use the "Printable" link at top-right). Or assemble decks on details pages then print those, like I did here or here.

But if you're set on using MSE's frames rather than Multiverse's... I fear not. I've not had the energy to work on Multiverse for months. I spent one evening in the past month looking into this feature and the findings weren't promising (using the filesystem as scratch space on Heroku dynos is rather tricky / unreliable), so I don't even know whether my current plan would actually function at all.

Does MSE have an "import from CSV / XML / JSON" feature? Those are fairly standard transfer formats which Multiverse does provide.

I really would like to make Multiverse more compatible with MSE because a bunch of people would use it more regularly. I just haven't had the energy.

I guess I'll have a try at creating a converter after Christmas.

Well I've had a bunch of energy and I'm now about half way through creating a python script that converts XML exports to MSE files

I am currently not supporting images, DFC's or planeswalkers. However unless I run into any major issues I'll have the first version up sometime next week.

this is awesome, thanks reuben. i might give it a go for my next playtest

yeah this worked pretty well, certainly a massive time saver. flavour text didn't seem to come through either, but that's far from a dealbreaker

on 16 Apr 2020 by Visitor:

A MSE export template that exports to the CSV format needed by Multiverse may be helpful to write; that is independent of Multiverse. Unfortunately, MSE doesn't support import templates, although TeXnicard does. I also started writing a export template for TeXnicard to export Magic: the Gathering sets to the Multiverse import format, but the documentation for the Multiverse import format isn't so clear. (Templates (whether major or minor (import or export or rendering)) in TeXnicard are written in a combination of PostScript and SQL, although PCRE functions are also provided. I am writing TeXnicard due to many things I dislike about MSE, including the GUI and WYSIWYG; I like the batch interface and command-line interface instead.) Some features of the Magic: the Gathering template in both MSE and TeXnicard may be unavailable in Multiverse, and when transfer in other direction, also some things might not be specified, so will be missed.

Did you look at the Wikipedia article for CSV? It might help. I also had a problem, but after I read the Wikipedia article about CSV, then I figured out what to do to get it to work. Examine the code of the multiverse-export template in the TeXnicard source repository for an example code.

In response to comment 59923: It may be helpful, although note that not everyone uses MSE. I use TeXnicard, and I have also heard of Geckos and PrincessEdit, although I do not know much about them (I don't know if they support import/export at all). All four of these programs can render the cards themself, although I think they may have different capabilities and restrictions for doing so. (I actually also don't know if Geckos and PrincessEdit support Magic: the Gathering at all.)

Add your comments:

(formatting help)
Enter mana symbols like this: {2}{U}{U/R}{PR}, {T} becomes {2}{u}{u/r}{pr}, {t}
You can use Markdown such as _italic_, **bold**, ## headings ##
Link to [[[Official Magic card]]] or (((Card in Multiverse)))
Include [[image of official card]] or ((image or mockup of card in Multiverse))
Make hyperlinks like this: [text to show](destination url)
What is this card's power? Rumbling Baloth
(Signed-in users don't get captchas and can edit their comments)