Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   Realm Works Discussion (http://forums.wolflair.com/forumdisplay.php?f=67)
-   -   RealmWorks CSV Import Tool (http://forums.wolflair.com/showthread.php?t=58156)

Farling July 9th, 2017 01:42 PM

Quote:

Originally Posted by ray57913 (Post 252466)
Oh I'm not thinking a csv for all field for all items. I'm thinking a blank csv for a category. For example I want to enter gods into me and I have not created anything for it. I load my structure select the category for gods hit a button and it creates a csv file that has all the headers that would be used for gods. then i can fill that out and load it in and then just match the names and import.

If it is only to get the column titles, this could easily be done by having realmworks open in one window showing a blank version of the appropriate topic/article type and then just typing in appropriate column headers into Excel (or other CSV generating program).

Farling July 9th, 2017 01:46 PM

Quote:

Originally Posted by AEIOU (Post 252495)
@ray57913: That would be really useful. If had a blank format for creating the CSV files, it would be so much easier. Several categories are rigidly structured so this could work.

I've been working on importing 300+ gods into HeroLab. I identified the format and have created an Excel sheet that I enter the names, domains, descriptions, etc and then a second sheet that merges all of those fields with the necessary field information.

I haven't carved out the time to do this for RealmWorks but it would be very cool if something like this was available for standardized categories like deities, NPCs, creatures, spells and feats. Copy/paste the info and let your favorite spreadsheet format it using concatenation.

This sounds like a simple import of separate CSV files using csv2rw.

One CSV file for each domain or other mechanic articles, and one CSV for the deities.

You can freely map the named columns from your CSV file(s) into the corresponding fields in the actual topic/article format(s). There's no need to get a CSV list of column titles out of the tool first.

Valyar August 4th, 2017 10:22 AM

This tools is amazing! It is a must-have when you prepare a big mechanics sections or story that can be put in CSV format :) I uploaded Dark Heresy 2nd in Realm Works and this tool saved me so much copy-pasting the equipment and other system-data!

http://forums.wolflair.com/showthrea...790#post253790


Question: Is there a way during the import to have the topics nested into specific article hierarchy?

Farling August 4th, 2017 01:37 PM

Quote:

Originally Posted by Valyar (Post 253791)
Question: Is there a way during the import to have the topics nested into specific article hierarchy?

Tick the "Use Parent Topic" button that is underneath the structure panel. This option creates a very basic parent topic for all the other topics being created.

If you want more information in the parent topic, then you can populate the newly created parent topic after import.

Valyar August 5th, 2017 04:08 AM

Worked like charm. :)

Acenoid August 5th, 2017 05:26 PM

Just started to use the too. First impression is great. I have yet to import something.

However I noticed that inactive Categories are showing up in the list. Maybe they should be hidden or flagged? I suppose you should not be able to import to inactive categories?

Farling August 11th, 2017 01:51 PM

Quote:

Originally Posted by Acenoid (Post 253851)
Just started to use the too. First impression is great. I have yet to import something.

However I noticed that inactive Categories are showing up in the list. Maybe they should be hidden or flagged? I suppose you should not be able to import to inactive categories?

Ah, I hadn't come across those before. I guess they are part of the exported structure definition and marked as inactive. I will sort that out soon.

Farling August 16th, 2017 01:53 PM

Quote:

Originally Posted by Acenoid (Post 253851)
However I noticed that inactive Categories are showing up in the list. Maybe they should be hidden or flagged? I suppose you should not be able to import to inactive categories?

Hi Acenoid,

Unfortunately, the structure export file doesn't include any flags to indicate which categories are "Inactive" or have the "Shown" flag not ticked.

It will require a change by LWD to the export structure (adding an attribute to the category_global) before I know which categories are to be hidden.

Acenoid August 20th, 2017 10:33 AM

Oh okay :) Thanks for looking.

nightpanda2810 August 29th, 2017 09:08 AM

I'm trying to create clickable loot tables using links withing RW. I actually already made some manually, but it's SUPER tedious and time-consuming. I've included a screenshot of what I'd like the import to look like when done. I can't figure out how to do so. I've gotten as far as creating the labeled snippets, but can't seem to get them to be customizable for the import. Am I doing this wrong, or is this not possible?

I could edit the labels manually after the rest of the import, but that's not even possible from what I can tell.

Any help would be appreciated!

http://i.imgur.com/QslomcS.png

kbs666 August 29th, 2017 09:15 AM

What part isn't working in the import?

nightpanda2810 August 29th, 2017 09:19 AM

