User:Legobot/properties.js/Documentation

From Wikidata
Jump to navigation Jump to search
Basic format

{{User:Legobot/properties.js/row|LANGCODE|SOURCE|PROPERTY NUMBER|ITEM|REQUESTOR}}

Required parameters
  • LANGCODE - the language code of the project where you want to pull the pages from.
  • SOURCE - the category or template that will be used to pull a list of pages from.
    • Categories must be prefixed with "Category:", either in English or in the localized variant.
    • Templates must be prefixed with "Template:", either in English or in the localized variant.
    • Only pages which actually transclude the template will be pulled.
    • For both, only mainspace items will be pulled.
    • Example: For en:Category:Women physicists, this would be Category:Women physicists
  • PROPERTY NUMBER - the P# of the property you want to add.
  • ITEM - the Q# of the item the property should link to.
    • Example: For Q43445, this would be Q43445
    • Note: If the property is a string, the bot will read it properly, but the template will show it as a non-existent item.
  • REQUESTOR - The username of the user who requested the addition. This will be used in edit summaries (when they are supported) for accountability.
Optional parameters
  • ignoreprefix - Lets you ignore a set of articles all starting with the same prefix.
    • Example: To skip all "list" articles, you can do |ignoreprefix=List
    • You can separate multiple prefixes with commas, so |ignoreprefix=First,Second,Third
  • ignore - Lets you skip certain articles specifically.
    • Example: To skip "Bad article", you can do |ignore=Bad article
    • You can separate multiple pages with commas, so |ignoreprefix=Bad article,Horrible article,Complete trash
    • Note that the page names must be exact, so spacing and capitalization do matter.
  • nocreate - If supplied, the bot will not create items for pages that don't have them.
    • Note that just by adding |nocreate=something, the bot will not create! |nocreate=no will not do what it seems like.
  • recursion - integer value of how many sub-categories to recurse. Should be used very carefully.
    • Example: To recurse two categories deep, you can do |recursion=2
  • pid2 & qid2 - to add multiple property/item pairs to a request, you can add |pid2=P??|qid2=Q??. You can use as many of these pairs as you want.
PS
  • If there's a feature you want and it isn't listed here, ask Legoktm to see if it can be added. Chances are no one has just thought of it yet!

Instructions for Administrators
  • Do a quick check to make sure the request makes sense.
  • Check that the wiki that is being imported from is listed on this page. If not, poke Legoktm and ask him to add it in the script. (Eventually this will be automated...)
  • Check how many pages will be edited. If it is above 10,000 items, leave it for Legoktm. It would be helpful if you could still leave a note saying the request is fine, but it is just too big.
    • It might be tricky with recursion to get an accurate count, so just estimate. If you're unsure, feel free to leave it for another admin or Legoktm.
  • Copy the request over. Make sure each request is on it's own line, and is just the template. (No preceding *'s or whitespace)
  • Use User:Legobot/properties.js/Nice looking to check that you copied over what you wanted. That page also helps with noticing common formatting errors, like missing a "{" or something.
  • As a tip, the bot checks the page every hour, on the hour. It's recommended you don't add anything near that deadline, in case you notice an error and need to change something.
  • Feel free to approve your own requests, just be careful :)