Help:URL2Commons

From Wikisource
Jump to navigation Jump to search
URL2Commons

Instructions for using the URL2Commons tool for uploading files to Commons from elsewhere on the internet.

If uploading one or more files from another site on the Internet, this can be automated with Magnus Manske's tool on Wikimedia Toolforge.

Bug reports or feature requests concerning the tool can be done on Bitbucket.

Start

[edit]

Go to URL2Commons The URL2Commons tool initially appears as follows:

Initial state of the URL2Commons tool, with two main panels.
URL2Commons

There are two panels, labelled "URLs" and "Description". The lower, Description, panel is preloaded with a blank copy of Commons' {{information}} template, with the variables $DESCRIPTOR$ and $URL$.

Completing the form

[edit]
  1. In the upper, URLs, panel: paste the URL of each file to be uploaded on a new line. (Blank lines can be left between each URL for clarity but this is not necessary)
  2. (Optional) If the filename on Commons should be different than the original filename, enter a space and the Commons filename after the URL.
  3. (Optional) If a specific description is required for each file, especially when uploading multiple different at one time, enter a pipe, "|", followed by the individual description. This can follow the new filename in step 2 or follow the URL if step 2 has been omitted.
    • The variable $DESCRIPTOR$ will be replaced with this individual description. If necessary, the description can be repurposed to enter a unique date or other details. If so, just move the $DESCRIPTOR$ in the lower panel to the appropriate parameter or location.
    • Used altogether these options will appear as:
      Original URL New filename |Individual description used by $DESCRIPTOR$
      Where the red text the is required URL, the black text is the optional new filename and the green text is the optional description.
    • For example:
      http://www.example.com/book.djvu foo.djvu |Scanned copy of Foo by Bar.
  4. If you are uploading books: In the lower panel, Description, replace the {{information}} template with Commons' {{book}} template. Remember to replace the $DESCRIPTOR$ and $URL$ against the correct parameters. See Book Template (below) for a copy of the replacement code.
  5. In the lower panel, fill in the details for the file(s) to be uploaded. If more than one file is to be uploaded, remember to make all of this data correct for all files. Any data unique to a specific file should be entered in the upper panel to replace the $DESCRIPTOR$ variable. Note that general text can be placed in the same line as the variable, so it can, for example, be used to insert as little as a single word for each file, or as much as several sentences in one parameter.
    • If more than one parameter is unique for specific files, this can be edited as normal after the upload.
  6. Enter the appropriate license for your file(s). A list of Commons' license templates can be found here (they are mostly similar or identical to Wikisource templates).
  7. Add any categories for your file(s).
    • For DjVu files, add the category [[Category:DjVu files in English]].
    • For PDF files, add the category [[Category:PDF files in English]].
    • For everything else, try the category [[Category:English Wikisource books]].
    • Alternatively or additionally: Create a new category for the book and add this category to your file. The new category should itself be categorised into one of the previously listed categories. This is especially useful for books with many illustrations, or other derivative files, which should all be collected in one place. For example, Category:Cartoon portraits and biographical sketches of men of the day (book).


Example completed forms
(Click the images for larger versions)
URL2Commons tool with data entered to upload a single file.
URL2Commons tool with data entered to upload a single file.
URL2Commons tool with data entered to upload a multiple files.
URL2Commons tool with data entered to upload a multiple files.
Uploading a single file Uploading multiple files

Simulation and upload

[edit]

When the forms are complete and ready to go, click the "Simulate" button at the bottom of the tool. This will check if everything is OK for upload. If it is, a green bar will appear with the message "All OK, upload button available" and a new "Upload" button will appear next to the "Simulate" button. (If the simulation was unsuccessful, a mistake has probably been made in the prior steps; attempt to fix this problem and click "Simulate" again.)

URL2Commons tool following simulation and ready for upload.
Successful simulation


Click the new "Upload" button to begin the transfer of the files from elsewhere on the internet to Wikimedia Commons. This may take some time.

Upload button added to the tool after simulation
Upload button


The files will soon appear on Wikimedia Commons with the filename chosen above, in the categories selected. The uploader will be shown as "File Upload Bot (Magnus Manske)". This file can now be edited or used as normal.

Book template

[edit]

This is the code with the book template. If required, replace the text in the lower panel with this text before entering data.

{{Book
 | Author         = 
 | Translator     = 
 | Editor         = 
 | Illustrator    = 
 | Title          = 
 | Subtitle       = 
 | Series title   = 
 | Volume         = 
 | Edition        = 
 | Publisher      = 
 | Printer        = 
 | Date           = 
 | City           = 
 | Language       = 
 | Description    = {{en|$DESCRIPTOR$}}
 | Source         = $URL$
 | Permission     = 
 | Image          = {{PAGENAME}}
 | Image page     = 
 | Wikisource     = 
 | Homecat        = 
 | Other_versions = 
 | ISBN           = 
 | LCCN           = 
 | OCLC           = 
}}

[[Category:]]

For a full explanation of these parameters, refer to {{book}} on Wikimedia Commons.

The most basic of these parameters are:

  • Author: The name of the author. Use a creator template, if possible, instead of just text.
  • Title: The title of the book.
  • Date: Year of publication. If months or days are to be added, use the format YYYY-MM-DD.
  • Language: Should be "English."
  • Description: A brief description of the book. Use the {{en}} template for a description in English.
  • Source: The origin of the file. The URL can be used for this parameter or it can be replaced with something more useful (for example, the Details page on the Internet Archive instead of the URL for the DjVu file itself).
  • Permission: A license template (see below).
  • Wikisource: The page name of the final text on Wikisource. Use the prefix s:en: but do not use brackets to make the link.

License templates

[edit]

See Commons:Copyright tags for a complete list. Common license templates include:

  • {{PD-old}} – for works in the public domain because their copyright has expired.
  • {{PD/1923}} – for works published before 1923. Add the author's death year in the following format: {{PD/1923|author's death year}}
  • {{PD-US-not renewed}} – for works published in the United States between 1923 and 1963 for which the copyright was not renewed.
  • {{PD/1996}} – for works published outside the United States (as with the Wikisource template {{Pd/1996}}). Add the author's death year in the following format: {{PD/1996|author's death year}}