eric.convert_eric_csv_to_json

Convert ERIC open records CSV to JSON.

ERIC_open_records.csv must exist in the same directory as this script. ERIC_open_records.json must not exist before running this script.

Edit ERIC_open_records.csv in a text editor and change the first line (column headers): id,pdf-url,title,description,e_fulltextauth,source,publicationdateyear,abstractor, peerreviewed,e_yearadded,iesfunded,e_datemodified,publisher,ieslinkpublication,url, sourceid,ieswwcreviewed,ieslinkwwcreviewguide,ieslinkdatasource,subject,author, authorxlink,educationlevel,publicationtype,iesgrantcontractnum, iesgrantcontractnumxlink,language,institution,identifiersgeo,sponsor,identifierstest, issn,iescited,identifierslaw,audience,isbn

This removes instances of _ - ` and duplicates of the form `x - x.

Convert the data in the CSV file to a JSON file. * uv run –script convert_eric_csv_to_json.py

Format the JSON file with Python’s built-in json.tool: * python3 -m json.tool ERIC_open_records.json ERIC_open_records.json

Make a pydantic model from the JSON file: * uv tool run –from=datamodel-code-generator datamodel-codegen –input ERIC_open_records.json –input-file-type json –output eric_models.py

Attributes

here

msg

Module Contents

eric.convert_eric_csv_to_json.here
eric.convert_eric_csv_to_json.msg = 'Will not overwrite existing file: Uninferable'