muldjord / skyscraper

Powerful and versatile game scraper written in c++
GNU General Public License v3.0
489 stars 128 forks source link

local import process - images are importing, but textual data is not #292

Closed troystram closed 3 years ago

troystram commented 3 years ago

I'm having an issue where any text data files that I put in aren't being imported. Images seem to work fine. I've attached a zip file containing some samples of my import folder located at: /opt/retropie/configs/all/skyscraper/import

The files I'm trying to import are located in the Ports subdirectory (I'm not using the highest level folders in the imports directory).

I've been through the documents multiple times trying to resolve this, but I haven't been able to figure it out. I've also tried remaking the xml files multiple times using the definitions.dat file, and also re-creating the definitions.dat file. I don't think I'm doing anything dumb, but if I am I apologize in advance. I am using the latest version of skyscraper (3.6.7) import.zip

muldjord commented 3 years ago

When you use a subfolder using the platform name such as ports, you need the definitions.dat inside the ports folder. :) I'm guessing that's the problem. This allows you to use a different format for different platforms. Artwork works because it doesn't require the definitions.dat file to work.

troystram commented 3 years ago

Hmm, I tried copying the definitions.dat file to the ports level as well and that didn't seem to do anything either. I know it had it there previously thinking that may be the issue. I also tried deleting the ports folder and copying everything to the main folders inside of the imports folder directly. It's still not importing any text data. Good to know that the definitions.dat file needs to exist at the subfolder level though. Thanks.

muldjord commented 3 years ago

Hmm, I just had a look at your xml files in a hex editor. It seems you have used Windows line-endings (new line carriage return instead of just newline). This is an issue probably. The definitions.dat just has newlines. It will make it look for incorrect end-tags.

troystram commented 3 years ago

Okay, thanks for taking a look. I'll check it out.

muldjord commented 3 years ago

I think that is the issue. I just had a look at the code too, and actually it will fall back to the definitions.dat in the import folder if it doesn't find one inside the ports folder. So you don't have to move it into the ports folder as I mentioned earlier, though you can.

troystram commented 3 years ago

Okay, thanks for the information. I used a program called Dos2Unix and that fixed the files that I was working with. Since I'm using windows to create the files in Notepad++ then uploading them to the Pi, that seems to be what caused the issue. I'll just have to remember to convert them using Dos2Unix before uploading them to the Pi.

muldjord commented 3 years ago

Glad you got it working. I've added a note about this specific problem to the import docs here.

EDIT: Btw, I am almost 100% certain Notepad++ has a way to use Unix newlines per default, in case you want to skip the Dos2unix step. Windows will understand both, so I don't think there's ever much reason to use newline + carriage return anymore.

It's a relic from back when text was send directly to dot matrix printers, where the text needed to tell the printer to move the head / carriage back to the beginning of the line before printing the next line.

troystram commented 3 years ago

Thanks, I was already looking into how to do it in N++, I figured there had to be a way. There's a way to show them at least in N++ so I have that option on now.