Difference between revisions of "Data Submission Formats"

From ISFDB
Jump to navigation Jump to search
 
(44 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
 +
Data is submitted to the ISFDB either from the online editing tools, or by the [[Web API]]. Accepted submissions are placed in the [[Database_Schema#submissions|submissions]] table in the MySQL database.
 
The data submitted to the ISFDB must be a well-formed XML string. All submissions must contain the following:
 
The data submitted to the ISFDB must be a well-formed XML string. All submissions must contain the following:
  
Line 10: Line 11:
 
A stubbed out version of a generic submission looks like this:
 
A stubbed out version of a generic submission looks like this:
  
 +
<source lang="xml">
 
  <?xml version="1.0" encoding="iso-8859-1" ?>
 
  <?xml version="1.0" encoding="iso-8859-1" ?>
 
  <IsfdbSubmission>
 
  <IsfdbSubmission>
Line 18: Line 20:
 
   </...Type...>
 
   </...Type...>
 
  </IsfdbSubmission>
 
  </IsfdbSubmission>
 +
</source>
  
 
==Author Related Submissions==
 
==Author Related Submissions==
  
There are two data submission types necessary for the upkeep of the authors table: '''AuthorUpdate''' and '''AuthorMerge'''. '''AuthorUpdate''' handles changes made to the author-related tables; it has no side effects on other tables. '''AuthorMerge''' handles merging two authors together; it does have side effects on publication and title mapping tables, as one of the authors is replaced with the other.
+
There are three data submission types necessary for the upkeep of the authors table:
  
===AuthorMerge===
+
* [[XML:AuthorMerge]] - Merges two author records together.
 +
* [[XML:AuthorUpdate]] - Updates an author record.
 +
* [[XML:MakePseudonym]] - Makes an author record a alternate name.
  
The AuthorMerge submission specifies how two author records should be merged. The submission contains three required tags:
+
Note that there are no submission types to create or delete author entries. Author entries are created on demand when a title or publication requires them. Likewise author entries are deleted when no other records refer to them.
 
 
* '''KeepId''' - Required tag. Specifies which author record will be retained.
 
* '''DropId''' - Required tag. Specifies which author record will be dropped.
 
* '''Range''' - Required tag. Specifies the range of changes:
 
** '''TITLES''' - Only merges authors an the canonical_author table.
 
** '''PUBS''' - Only merges authors in the pub_authors and aspub_author tables.
 
** '''ALL''' -  Applies changes to all author mapping tables.
 
 
 
The AuthorMerge submission also contains a number of optional tags. When a merging conflict occurs, these tags are used to specify which version of the data should be used:
 
 
 
* '''Canonical''' - Use when a conflict exists between the canonical names.
 
* '''Legalname''' - Use when a conflict exists between the legal names.
 
* '''Birthplace''' - Use when a conflict exists between the birthplaces.
 
* '''Birthdate''' - Use when a conflict exists between the birthdates
 
* '''Deathdate''' - Use when a conflict exists between the deathdates.
 
* '''Wikipedia''' - Use when a conflict exists between Wikipedia URLs.
 
* '''Imdb''' - Use when a conflict exists between IMDB URLs.
 
 
 
Example:
 
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
  <AuthorMerge>
 
      <Submitter>Rkihara</Submitter>
 
      <Subject>Elliott Dold/Elliott Dold</Subject>
 
      <KeepId>71501</KeepId>
 
      <DropId>84301</DropId>
 
      <Range>ALL</Range>
 
      <Legalname>84301</Legalname>
 
  </AuthorMerge>
 
</IsfdbSubmission>
 
 
 
===AuthorUpdate===
 
 
 
The AuthorUpdate submission updates author information for a single specific author. The submission contains one required tag
 
* '''Record''' - Required tag. Specifies which author record to update.
 
 
 
The AuthorUpdate submission also contains a number of optional tags. These tags should be used whenever an update is made to a particular field. If a particular field is unchaged, it should not be included in the submission. If a field value needs to be deleted (for instance a webpage is decommissioned), the tag value should be empty. The following tags are supported:
 
* '''Canonical''' - Should contain the author's canonical name.
 
* '''Legalname''' - Should contain the author's legal name, in Lastname, Firstname format.
 
* '''Lastname''' - Contains the author's last name. Used to set how the last names with multiple sections should be alphabetized, for instance "von Ruff" instead of "Ruff".
 
* '''Birthplace''' - Should contain the author's birthplace, in Town,State,Country format.
 
* '''Birthdate''' - Should contain the author's birthdate in YYYY-MM-DD format. If the month and day are unknown, YYYY-00-00 should be used.
 
* '''Deathdate''' - Should contain the author's deathdate in YYYY-MM-DD format. If the month and day are unknown, YYYY-00-00 should be used. If the author is known to be dead, but the deathdate is unknown 0000-00-00 is acceptable.
 
* '''Emails''' - Should contain a list of the child tag '''Email''', which should contain the author's email addresses. There should be a separate '''Email''' tag (enclosed within a single '''Emails''' tag) for each email address.
 
* '''Webpages''' - Should contain a list of the child tag '''Webpage''', which should contain the author's website URL. There should be a separate '''Webpage''' tag (enclosed within a single '''Webpages''' tag) for each website.
 
* '''Wikipedia''' - Should contain the URL to the author's Wikipedia article.
 
* '''Imdb''' - Should contain the URL to the author's IMDB filmography.
 
* '''Image''' - Should contain the URL to an author picture.
 
 
 
Example:
 
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
  <AuthorUpdate>
 
    <Record>347</Record>
 
    <Subject>David Duncan</Subject>
 
    <Submitter>ErnestoVeg</Submitter>
 
    <Birthdate>1913-02-17</Birthdate>
 
    <Deathdate>1999-12-26</Deathdate>
 
  </AuthorUpdate>
 
</IsfdbSubmission>
 
  
 
==Publication Related Submissions==
 
==Publication Related Submissions==
  
===PubUpdate===
+
There are four data submission types necessary for the upkeep of the pubs table:
  
The PubUpdate submission updates publication information for a single specific publication. The submission contains one required tag:
+
* [[XML:NewPub]] - Adds a new publication record.
 +
* [[XML:PubDelete]] - Deletes a publication record.
 +
* [[XML:PubUpdate]] - Modifies a publication record.
 +
* [[XML:TitleRemove]] - Removes one or more titles from a publication record.
  
* '''Record''' - Required tag. Specifies which publication record to update.
+
==Title Related Submissions==
  
The PubUpdate submission also contains a number of optional tags. These tags should be used whenever an update is made to a particular field. If a particular field is unchaged, it should not be included in the submission. If a field value needs to be deleted, the tag should be included, but the value should be empty. The following section describes the tags are supported in the metadata section. You should refer to [[Help:Screen:EditPub]] for more detailed information on data entry. The bold text in the description refers to specific labels found in the Help article:
+
There are six data submission types necessary for the upkeep of the titles table:
  
* '''Title''' - The '''Title''' of the publication.
+
* [[XML:LinkReview]] - Links a review record to the reviewed title.
* '''Authors''' - The '''Author''' list associated with the publication. This XML tag will enclose:
+
* [[XML:MakeVariant]] - Makes the current title a variant title.
** '''Author''' - There should be one '''Author''' entry for each individual who wrote or edited the publication.
+
* [[XML:TitleDelete]] - Deletes a title record.
* '''Artists''' - The '''Artist''' list associated with the publication. This XML tag will enclose:
+
* [[XML:TitleMerge]] - Merges two or more title records.
** '''Artist''' - There should be one '''Artist''' entry for each individual who wrote or edited the publication.
+
* [[XML:TitleUnmerge]] - Unmerges one or more title records.
* '''Tag''' - Unique ASCII identifier for the publication.
+
* [[XML:TitleUpdate]] - Modifies a title record.
* '''Year''' - The '''Year''' of publication.
+
* [[XML:VariantTitle]] - Adds a variant title to the current title.
* '''Pages''' - The number of '''Pages''' in the publication.
 
* '''Binding''' - The '''Pub Format''' of the publication.
 
* '''PubType''' - The '''Pub Type''' type of the publication.
 
* '''Isbn''' - The '''ISBN / Catalog #''' of the publication.
 
* '''Price''' - The '''Price''' of the publication.
 
* '''Image''' - The '''Image URL''' associated with the publication cover art.
 
* '''Note''' - A '''Note''' specific to this publication.
 
* '''Publisher''' - The '''Publisher''' of the publication.
 
* '''Content''' - For non-novels, some amount of content may be associated with the publication. Only those titles undergoing change should be included in this section. If no titles are modified, the '''Content''' section must be present, although it will be empty. Any number of the following content type entries are supported:
 
** '''ContentTitle''' - This is for normal content, such as short stories or essays.
 
** '''ContentReview''' - This is a specialized format for reviews, taking into account the author writing the review, and the author who wrote the work being reviewed.
 
** '''ContentInterview''' - This is a specialized format for interviews, taking into account the author that conducted the interview, and the author who was interviewed.
 
  
====ContentTitle====
+
==Series Related Submissions==
Refer to [[Help:Screen:EditPub#General_contents]] for detailed data-entry help:
 
* '''Record''' - The record number of the title. If missing the title is considered new.
 
* '''cTitle''' - The name of the title.
 
* '''cAuthors''' - The author(s) of the title. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cDate''' - The copyright date of the title.
 
* '''cPage''' - The page the title appears on.
 
* '''cType''' - The '''Entry Type''' of the title.
 
* '''cLength''' - The '''Length''' of the title.
 
  
====ContentReview====
+
There is one series-related data submission type:
Refer to [[Help:Screen:EditPub#Reviews]] for detailed data-entry help:
 
* '''Record''' - The record number of the title. If missing the review is considered new.
 
* '''cTitle''' - The name of the title.
 
* '''cBookAuthors''' - The author(s) of the book being reviewed. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cReviewers''' - The author(s) writing the review. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cDate''' - The copyright date of the review.
 
* '''cPage''' - The page the review appears on.
 
  
====ContentInterview====
+
* [[XML:SeriesUpdate]] - Updates a series record.
Refer to [[Help:Screen:EditPub#Interviews]] for detailed data-entry help:
 
* '''Record''' - The record number of the title. If missing the interview is considered new.
 
* '''cTitle''' - The name of the title.
 
* '''cInterviewee''' - The author(s) conducting the interview. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cInterviewer''' - The author(s) being interviewed. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cDate''' - The copyright date of the interview.
 
* '''cPage''' - The page the interview appears on.
 
  
Example:
+
Note that there are no submission types to create or delete series entries. Series entries are created on demand when a title requires them. There is a submission type to delete an empty series, but it shouldn't be used via the Web API.
  
<?xml version="1.0" encoding="iso-8859-1" ?>
+
==Awards Related Submissions==
<IsfdbSubmission>
 
  <PubUpdate>
 
    <Record>56773</Record>
 
    <Submitter>Davecat</Submitter>
 
    <Subject>Analog Science Fact -&gt; Science Fiction, September 1962</Subject>
 
    <Note>Vol. LXX, No. 1.</Note>
 
    <Content>
 
      <ContentTitle>
 
        <Record>772165</Record>
 
        <cTitle>Hugos and Others</cTitle>
 
        <cAuthors>The Editor</cAuthors>
 
      </ContentTitle>
 
      <ContentTitle>
 
        <Record>54317</Record>
 
        <cLength>ss</cLength>
 
      </ContentTitle>
 
      <ContentReview>
 
        <cTitle>The Sixth Galaxy Reader</cTitle>
 
        <cBookAuthors>H. L. Gold</cBookAuthors>
 
        <cReviewers>P. Schuyler Miller</cReviewers>
 
        <cDate>1962-09-00</cDate>
 
        <cPage>152</cPage>
 
      </ContentReview>
 
      <ContentInterview>
 
        <cTitle>Dan Simmons Interview</cTitle>
 
        <cInterviewees>Dan Simmons</cInterviewees>
 
        <cInterviewers>Bob Morrish</cInterviewers>
 
        <cDate>1990-00-00</cDate>
 
      </ContentInterview>
 
    </Content>
 
  </PubUpdate>
 
</IsfdbSubmission>
 
  
===PubDelete===
+
There are three data submission types necessary for the upkeep of the awards table:
  
The PubDelete submission deletes the specified publication record. The submission contains one required tag:
+
* [[XML:NewAward]] - Creates a new award record.
* '''Record''' - Required tag. Specifies which author record to delete.
+
* [[XML:AwardDelete]] - Deletes an award record.
 +
* [[XML:AwardUpdate]] - Updates an award record.
  
Optional tag:
+
==Publisher Related Submissions==
* '''Reason''' - The reason the publication is being deleted.
 
  
Example:
+
There are two data submission types necessary for the upkeep of the publishers table:
  
<?xml version="1.0" encoding="iso-8859-1" ?>
+
* [[XML:PublisherUpdate]] - Updates a publisher record.
<IsfdbSubmission>
+
* [[XML:PublisherMerge]] - Merges two or more publisher records.
  <PubDelete>
 
    <Subject>Mutants</Subject>
 
    <Submitter>Mhhutchins</Submitter>
 
    <Record>179041</Record>
 
    <Reason>No reason given.</Reason>
 
  </PubDelete>
 
</IsfdbSubmission>
 
 
 
===NewPub===
 
  
The NewPub submission generates new publication information for a single specific publication. The submission contains  contains a number of optional tags. These tags should be used whenever the relevant data is available for a particular field. The following section describes the tags are supported in the metadata section. You should refer to [[Help:Screen:NewPub]] for more detailed information on data entry. The bold text in the description refers to specific labels found in the Help article:
+
Note that there are no submission types to create or delete publisher entries. Publisher entries are created on demand when a publication requires them. Likewise publisher entries are deleted when no other publications refer to them.
  
* '''Title''' - The '''Title''' of the publication.
+
==See Also==
* '''Authors''' - The '''Author''' list associated with the publication. This XML tag will enclose:
+
* [[Web API]] -- Page that describes the API within which these formats may be used
** '''Author''' - There should be one '''Author''' entry for each individual who wrote or edited the publication.
+
* [[Help:Screen:EditPub]] -- detailed help on the various publication-level fields and how they are used.
* '''Artists''' - The '''Artist''' list associated with the publication. This XML tag will enclose:
+
* [[Help:Screen:EditTitle]] -- detailed help on the various title-level fields and how they are used.
** '''Artist''' - There should be one '''Artist''' entry for each individual who wrote or edited the publication.
 
* '''Tag''' - Unique ASCII identifier for the publication. Used for magazines.
 
* '''Year''' - The '''Year''' of publication.
 
* '''Pages''' - The number of '''Pages''' in the publication.
 
* '''Binding''' - The '''Pub Format''' of the publication.
 
* '''PubType''' - The '''Pub Type''' type of the publication.
 
* '''Isbn''' - The '''ISBN / Catalog #''' of the publication.
 
* '''Price''' - The '''Price''' of the publication.
 
* '''Image''' - The '''Image URL''' associated with the publication cover art.
 
* '''Note''' - A '''Note''' specific to this publication.
 
* '''Publisher''' - The '''Publisher''' of the publication.
 
* '''Parent''' - Used to automerge the publication. The parent id is record number of the parent title.
 
* '''Content''' - For non-novels, some amount of content may be associated with the publication. Only those titles undergoing change should be included in this section. If no titles are modified, the '''Content''' section must be present, although it will be empty. Any number of the following content type entries are supported:
 
** '''ContentTitle''' - This is for normal content, such as short stories or essays.
 
** '''ContentReview''' - This is a specialized format for reviews, taking into account the author writing the review, and the author who wrote the work being reviewed.
 
** '''ContentInterview''' - This is a specialized format for interviews, taking into account the author that conducted the interview, and the author who was interviewed.
 
  
====ContentTitle====
 
Refer to [[Help:Screen:NewPub#General_contents]] for detailed data-entry help:
 
* '''cTitle''' - The name of the title.
 
* '''cAuthors''' - The author(s) of the title. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cDate''' - The copyright date of the title.
 
* '''cPage''' - The page the title appears on.
 
* '''cType''' - The '''Entry Type''' of the title.
 
* '''cLength''' - The '''Length''' of the title.
 
  
====ContentReview====
 
Refer to [[Help:Screen:NewPub#Reviews]] for detailed data-entry help:
 
* '''cTitle''' - The name of the title.
 
* '''cBookAuthors''' - The author(s) of the book being reviewed. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cReviewers''' - The author(s) writing the review. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cDate''' - The copyright date of the review.
 
* '''cPage''' - The page the review appears on.
 
 
====ContentInterview====
 
Refer to [[Help:Screen:NewPub#Interviews]] for detailed data-entry help:
 
* '''cTitle''' - The name of the title.
 
* '''cInterviewee''' - The author(s) conducting the interview. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cInterviewer''' - The author(s) being interviewed. Note that multiple authors are separated with a '''+'''; they are not enclosed in separate XML tags.
 
* '''cDate''' - The copyright date of the interview.
 
* '''cPage''' - The page the interview appears on.
 
Example:
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
  <NewPub>
 
  <Submitter>Ahasuerus</Submitter>
 
  <Subject>Sweet and Deadly</Subject>
 
  <Parent>185660</Parent>
 
  <Title>Sweet and Deadly</Title>
 
  <Year>1981-00-00</Year>
 
  <Publisher>Houghton Mifflin</Publisher>
 
  <Pages>179</Pages>
 
  <Binding>hc</Binding>
 
  <PubType>NOVEL</PubType>
 
  <Isbn>0395305322</Isbn>
 
  <Price>$8.95</Price>
 
  <Note>Data from OCLC record 6915310.</Note>
 
  <Authors>
 
    <Author>Charlaine Harris</Author>
 
  </Authors>
 
  <Content>
 
  </Content>
 
  </NewPub>
 
</IsfdbSubmission>
 
 
==Title Related Submissions==
 
 
===TitleUpdate===
 
 
The TitleUpdate submission updates title information for a single specific title. The submission contains one required tag:
 
 
* '''Record''' - Required tag. Specifies which title record to update.
 
 
The TitleUpdate submission also contains a number of optional tags. These tags should be used whenever an update is made to a particular field. If a particular field is unchanged, it should not be included in the submission. If a field value needs to be deleted, the tag should be included, but the value should be empty. The following section describes the tags are supported in the metadata section. You should refer to [[Help:Screen:EditTitle]] for more detailed information on data entry. The bold text in the description refers to specific labels found in the Help article:
 
 
* '''Title''' - The '''Title''' of the title.
 
* '''Authors''' - The '''Author''' list associated with the title. This XML tag will enclose:
 
** '''Author''' - There should be one '''Author''' entry for each individual who wrote or edited the title.
 
* '''BookAuthors''' - The '''Author''' list associated with the authors who's work appeared in this review. This XML tag will enclose:
 
** '''BookAuthor''' - There should be one '''Author''' entry for each individual who wrote the title being reviewed.
 
* '''Interviewees''' - The '''Author''' list associated with who was interviewed. This XML tag will enclose:
 
** '''Interviewee''' - There should be one '''Author''' entry for each individual who was interviewed.
 
* '''Year''' - The '''Date''' of publication.
 
* '''Series''' - The '''Series Name''' this title is associated with.
 
* '''Seriesnum''' - The '''Series Number''' of this title.
 
* '''Storylen''' - The '''Length''' of this title.
 
* '''Wikipedia''' - A URL to a '''Wikipedia Entry''' on this title.
 
* '''TitleType''' - The '''Entry Type''' of this title.
 
* '''Synopsis''' - The '''Synopsis''' of this title.
 
* '''Note''' - A '''Note''' associated with this title.
 
 
Example:
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
  <IsfdbSubmission>
 
    <TitleUpdate>
 
    <Record>11114</Record>
 
    <Submitter>DESiegel60</Submitter>
 
    <Subject>Breed to Come</Subject>
 
    <Year>1972-00-00</Year>
 
  </TitleUpdate>
 
</IsfdbSubmission>
 
 
===TitleMerge===
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
  <TitleMerge>
 
    <KeepId>7287</KeepId>
 
    <DropId>170262</DropId>
 
    <Title>7287</Title>
 
    <Year>7287</Year>
 
    <Series>7287</Series>
 
    <Seriesnum>7287</Seriesnum>
 
  </TitleMerge>
 
</IsfdbSubmission>
 
 
===TitleDelete===
 
 
Example:
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
  <TitleDelete>
 
    <Subject>The Petrified Planet</Subject>
 
    <Submitter>Ahasuerus</Submitter>
 
    <Record>825280</Record>
 
    <Reason>Dup title.</Reason>
 
  </TitleDelete>
 
</IsfdbSubmission>
 
  
===TitleUnmerge===
+
[[Category:Data Submission Formats]]

Latest revision as of 10:21, 27 June 2019

Introduction

Data is submitted to the ISFDB either from the online editing tools, or by the Web API. Accepted submissions are placed in the submissions table in the MySQL database. The data submitted to the ISFDB must be a well-formed XML string. All submissions must contain the following:

  • An xml header utilizing version 1.0, and a recommended encoding of iso-8859-1.
  • The data must be enclosed within a set of IsfdbSubmission tags.
  • The data must contain a valid registered user within a set of Submitter tags.
  • The data must contain a subject heading within a set of Subject tags. This subject is displayed in the moderator queue, and is not integrated into the ISFDB data.

A stubbed out version of a generic submission looks like this:

 <?xml version="1.0" encoding="iso-8859-1" ?>
 <IsfdbSubmission>
   <...Type...>
      <Submitter>Registered_User_Name</Submitter>
      <Subject>Subject Line That Will Appear in Moderator Queue</Subject>
      ...
   </...Type...>
 </IsfdbSubmission>

Author Related Submissions

There are three data submission types necessary for the upkeep of the authors table:

Note that there are no submission types to create or delete author entries. Author entries are created on demand when a title or publication requires them. Likewise author entries are deleted when no other records refer to them.

Publication Related Submissions

There are four data submission types necessary for the upkeep of the pubs table:

Title Related Submissions

There are six data submission types necessary for the upkeep of the titles table:

Series Related Submissions

There is one series-related data submission type:

Note that there are no submission types to create or delete series entries. Series entries are created on demand when a title requires them. There is a submission type to delete an empty series, but it shouldn't be used via the Web API.

Awards Related Submissions

There are three data submission types necessary for the upkeep of the awards table:

Publisher Related Submissions

There are two data submission types necessary for the upkeep of the publishers table:

Note that there are no submission types to create or delete publisher entries. Publisher entries are created on demand when a publication requires them. Likewise publisher entries are deleted when no other publications refer to them.

See Also

  • Web API -- Page that describes the API within which these formats may be used
  • Help:Screen:EditPub -- detailed help on the various publication-level fields and how they are used.
  • Help:Screen:EditTitle -- detailed help on the various title-level fields and how they are used.