Git Product home page Git Product logo

wm-portal's Introduction

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

wm-portal's People

Contributors

evad37 avatar tacsipacsi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.