Skip to content

Stable urls that showcase a Wikidata item's sitelinks, and related items.

License

Notifications You must be signed in to change notification settings

bodhisattwawiki/wm-portal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wm-portal

The free knowledge portal.

The basic idea is to provide stable urls that show a Wikidata item's sitelinks in a single language. Possibly also showing related items, e.g. items found from "What links here" and/or items with nearby coordinates. If combined with a tool to generate QR codes for the stable urls, this would be a solution to https://meta.wikimedia.org/wiki/2017_Community_Wishlist_Survey/Wikidata/Qr_codes_for_all_items

Updating

This tool is located on the Wikimedia Toolforge, at https://tools.wmflabs.org/portal/. To update:

  1. Login with to toolforge with ssh:

    $ ssh -i ~/.ssh/id_rsa user@login.tools.wmflabs.org

  2. Become the tool account:

    $ become portal

  3. Pull from GitHub repo into the public_html folder:

    $ cd public_html

    $ git pull

  4. If the .lighttpd.conf file has changed, that file needs to be copied to the root directory:

    $ cp public_html/.lighttpd.conf .lighttpd.conf

  5. Restart the webservice:

    $ webservice stop

    $ webservice start

Notes

The stable url format is {base-url}/portal/{item}/{lang-code} (e.g. {base-url}/portal/Q12345/en) with /{lang-code} being optional.
This maps to {base-url}/portal/index.php?id={item}&lang={lang-code} (via the url rewrite rules in .lighttpd.conf file).

Item titles, descriptions, and sitelinks are retrieved from the Wikidata api.

I18n: labels and descriptions from Wikidata are already in the correct langauge. Other strings are pulled from json files. If the language is not specified, the device language is detected.

Mock output for Q1129708/en:

Coolgardie

town in Western Australia

Related:
Nearby:
Free knowledge portal -- [CC0 logo] CC0 -- data available on Wikidata

About

Stable urls that showcase a Wikidata item's sitelinks, and related items.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 78.0%
  • JavaScript 14.2%
  • CSS 7.8%