Skip to content

Commit

Permalink
Merge pull request #982 from sul-dlss/directions
Browse files Browse the repository at this point in the history
Provide directions about making exports
  • Loading branch information
thatbudakguy authored Jul 17, 2023
2 parents 515eaf7 + 76360fa commit e646c02
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 72 deletions.
6 changes: 5 additions & 1 deletion lib/traject/readers/folio_json_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
require 'traject_plus'

module Traject
# A Traject reader for processing MARC JSON from FOLIO via stdin.
# A Traject reader for processing JSON exports from FOLIO via stdin.
# @example An export can be produced by doing:
# require 'traject/readers/folio_postgres_reader'
# record = Traject::FolioPostgresReader.find_by_catkey('a14238203', 'postgres.url' => ENV['DATABASE_URL']
# File.write("a14238203.json", JSON.pretty_generate(record.as_json))
class FolioJsonReader < TrajectPlus::JsonReader
def each(&)
return to_enum(:each) unless block_given?
Expand Down
Loading

0 comments on commit e646c02

Please sign in to comment.