• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to import PDF with CSV index
#1
I'm trying to import a big pdf with a csv index, and I'm obviously missing something.

I tap IMPORT and tap CSV or PDF Bookmarks, and get the file select screen, where I can navigate / find both the PDF and the CSV files.  (But I can only select one of them, not both.)

If I select the PDF file, the Select Songs to Import screen appears, but it uses the bookmarks in the PDF file to parse the songs. (The bookmarks in the PDF are incomplete.)

If I select the CSV file, the Select Songs to Import screen appears, but it has no songs to select.

So how do I use the CSV to index / parse the PDF?

EDIT:
Reading this thread https://zubersoft.com/mobilesheets/forum...4#pid13484
1. I named both files the same name (and removed spaces from the filenames) - still same outcome.
2. I inserted a first line into the CSV file with the following path to the PDF:
/mnt/sdcard/'0 Music Scores'/1FirehouseJB.pdf
I've assumed that I need to enclose in quotes, the directory with spaces in its name.
With this in place, after selecting the CSV, I get this message:
"All columns specified in the CSV are invalid"
Which suggests I have something wrong in that first line and it's not being recognized as a path to the PDF.

Many thanks in advance.
Reply
#2
The preconditions for a successful CSV import are:
1.) CSV and PDF file must have the same filename (Except the extension) e.g. MyFakebook.CSV and MyFakebook.PDF
2.) CSV and PDF file must be in the same folder on the tablet
3.) semicolon must be used as separator in the CSV file
4.) The first line of the CSV file must contain the column titles for the metadata items to be used e.g.
title;pages;keys;source types;composers;years;tempos;signatures;albums;
5.) "title" and "pages" are mandatory, all other columns are optional
6.) all lines of the CSV file must contain the correct number of separators

Android and Win10 UI are slightly different:
on Android you just open the CSV, the PDF is found automatically via the matching filename
on Win10 you select the CSV first, then, in a second step, you select the PDF

@chrisss: I shared folders of my GoogleDrive with some examples with you. If these examples do not answer your questions, send me a pair of files that demonstrate your issues . I'll take a look at them and I'm sure I'm able to fix the CSV.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#3
itsme - I got it working - thanks very much for your help.
I believe the problem was that I had the file path in the first line, IN ADDITION to having the files named the same and in the same folder.  Took that out and it worked.

Thanks very much for your help ... and for sharing the CJB and Paul Hardy files!

best,
Chris
Reply
#4
(05-13-2018, 11:32 PM)chrisss Wrote: itsme - I got it working - thanks very much for your help.
I believe the problem was that I had the file path in the first line, IN ADDITION to having the files named the same and in the same folder.  Took that out and it worked.

Thanks very much for your help ... and for sharing the CJB and Paul Hardy files!

best,
Chris
Reply
#5
hi there can someone explain how I change the CSV file when I try to import I get, all columns are  invalid message, itsme says you have to use a semicolon as separator, how do you do that, thanks
Reply
#6
(05-21-2018, 08:47 PM)art Wrote: hi there can someone explain how I change the CSV file when I try to import I get, all columns are  invalid message, itsme says you have to use a semicolon as separator, how do you do that, thanks

Art,
I've attached a complete csv file that I've used successfully to import the Firehouse Jazz Band book as separate songs.  In case you have trouble seeing that, here is an excerpt of the first several lines:

title;pages;keys;composers;collections;genres
Title page;1;;;Firehouse JB;Dixieland
TOC;3-8;;;Firehouse JB;Dixieland
Sunday;9;Bb;Chester Conn, Benny Kreuger, Jule Styne 1926 T: Ned Miller;Firehouse JB;Dixieland
Bill Bailey, Won't You Please;10-11;F;Hughie Cannon 1902;Firehouse JB;Dixieland
Doodle-Doo-Doo;12;Bb;;Firehouse JB;Dixieland
Oh, By Jingo!;13;F;;Firehouse JB;Dixieland
Tishomingo Blues;14-15;Ab;;Firehouse JB;Dixieland

I don't know exactly what file you're starting with, or what tools you have but I'll offer a couple suggestions.  

If you're starting with a spreadsheet, Microsoft Excel won't export to CSV with a semi-colon.  But LibreOffice will - it's free open source. In LibreOffice, in the export dialog box, you simply check the box to choose a semicolon separator.

