Module:SST/shards/J/doc

Note: This is part of the WP:SSTS system see that page for complete documentation

This page contains the data configurations for Module:SST ("Single-source templates") for all book keys starting with the letter "J".

Create a new shard entry

All book metadata is stored in "shards" which are Lua Modules that contain simple tables.

There are two types of shards:

  • Single - A single book. They share shard files. For example, all single books that start with "A" are in Module:SST/shards/A
  • Sets - Works that have multiple volumes or editions e.g. an Encyclopedia or a 3-edition book. Each one has their own private shard file stored in Module:SST/shards/sets for example Module:SST/shards/sets/THE_CAMBRIDGE_HISTORY_OF_IRAN.

To add a new book, navigate to the correct shard and add a new table. The template documentation page will show where the shard is located.

Naming the book key

When creating a new table, use a unique, recognizable book key in ALL CAPS, with spaces converted to underscores. For single shards it must start with the letter of the shard it is placed in. Generally a good idea to start with the author's last name then a short version of the title.

  • Example: library['IMBER_THE_OTTOMAN_EMPIRE'] = { ... }

When creating a multi-edition or volume set of books, name each book followed by a number for volumes e.g. _1 and _2 .. or by a year of publication e.g. _1990 and _2002 for editions.

BOWEN_THE_LIFE_AND_TIMES_OF_AL_IBN_ISA
IMBER_THE_OTTOMAN_EMPIRE_2002
IMBER_THE_OTTOMAN_EMPIRE_2009
BYZANTINE_SEALS_1
BYZANTINE_SEALS_2

Host

The |host= sets which digital library the citation will link to.

Valid values for |host= are "ia", "guten", "hathi", "wikisrc", "gbook", "web" and "physical" (not online). These map to a corresponding |id= in the |hosts= entry (see below). Improper values or lack of a host will default to "physical" (no external links).

If a |host= is changed (e.g. from "hathi" to "ia") this will impact the Leaf page designations for every template on Wikipedia. For example Hathi uses 42@s54 while IA uses 42@n34. A change of |host= is disruptive, causing URLs to land on the wrong page. Tools will be in development to make |host= changes easier by automating the update of templates. Until then, it is better to consider the host "locked".

Citation Parameters

A table of CS1 parameters displayed by default. (Users can override these within the invoking templates.)
  • |_template=: Optional. Defaults to cite book, can also be set to cite encyclopedia (more template support in future).
  • |last=, |first=, |quote=, |ref=, etc. = Standard CS1 parameters.

Hosts

A nested table defining where the book can be found online and how the routing engines should handle it. Supported host keys are |ia= (Internet Archive), |hathi= (HathiTrust), |guten= (Project Gutenberg), |wikisrc= (Wikisource), |gbook= (Google Books), |web= (Other website), and |physical= (No digital host). You can add multiple hosts for each book, which one is used is defined by |host= (see above).
  • |id= = The host-specific identifier.
    • IA: The ID from the URL. Multiple IDs for the same edition can be defined see Example setup.
    • Hathi: The handle ID
    • GBook: The 12-character ID
    • Wikisource: The full Page namespace name, including extension
    • Web: For a web host, omit id. See Example setup.
  • Physical: A physical copy only - for books without a digital host. See Example setup.
  • Internet Archive Options:
  • query = (Internet Archive only). Optional. Use instead of `id` for multi-volume works. Links the main title to an IA search page. Page linking will output as unlinked plain text. (ex. `query = 'title:"Encyclopaedia Britannica" AND date:1911'`)
  • iadisplay = "full screen" (Internet Archive only). Optional. Opens the book in full-screen mode instead of the default 2-up view.
  • iasearch = "none" or "pagenum" (Internet Archive only). Optional. Set to "none" to disable the dummy search for PD books.

Multiple IDs

Some hosts have multiple copies of the same book+edition. This can be useful to mitigate viewing limits. Many hosts only allow X number of views per day per book. By including multiple IDs, you can spread the load across multiple IDs. Because the template randomly chooses real-time, it is important each book be identical ie. published in the same year, same publisher, each open to the same page 42 etc.. How to add multiple identical books:

    ['hosts'] = {
        ['ia'] = {
            ['id'] = { 
                "nebraskaplacenam00fitz", 
                "nebraskaplacenam0000fitz" 
            }
        }
    }

Load sharing is not available across hosts (inter-host), only within hosts (intra-host).




Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.