It imports successfully, but it looks like this. Ignore some of the names, experimenting with it right now.

Edit: All the "weapons" on the left are a result of the import. I'm hoping to have a list on the right hand side like my previous image.

http://i.imgur.com/uwHUYPe.png

Farling August 29th, 2017 03:14 PM

Ah, I see what you are trying to do.

The tool isn't designed to put a complete CSV file into a single topic. It is designed to create a separate topic for each row in the CSV file.

It would require a quite different structure to the program to be able to create a single topic with a separate snippet for each row in the CSV file.

nightpanda2810 August 30th, 2017 05:51 AM

Quote:

Originally Posted by Farling (Post 255007)
Ah, I see what you are trying to do.

The tool isn't designed to put a complete CSV file into a single topic. It is designed to create a separate topic for each row in the CSV file.

It would require a quite different structure to the program to be able to create a single topic with a separate snippet for each row in the CSV file.

Ah, damn! Oh well, back to manually creating these lol. Thanks!

kbs666 August 30th, 2017 12:44 PM

But there's no reason with a little spreadsheet magic you couldn't get what you want.

you tried to put one file into each topic which doesn't work. What does work is putting a single row into a single topic. So figure out the structure these topics need, including these loot tables, and make them one row of the CSV.

nightpanda2810 August 31st, 2017 03:50 AM

Quote:

Originally Posted by kbs666 (Post 255103)
But there's no reason with a little spreadsheet magic you couldn't get what you want.

you tried to put one file into each topic which doesn't work. What does work is putting a single row into a single topic. So figure out the structure these topics need, including these loot tables, and make them one row of the CSV.

Interesting, I'll give this a shot. Thanks!

K126 September 19th, 2017 04:11 AM

Might be a dumb question but how do I import text strings containing commas without having the commas being interpreted as delimiters?

Valyar September 24th, 2017 08:13 AM

Quote:

Originally Posted by K126 (Post 256152)
Might be a dumb question but how do I import text strings containing commas without having the commas being interpreted as delimiters?

Enclose the whole string with “ “. It is valid, but must be for every item. I have Whole paragraphs imported from Dark Heresy core rule book this way. For example:

Name,Titles
“Name”,”Title01, Title 02”

Best way to ensure all is in proper format is to fill the table in Excel and export in CSV.

kbs666 September 24th, 2017 08:53 AM

Quote:

Originally Posted by Valyar (Post 256402)
Best way to ensure all is in proper format is to fill the table in Excel and export in CSV.

This is really the easiest way for most things. Building CSV files by hands is very tedious.

Farling September 24th, 2017 01:16 PM

Quote:

Originally Posted by Valyar (Post 256402)
It is valid, but must be for every item.

In a CSV, the "...." is only required around the items which have embedded commas. For simple columns it shouldn't be required.

kbs666 September 24th, 2017 02:22 PM

Quote:

Originally Posted by Farling (Post 256414)
In a CSV, the "...." is only required around the items which have embedded commas. For simple columns it shouldn't be required.

commas, new lines and quotes actually. You need to embed all of them in quotes actually.

In a CSV file commas mark the end of a column and the new line symbol marks the end of the row. Therefore to include either one in your data you need to wrap it in quotes. Since quotes themselves are treated as a special symbol if you need to include a quotation mark you need to wrap it in quotes as well.

This is why I wrote above that for all but the most trivial CSV files it is far easier to build the file in Excel or some other spreadsheet program and then export it as a CSV rather than trying to build it by hand.

K126 October 2nd, 2017 03:11 AM

Thanks a lot! I was aware of the quotes, but I put them around each delimiter and not around the whole text block, which makes it obviously easier. :-)

Madmaxneo October 3rd, 2017 03:17 PM

What is CSV?

MaxSupernova October 3rd, 2017 03:33 PM

Comma Separated Values.

It's a type of file format where each column of data is separated from the next by a comma, and each row ending with a newline character.

It's a pretty universal way of sending tabular data from one place to another. Almost every data source will have a way to read CSV files.

Farling October 3rd, 2017 11:57 PM

Quote:

Originally Posted by MaxSupernova (Post 256877)
Almost every data source will have a way to read CSV files.

And now Realm Works does too (indirectly) :-)

Guyanthalas October 6th, 2017 02:46 PM

I'm importing my first CSV file into this program as I type. Its a list of all the magic spells in 5e. I'm sure I'm going to have to figure some things out with it being overly aggressive on links (curse you 'light' spell!) but I'll figure those out as I go.

