Skip to content

Commit

Permalink
Fix the quoting for subguide importing (#98)
Browse files Browse the repository at this point in the history
add example link for puliiif production

Co-authored-by: Bess Sadler <[email protected]>
Co-authored-by: Carolyn Cole <[email protected]>
Co-authored-by: Jane Sandberg <[email protected]>
  • Loading branch information
4 people authored Jun 29, 2023
1 parent 4d7fbb3 commit a15f538
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/services/sub_guide_loading_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(csv_location: nil)
end

def import
sub_guide_card_data = CSV.parse(File.read(csv_location), headers: true)
sub_guide_card_data = CSV.parse(File.read(csv_location), headers: true, liberal_parsing: true)
sub_guide_card_data.each do |entry|
import_sub_guide_card(entry)
end
Expand Down
2 changes: 2 additions & 0 deletions docs/image-processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ To verify that the images have uploaded correctly: https://puliiif-staging.princ

Ex: https://puliiif-staging.princeton.edu/iiif/2/imagecat-disk1-0012-A1087-0000.0078/full/,500/0/default.jpg

This is an example link of an image in puliiif production: https://puliiif.princeton.edu/iiif/2/imagecat-disk1-0675-B1764-0000.0219/full/,500/0/default.jpg

## Helpful tmux tips

If we need to delete a tmux session, we can run the following command:
Expand Down
3 changes: 2 additions & 1 deletion spec/fixtures/subguide_card_fixture.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ ID,heading,sortid,parentid,path,heading,sortid,parentid,path
2,Afdeling natuurkunde,50350.5,50345.5,9/0091/A3067,Afdeling natuurkunde,50350.5,50345.5,9/0091/A3067
3,Afdeling voor ...,50351.5,50345.5,9/0091/A3038,Afdeling voor ...,50351.5,50345.5,9/0091/A3038
4,(Without subdivision),50352.5,540.5,sub,(Without subdivision),50352.5,540.5,sub
5,(As author),50353.5,50352.5,sub,(As author),50353.5,50352.5,sub
5,(As author),50353.5,50352.5,sub,(As author),50353.5,50352.5,sub
57,Nauchnyi sovet "Istoriia istoricheskoi nauki " ... 8/0097/A3100,50405.5,50358.5,8/0097/A3100,Nauchnyi sovet "Istoriia istoricheskoi nauki " ... 8/0097/A3100,50405.5,50358.5,8/0097/A3100
2 changes: 1 addition & 1 deletion spec/services/sub_guide_loading_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
it 'imports all data from the CSV file' do
expect(SubGuideCard.count).to eq 0
sgls.import
expect(SubGuideCard.count).to eq 5
expect(SubGuideCard.count).to eq 6
end
end

0 comments on commit a15f538

Please sign in to comment.