Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
ccd0fb50
Commit
ccd0fb50
authored
6 years ago
by
Bastien Abadie
Browse files
Options
Downloads
Patches
Plain Diff
A bot more robust csv parsing
parent
df5f54fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!26
Import surfaces
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/documents/surface.py
+5
-1
5 additions, 1 deletion
arkindex/documents/surface.py
with
5 additions
and
1 deletion
arkindex/documents/surface.py
+
5
−
1
View file @
ccd0fb50
...
...
@@ -142,7 +142,11 @@ class SurfaceImporter(object):
with
open
(
self
.
csvpath
)
as
csvfile
:
reader
=
csv
.
reader
(
csvfile
,
delimiter
=
'
;
'
)
next
(
reader
)
# Skip header
self
.
csvdata
=
[
CSVRow
.
_make
(
row
[:
3
])
for
row
in
reader
if
len
(
row
[
0
])
>
0
]
self
.
csvdata
=
[
CSVRow
(
*
row
[:
3
])
for
row
in
reader
if
row
and
len
(
row
[
0
])
>
0
]
self
.
raw_volume_names
=
set
(
row
.
volume_name
for
row
in
self
.
csvdata
)
self
.
raw_folios
=
set
((
row
.
volume_name
,
row
.
folio
)
for
row
in
self
.
csvdata
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment