Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to schema.json for CSL mappings for format=csljson #134

Open
dstillman opened this issue Apr 3, 2023 · 0 comments
Open

Switch to schema.json for CSL mappings for format=csljson #134

dstillman opened this issue Apr 3, 2023 · 0 comments
Assignees

Comments

@dstillman
Copy link
Member

//
// Ported from cite.js in the Zotero client
//
/**
* Mappings for names
* Note that this is the reverse of the text variable map, since all mappings should be one to one
* and it makes the code cleaner
*/
private static $zoteroNameMap = array(
"author" => "author",
"editor" => "editor",
"bookAuthor" => "container-author",
"composer" => "composer",
"interviewer" => "interviewer",
"recipient" => "recipient",
"seriesEditor" => "collection-editor",
"translator" => "translator"
);
/**
* Mappings for text variables
*/
private static $zoteroFieldMap = array(
"title" => array("title"),
"container-title" => array("publicationTitle", "reporter", "code"), /* reporter and code should move to SQL mapping tables */
"collection-title" => array("seriesTitle", "series"),
"collection-number" => array("seriesNumber"),
"publisher" => array("publisher", "distributor"), /* distributor should move to SQL mapping tables */
"publisher-place" => array("place"),
"authority" => array("court"),
"page" => array("pages"),
"volume" => array("volume"),
"issue" => array("issue"),
"number-of-volumes" => array("numberOfVolumes"),
"number-of-pages" => array("numPages"),
"edition" => array("edition"),
"version" => array("versionNumber"),
"section" => array("section"),
"genre" => array("type", "artworkSize"), /* artworkSize should move to SQL mapping tables, or added as a CSL variable */
"medium" => array("medium", "system"),
"archive" => array("archive"),
"archive_location" => array("archiveLocation"),
"event" => array("meetingName", "conferenceName"), /* these should be mapped to the same base field in SQL mapping tables */
"event-place" => array("place"),
"abstract" => array("abstractNote"),
"URL" => array("url"),
"DOI" => array("DOI"),
"ISBN" => array("ISBN"),
"call-number" => array("callNumber"),
"note" => array("extra"),
"number" => array("number"),
"references" => array("history"),
"shortTitle" => array("shortTitle"),
"journalAbbreviation" => array("journalAbbreviation"),
"language" => array("language")
);
private static $zoteroDateMap = array(
"issued" => "date",
"accessed" => "accessDate"
);
private static $zoteroTypeMap = array(
'book' => "book",
'bookSection' => "chapter",
'journalArticle' => "article-journal",
'magazineArticle' => "article-magazine",
'newspaperArticle' => "article-newspaper",
'thesis' => "thesis",
'encyclopediaArticle' => "entry-encyclopedia",
'dictionaryEntry' => "entry-dictionary",
'conferencePaper' => "paper-conference",
'letter' => "personal_communication",
'manuscript' => "manuscript",
'interview' => "interview",
'film' => "motion_picture",
'artwork' => "graphic",
'webpage' => "webpage",
'report' => "report",
'bill' => "bill",
'case' => "legal_case",
'hearing' => "bill", // ??
'patent' => "patent",
'statute' => "bill", // ??
'email' => "personal_communication",
'map' => "map",
'blogPost' => "post-weblog",
'instantMessage' => "personal_communication",
'forumPost' => "post",
'audioRecording' => "song", // ??
'presentation' => "speech",
'videoRecording' => "motion_picture",
'tvBroadcast' => "broadcast",
'radioBroadcast' => "broadcast",
'podcast' => "song", // ??
'computerProgram' => "book" // ??
);

@dstillman dstillman self-assigned this Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant