[Koha-bugs] [Bug 7961] Local cover images should support CSV link files

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat May 26 13:42:48 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7961

Jared Camins-Esakov <jcamins at cpbibliography.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9190|0                           |1
        is obsolete|                            |

--- Comment #2 from Jared Camins-Esakov <jcamins at cpbibliography.com> ---
Created attachment 9796
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9796&action=edit
Bug 7961 - Local cover images should support CSV link files

Corrent code doesn't have support for filenames which contain spaces
or commans which breaks CSV files saved from spreadsheet similar to:

  12345, "conver image, with spaces.jpg"

This patch tweaks file parsing a bit. We are always splitting line to
only two values (to support commas as part of filename) and removing
spaces only on beginning and end of filename (to cover space after
comma in CSV example above while preserving spaces in filename).

With this change only invalid character in picture filename left
are quotes (") which are commonly used to quote strings with spaces.

Also added is simple debug warn which displays number of cover image
uploaded, biblionumber and filename which is very useful when uploading
huge zip files with covers, because progress can be monitored in log.

Test scenario:

1. collect pictures with spaces and commas in name
2. dump file list into CSV file and add biblio number as first column
3. create zip with CSV file and pictures
4. verify that all pictures got uploaded and linked to biblio records

Signed-off-by: Jared Camins-Esakov <jcamins at cpbibliography.com>
Note that the file name of the CSV should be idlink.txt.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list