Difference between revisions of "Template:Google books/doc"

From blackwiki
Jump to navigation Jump to search
(→‎Usage: title parameter)
imported>AManWithNoPlan
(as wisdom)
 
(7 intermediate revisions by 5 users not shown)
Line 13: Line 13:
 
The {{para|title}} parameter is used to specify the publication title when used as a link (and not as a bare URL; {{para|title}} is not useful when {{para|plainurl}} is used).
 
The {{para|title}} parameter is used to specify the publication title when used as a link (and not as a bare URL; {{para|title}} is not useful when {{para|plainurl}} is used).
  
The {{para|page}} parameter may be used to link to a particular page number. {{para|pg}} can be used for "special" pages, e.g. {{para|pg|PR1}} for the page numbered "i" or {{para|pg|PP2}} for an inside cover (check the specific circumstances as appropriate for the latter as they vary from book to book).
+
The {{para|page}} parameter may be used to link to a particular normal (PA) page number. {{para|pg}} can be used for "special" pages, e.g. {{para|pg|PR1}} for the page numbered "i" or {{para|pg|PP2}} for an inside cover (check the specific circumstances as appropriate for the latter as they vary from book to book).
  
 
The {{para|keywords}} parameter may be used to search for particular keywords within the text (corresponding to the ''q'' parameter in the Google URL); {{para|text}} searches for a quoted phrase (corresponding to the ''dq'' parameter in the Google URL).
 
The {{para|keywords}} parameter may be used to search for particular keywords within the text (corresponding to the ''q'' parameter in the Google URL); {{para|text}} searches for a quoted phrase (corresponding to the ''dq'' parameter in the Google URL).
  
 
The {{para|plainurl}} parameter tells the template to output a URL (web address) only, rather than a linked book title and page number. Use {{para|plainurl|yes}} when using this template in a {{para|url}} parameter of a citation template. {{para|plain-url}} works as an alias.
 
The {{para|plainurl}} parameter tells the template to output a URL (web address) only, rather than a linked book title and page number. Use {{para|plainurl|yes}} when using this template in a {{para|url}} parameter of a citation template. {{para|plain-url}} works as an alias.
 +
 +
In many cases when converting an existing Google Book URL, only one of the above should be used.  When multiple parameters are present, the final target page is much more likely to vary over time.  If linking to a specific page, only use the page parameter, and if doing a text search then do not include the page parameter.
 +
  
 
For external links, the following all do the same thing:
 
For external links, the following all do the same thing:
Line 30: Line 33:
  
 
'''Example 1:'''
 
'''Example 1:'''
 +
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection}}</nowiki></code>
 +
creates
 +
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection}}.
 +
 +
'''Example 2:'''
 +
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|keywords=blood}}</nowiki></code>
 +
creates
 +
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|keywords=blood}}.
 +
 +
'''Example 3:'''
 
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42}}</nowiki></code>
 
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42}}</nowiki></code>
 
creates
 
creates
 
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42}}.
 
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42}}.
  
'''Example 2:'''
+
'''Example 4:'''
 
:<code><nowiki>{{cite book|last=Doe|first=John|title=History of the Western Insurrection|url={{Google books|7ydCAAAAIAAJ|page=42|plainurl=yes}}|page=42}}</nowiki></code>
 
:<code><nowiki>{{cite book|last=Doe|first=John|title=History of the Western Insurrection|url={{Google books|7ydCAAAAIAAJ|page=42|plainurl=yes}}|page=42}}</nowiki></code>
 
creates
 
creates
 
:{{cite book|last=Doe|first=John|title=History of the Western Insurrection|url={{Google books|7ydCAAAAIAAJ|page=42|plainurl=yes}}|page=42}}
 
:{{cite book|last=Doe|first=John|title=History of the Western Insurrection|url={{Google books|7ydCAAAAIAAJ|page=42|plainurl=yes}}|page=42}}
  
'''Example 3:'''
+
'''Example 5:'''
 +
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42|text=Perhaps bloodshed might have been avoided.}}</nowiki></code>
 +
creates
 +
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42|text=Perhaps bloodshed might have been avoided.}}.
 +
 
 +
'''Example 6:'''
 
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PP2}}</nowiki></code>
 
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PP2}}</nowiki></code>
 
creates this which links to the bookplate on the inside cover
 