This might be outside the scope of what this tool does, but it would be a nice feature to be able to export existing articles, do mass clean ups in excel, then reimport to update in bulk.

Thanks for putting time into this, its an excellent tool!

Guyanthalas October 6th, 2017 03:06 PM

Also, got this error importing my CSV file:

Quote:

The following errors were encountered during import:

Encountered validation error for the import XML: The 'public_name' attribute is invalid - The value '' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:top_level_name_type' - The actual length is less than the MinLength value.

Invalid name specified
I looked over my CSV and I don't think any of the name fields are empty. Any idea what could be going on?

Farling October 7th, 2017 02:35 AM

Quote:

Originally Posted by Guyanthalas (Post 257030)
I looked over my CSV and I don't think any of the name fields are empty. Any idea what could be going on?

Do you have a field which is a single quote character?
Perhaps something like
Quote:

... , \" , ...
Just in case the error message is misleading, the maximum length of the "public_name" is limited to 100 characters.

bishop618 October 8th, 2017 02:55 PM

Hi, I've been getting this specific problem, with a few imports. Can someone please help me with this?
Thanks in advance

The following errors were encountered during import:

Encountered validation error for the import XML: The 'public_name' attribute is invalid - The value '' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:top_level_name_type' - The actual length is less than the MinLength value.

Invalid name specified

Farling October 8th, 2017 03:03 PM

Quote:

Originally Posted by bishop618 (Post 257124)
Hi, I've been getting this specific problem, with a few imports. Can someone please help me with this?
Thanks in advance

The following errors were encountered during import:

Encountered validation error for the import XML: The 'public_name' attribute is invalid - The value '' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:top_level_name_type' - The actual length is less than the MinLength value.

Invalid name specified

Hi, can you PM me links to the original CSV and the resulting XML file?
I will have a look to see what is going on.

bishop618 October 8th, 2017 04:09 PM

Ok I just sent you the links. Thanks for the quick response

Farling October 9th, 2017 12:09 AM

I've had a quick look at the files, and the RWEXPORT file has a blank topic as the very first topic. I suspect this is being created from the blank line that appears in the CSV file (the very last line of the file).

It looks like the CSV import code I'm using treats a blank line as if it was a valid CSV record, so it creates a topic with no data whatsoever.

I will add this as a feature improvement for the next version, to check that the public_name (i.e. the topic title) is not empty.

bishop618 October 9th, 2017 04:59 PM

So how would I fix it/make it work now?

Parody October 9th, 2017 06:00 PM

If the problem is what Farling described, delete any blank lines in the CSV file and (if present) the line ending at the end of the file and try it again.

Farling, it might be better if you checked for blank (post-trimming) lines in your file reading code and errored or ignored them then (or treated them as the end of the file). That'd separate a blank line from a line with empty data ("", "", "", ...) if you care.

Farling October 9th, 2017 11:05 PM

Quote:

Originally Posted by bishop618 (Post 257189)
So how would I fix it/make it work now?

The very last line in the file (which is blank) needs to be deleted.

An updated version of the tool (to be done soon) will ignore blank lines.

bishop618 October 11th, 2017 01:02 PM

Where exactly is this last line? It's still happening

Farling October 11th, 2017 02:03 PM

Quote:

Originally Posted by bishop618 (Post 257281)
Where exactly is this last line? It's still happening

A new version of the tool (v1.7) is now available which addresses this specific issue.

Blank lines in CSV files are now ignored during input, so the table of data at the bottom of the screen won't show any blank lines and, more importantly, no empty topics will be written into the RWEXPORT file.

Please try the latest version to see if it gets you past this little hurdle :-)

bishop618 October 11th, 2017 11:09 PM

Sorry but it's still happening with my imports

Farling October 11th, 2017 11:19 PM

Quote:

Originally Posted by bishop618 (Post 257306)
Sorry but it's still happening with my imports

The CSV file which you sent to me actually seems to work fine. It doesn't produce the blank topic that it seen in the RWEXPORT file that you sent me.

I tried putting a blank line into your CSV immediately after the header row, and that created a bad RWEXPORT file which looked very similar to your RWEXPORT file.

Farling October 12th, 2017 03:13 PM

Thanks for the additional files. I have now tracked down the problem. It is linked to the realm structure having the Herb category as a child category of the General Equipment Article.

When the General Equipment Article is used as the parent topic for your import, my tool is erroneously creating a blank (unnamed) Herb article as the first child of that topic!


All times are GMT -8. The time now is 02:02 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.