User:RfcBot

From Wikidata
Jump to navigation Jump to search
Wikidata Bot This user account is a bot with a bot flag. The bot is operated by Dhx1.

How this bot works[edit]

  1. Loads the latest RFC database (XML variant) from disk or directly from the RFC index file hosted online
  2. Queries Wikidata to match RFC database entries to existing Wikidata items
    1. Check performed via existence of both RfC ID (P892) and instance of (P31) Request for Comments (Q212971)
    2. Whilst code exists for an additional DOI (P356) check, the query is too slow to complete so this method is disabled
  3. For each RFC database entry that does not have a matching Wikidata item already in existence:
    1. Create a new Wikidata item with appropriate label, description and aliases in English (all RFC publications are only in English AFAIK)
    2. Create the following statements completed with a reference to the RFC Index (Q33133762):
      1. instance of (P31)
      2. RfC ID (P892)
      3. title (P1476)
      4. language of work or name (P407)
      5. publisher (P123)
      6. publication date (P577)
      7. DOI (P356)
      8. author name string (P2093)
      9. file format (P2701)
      10. number of pages (P1104)
      11. full work available at URL (P953)
  4. For each RFC database entry that has an existing/matched Wikidata item:
    1. Check that the following statements exist and have a reference to the RFC Index (Q33133762):
      1. instance of (P31)
      2. RfC ID (P892)
      3. title (P1476)
      4. language of work or name (P407)
      5. publisher (P123)
      6. publication date (P577)
      7. DOI (P356)
      8. author name string (P2093)
      9. file format (P2701)
      10. number of pages (P1104)
      11. full work available at URL (P953)

Source code[edit]