creates this which links to the bookplate on the inside cover
 
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PP2}}.
 
:Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PP2}}.
  
'''Example 4:'''
+
'''Example 7:'''
 
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PR1}}</nowiki></code>
 
:<code><nowiki>Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PR1}}</nowiki></code>
 
creates this which links to the title page complete with inscriptions
 
creates this which links to the title page complete with inscriptions
Line 50: Line 68:
  
 
== See also ==
 
== See also ==
 +
* {{tl|Google Books URL}}
 
* {{tl|Cite book}}
 
* {{tl|Cite book}}
 
* [[Google Books]]
 
* [[Google Books]]
* [[WP:BOOKLINKS]]
+
* [[WP:GBOOKS]]
<includeonly>
+
 
 +
== Further research ==
 +
* {{cite web |title=Static Links |url=https://developers.google.com/books/docs/static-links |department=Google Books APIs |website=Google Developers |accessdate=2019-07-23}}
 +
* {{cite web |title=Linking to individual titles on Google Books |url=https://support.google.com/books/partner/answer/3474239 |department=Books Help |website=Google Help |accessdate=2019-07-23}}
 +
 
 +
==Generator==
 +
 
 +
* [//reftag.appspot.com/ Google book tool] Converts bare url into {{tl|cite book}} format
 +
<includeonly>{{sandbox other|1=<!-- keep sandbox out of categories -->|2=
 
[[Category:Google search templates]]
 
[[Category:Google search templates]]
 
[[Category:Catalog lookup templates]]
 
[[Category:Catalog lookup templates]]
 
[[Category:Free content external link templates]]
 
[[Category:Free content external link templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 13:33, 10 October 2020

Usage

{{Google books|id|title|page=|keywords=|text=|plainurl=}}

The page, keywords, text, and plainurl parameters are all optional.

The |id= parameter is the string of twelve characters found in the specific Google Books URL after "id=" but before "&".

The |title= parameter is used to specify the publication title when used as a link (and not as a bare URL; |title= is not useful when |plainurl= is used).

The |page= parameter may be used to link to a particular normal (PA) page number. |pg= can be used for "special" pages, e.g. |pg=PR1 for the page numbered "i" or |pg=PP2 for an inside cover (check the specific circumstances as appropriate for the latter as they vary from book to book).

The |keywords= parameter may be used to search for particular keywords within the text (corresponding to the q parameter in the Google URL); |text= searches for a quoted phrase (corresponding to the dq parameter in the Google URL).

The |plainurl= parameter tells the template to output a URL (web address) only, rather than a linked book title and page number. Use |plainurl=yes when using this template in a |url= parameter of a citation template. |plain-url= works as an alias.

In many cases when converting an existing Google Book URL, only one of the above should be used. When multiple parameters are present, the final target page is much more likely to vary over time. If linking to a specific page, only use the page parameter, and if doing a text search then do not include the page parameter.


For external links, the following all do the same thing:

  • {{Google books|id=id|title=title}}
  • {{Google books|1=id|2=title}}
  • {{Google books|id|title}}

For URLs, the following all do the same thing:

  • {{Google books|id=id|plainurl=yes}}
  • {{Google books|1=id|plainurl=yes}}
  • {{Google books|id|plainurl=yes}}

Example 1:

Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection}}

creates

Doe, John. History of the Western Insurrection at Google Books.

Example 2:

Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|keywords=blood}}

creates

Doe, John. History of the Western Insurrection at Google Books.

Example 3:

Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42}}

creates

Doe, John. History of the Western Insurrection, p. 42, at Google Books.

Example 4:

{{cite book|last=Doe|first=John|title=History of the Western Insurrection|url={{Google books|7ydCAAAAIAAJ|page=42|plainurl=yes}}|page=42}}

creates

Doe, John. History of the Western Insurrection. p. 42.

Example 5:

Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|page=42|text=Perhaps bloodshed might have been avoided.}}

creates

Doe, John. History of the Western Insurrection, p. 42, at Google Books.

Example 6:

Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PP2}}

creates this which links to the bookplate on the inside cover

Doe, John. History of the Western Insurrection at Google Books.

Example 7:

Doe, John. {{Google books|7ydCAAAAIAAJ|History of the Western Insurrection|pg=PR1}}

creates this which links to the title page complete with inscriptions

Doe, John. History of the Western Insurrection at Google Books.

See also

Further research

Generator