You MIGHT be able to change a comma separated file to a semicolon separated file using a text editor, doing a 'global' search+replace. 2 things might "break" it:
- if there are commas in any of the titles or other field data, a global replace will also replace those commas, messing up the field parsing.
- some text editors add CR and / or LF characters to the ends of lines, also messing things up.

You could also attach the file you're trying to work with, and we might be able to help.
Reply
#7
hi chriss, i have all the pdf files for real books, all downloaded into MS,  but importing the csv files has been a real pain, but i downloaded a couple of real book csv files from the forum, cirio has posted a few, and they seem to work, after putting the csv file in the same folder as the pdf, still have to edit though as the titles dont match up to the songs, as in the realbooks you have photographs which puts the pages out of sync, so the only way is to change them manually which is a serious pain in the arse, unless there is an easier way
Reply
#8
The easiest way to proof-read and correct CSV files (in my opinion) is opening them in LibreOffice Calc. In a spreadsheet program it's not too difficult to add or remove lines or correct pages or title. I think I could use semicolons also in Excel, but I'm not sure. It's a long time ago that I switched from Excel to LibreOffice.
Alas the PDFs cannot be shared with the CSVs because of copyright reasons. And there are many different editions around.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#9
(05-22-2018, 12:00 AM)art Wrote: ... pages out of sync, so the only way is to change them manually which is a serious pain ... unless there is an easier way 
+ 1 to itsme's answer - 
Edit the CSV in a spreadsheet on a computer with a decent screen, real keyboard, + mouse, before you load it onto the tablet - line up the titles+pages with whatever version of the PDF you have. Still a little bit of a project but in my experience considerably quicker than working on the tablet.

I've been on LibreOffice for a good while now too. The last version of Excel I used was 2003 and that one just did comma's as delimiters, IIRC. Maybe newer versions can do semicolons but I wouldn't know.
Reply
#10
hi there could somebody look at this csv and tell me what I need to do to edit the separator, I can only open this in read-only, this is all new to me so any help would be appreciated


Attached Files
.csv   Real Book 2.csv (Size: 12.62 KB / Downloads: 19)
Reply
#11
(05-24-2018, 02:33 AM)art Wrote: hi there could somebody look at this csv and tell me what I need to do to edit the separator, I can only open this in read-only, this is all new to me so any help would be appreciated

Here's your file back with:
- semicolon separators - I did this in LibreOffice
- added a first row defining the fields as title, pages, collection

I don't have the Real Book 2 that you're trying to import so you may have to edit this further to get it to work right, but this file at least has semicolon separators.  Hope you don't mind the suggestion ... I'd think you'd do well to get LibreOffice on your computer (free) so you can edit + re-save it with semicolon separator at your convenience. I don't know of any other way to do it except manually change a couple hundred characters in a text editor.

Hope it helps.


Attached Files
.csv   Real Book 2.csv (Size: 12.62 KB / Downloads: 18)
Reply
#12
youre a star chriss, i dragged the file into Libreoffice, and i had semicolon ticked, but it didnt seem to change anything, can you explain the procedure, as i have other books i need to alter, many thanks
Reply
#13
You might want to take a look here:
https://zubersoft.com/mobilesheets/forum...p?tid=3276
https://zubersoft.com/mobilesheets/forum...p?tid=3450
or just search the forum for CSV files.
A number of CSVs already exist.
It would be great (and save a lot of time and effort) if more forum members would share their work.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#14
I think you may need to save from LibreOffice under a new CSV filename, to get the delimiter character to change from comma to semicolon - it's hard to know for sure 'from a distance'. I can "look" at a CSV file with a text editor to check what the delimiter is. I use Leafpad but I'm on Ubuntu Linux - on Windows, maybe you can look with Notepad?? Probably better not to save the file from Notepad - I believe Notepad does something to the end-of-line characters, but I'm not an expert on that - maybe someone else can say for sure.

Then you'll probably need to delete the original (comma-delimited) CSV file, and rename the new CSV file (with semicolons), so it's the filename that you need to get MobileSheets to recognize it as paired with the PDF.

Hope that helps -
C
Reply
#15
thanks for editing my real book file, the problem is now that when i import the csv file and the pdf, the select songs to import file that pops up,  it has all the songs listed, when i select all, it just imports all the songs into the song list, and not in the collection folder, it doesnt seem to be linking to the real book pdf,  tried it several times and it keeps duplicating the files in the song list, so i now have about four of each song,
Reply




Users browsing this thread:
3 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.