Coder Social home page Coder Social logo

semanticmediawiki / semanticdrilldown Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 10.0 1.53 MB

Provides a page for drilling down into the category-based and semantic data of a site, using easily-created filters

License: Other

JavaScript 2.49% PHP 92.96% CSS 2.14% Makefile 0.43% Mustache 1.98%

semanticdrilldown's Introduction

Semantic MediaWiki

CI Latest Stable Version Packagist download count

Semantic MediaWiki (a.k.a. SMW) is a free, open-source extension to MediaWiki – the wiki software that powers Wikipedia – that lets you store and query data within the wiki's pages.

Semantic MediaWiki is also a full-fledged framework, in conjunction with many spinoff extensions, that can turn a wiki into a powerful and flexible knowledge management system. All data created within SMW can easily be published via the Semantic Web, allowing other systems to use this data seamlessly.

For a better understanding of how Semantic MediaWiki works, have a look at deployed in 5 min and the Sesame, Fuseki triplestore video, or browse the wiki for a more comprehensive introduction.

Requirements

Semantic MediaWiki requires MediaWiki and its dependencies, such as PHP.

Supported MediaWiki, PHP and database versions depend on the version of Semantic MediaWiki. See the compatibility matrix for details.

Installation

The recommended way to install Semantic MediaWiki is by using Composer. See the detailed installation guide as well as the information on compatibility.

Documentation

Most of the documentation can be found on the Semantic MediaWiki wiki. A small core of documentation also comes bundled with the software itself. This documentation is minimalistic and less explanatory than what can be found on the SMW wiki. It is however always kept up to date, and applies to the version of the code it comes bundled with. The most important files are linked below.

Support

Chatroom Twitter Facebook LinkedIn YouTube Mailing lists

Primary support channels:

Contributing

Many people have contributed to SMW. A list of people who have made contributions in the past can be found here or on the wiki for Semantic MediaWiki. The overview on how to contribute provides information on the different ways available to do so.

If you want to contribute work to the project please subscribe to the developers mailing list and have a look at the contribution guidelines.

Tests

This extension provides unit and integration tests and are normally run by a continuous integration platform but can also be executed locally using the shortcut command composer phpunit from the extension base directory. A more comprehensive introduction can be found under the test section.

License

GNU General Public License, version 2 or later. The COPYING file explains SMW's copyright and license.

semanticdrilldown's People

Contributors

atdt avatar cscott avatar dannys712 avatar dbolser avatar edwardspec avatar gesinn-it-evl avatar gesinn-it-gea avatar gesinn-it-wam avatar hashar avatar ivanhercaz avatar jeroendedauw avatar jqnatividad avatar kghbln avatar kizule avatar krabina avatar legoktm avatar mwjames avatar paladox avatar pastakhov avatar physikerwelt avatar razesoldier avatar reedy avatar siebrand avatar thevins avatar thiemowmde avatar thomas-topway-it avatar translatewiki avatar umherirrender avatar yaronkoren avatar your1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

semanticdrilldown's Issues

Combobox and $sdgMinValuesForComboBox not always working

The issue described in https://www.mediawiki.org/wiki/Extension_talk:Semantic_Drilldown#Combobox_and_$sdgMinValuesForComboBox_not_always_working

There are two issues:

  • when you select an item in the ComboBox it, uses search request (with "search" prefix) instead of direct match.
  • when any filer is used on Special:BrowseData, the ComboBox is not displayed for properties with values more than $sdgMinValuesForComboBox value (it shows a lot of links instead the ComboBox)

It is fixed in #48

  • you still can search using the ComboBox if you type something and press enter (the request will be with "search" prefix). For selected items it uses direct match.
  • the ComboBox is displayed when number of items is greater than $sdgMinValuesForComboBox value when any filer is used or not

single option in #drilldownlink produces error

Setting {{#drilldownlink:category=foo|single}} produces an error that does not show when the single option is omitted.

[6f2d34bbccc0b1d6716e849e] /Special:BrowseData/Die_Study?_single= Error from line 38 of /extensions/SemanticDrilldown/includes/Specials/BrowseData/ProcessTemplate.php: Unsupported operand types

Backtrace:

#0 extensions/SemanticDrilldown/includes/Specials/BrowseData/SpecialBrowseData.php(71): SD\Specials\BrowseData\ProcessTemplate->__invoke()
#1 /var/www/silver/1.35.8/includes/specialpage/SpecialPage.php(600): SD\Specials\BrowseData\SpecialBrowseData->execute()
#2 /var/www/silver/1.35.8/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run()
#3 /var/www/silver/1.35.8/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#4 /var/www/silver/1.35.8/includes/MediaWiki.php(947): MediaWiki->performRequest()
#5 /var/www/silver/1.35.8/includes/MediaWiki.php(547): MediaWiki->main()
#6 /var/www/silver/1.35.8/index.php(53): MediaWiki->run()
#7 /var/www/silver/1.35.8/index.php(46): wfIndexMain()
#8 {main}

Option "requires" does not work

I tried the following:

{{#drilldowninfo:
 filters=Country (property=Country),
 Place (property=Place,requires=Country),
 |display parameters

But still, both filters are shown from the start. It should be that only the country filter is shown and the place filter appears once a country has been selected.

Title option should be improved

The optional title option correctly sets a different name as page title, however, this does not make soo much sense if the list of categories (e. g. in tabs) still show the category name.

Therefore I think that the title option also should change the name of the categories displayed on BrowseData. Main usecase for me is the possibility to change the order in which the categories appear in the tabs.

Error: Class "PSExtensionHandler" not found

Steps to replicate the issue (include links if applicable):

Install SMW 4.1.1 and Semantic drilldown
run upate.php

What happens?:

I see the following error

Deprecated: Use of Hooks::run was deprecated in MediaWiki 1.35. [Called from SMW\MediaWiki\HookDispatcher::onSettingsBeforeInitializationComplete in /var/www/html/extensions/SemanticMediaWiki/src/MediaWiki/HookDispatcher.php at line 93] in /var/www/html/includes/debug/MWDebug.php on line 382
[d87d18b258193f44ecbd4a33] [no req] Error: Class "PSExtensionHandler" not found
Backtrace:
from /var/www/html/extensions/SemanticDrilldown/includes/PageSchemas.php(15)
#0 /var/www/html/includes/AutoLoader.php(222): require()
#1 [internal function]: AutoLoader::autoload(string)
#2 /var/www/html/includes/HookContainer/HookContainer.php(344): is_callable(string)
#3 /var/www/html/includes/HookContainer/HookContainer.php(521): MediaWiki\HookContainer\HookContainer->normalizeHandler(string, string, array)
#4 /var/www/html/includes/HookContainer/HookContainer.php(450): MediaWiki\HookContainer\HookContainer->getHandlers(string)
#5 /var/www/html/extensions/SemanticMediaWiki/src/MediaWiki/Hooks.php(152): MediaWiki\HookContainer\HookContainer->register(string, array)
#6 /var/www/html/extensions/SemanticMediaWiki/src/Setup.php(389): SMW\MediaWiki\Hooks->register(array)
#7 /var/www/html/extensions/SemanticMediaWiki/src/Setup.php(152): SMW\Setup->registerHooks(array)
#8 /var/www/html/extensions/SemanticMediaWiki/includes/SemanticMediaWiki.php(84): SMW\Setup->init(array, string)
#9 /var/www/html/includes/Setup.php(564): SemanticMediaWiki::onExtensionFunction()
#10 /var/www/html/maintenance/run.php(49): require_once(string)
#11 /var/www/html/maintenance/run(3): require(string)
#12 {main}

What should have happened instead?:

update should run

Software version (skip for WMF-hosted wikis like Wikipedia):
Core and extensions are wmf/1.41.0-wmf.13
Semantic MediaWiki is 4.1.1
Semantic Drilldown is master

Other information (browser name/version, screenshots, etc.):

Can be related to T339834

Map crashes Special:BrowseData when many printouts are required

The same query here:
https://fina.knowledge.wiki/Special:BrowseData/Correspondence
results in a blank page when I add one more printout: I it seems more than four are not possible. As you can see from the table below, this only happens in the map result format.

|display parameters=?Coordinates;?Author;?Recipient;?Associated persons;format=map;caption=Map

Seems to be a JS issue:
image

Is is a performance problem. If I try the same with a regular query, I get
Unstrip size limit exceeded (5,000,000), see ProfessionalWiki/Maps#565
At least SD should catch the error instead of crashing

TODO: investigate possibility to use marker-cluster, e.g. https://developers.google.com/maps/documentation/javascript/marker-clustering
example: https://www.memento.wien/map/

Fix CI for MW 1.38 (aria-disabled='false' removed)

Json Test Case Script Runner: Failed "no filter applied"

│ ==== (StringContains expected) ====
│ [ <input type='date' tabindex='0' aria-disabled='false' name='_lower_Date' value='2000-01-01' placeholder='YYYY-MM-DD' class='oo-ui-inputWidget-input' /> ], [ <input type='date' tabindex='0' aria-disabled='false' name='_upper_Date' value='2000-01-02' placeholder='YYYY-MM-DD' class='oo-ui-inputWidget-input' /> ]
│
│ Failed asserting that 20 matches expected 22.

Improve appearance of filters

Some ideas on how to improve the visual appearance of the filters:

I suggest to add the option "format" to the filter definitions:

{{#drilldowninfo:
 filters=Institution (property=Institution,format=collapsed),
}}

that would collapse the filter. If you use many filters, having them all uncollapsed takes away too much space.

Format could also be repeated for other options, e.g.

{{#drilldowninfo:
 filters=Institution (property=Institution,format=collapsed,format=block),
}}

could not display "Institution", the select field and the "Search" button all in separate lines, but in one line.

{{#drilldowninfo:
 filters=Institution (property=Institution,format=slider),
}}

format = slider could display a slider instead of from and two-dates for a date filter.

Feature proposal - browse data in any page and Inputs UI

Semantic Drilldown could be completed with a new parser function able to display the results of filters in any wikipage. At the same time, it could feature a way to add PageForms-like or OOUI inputs widgets instead of standard filters (completed with an update or submit button), so to obtain a result like the following:

https://skinflint.co.uk/?cat=hkuegef&asuch=&bpmin=&bpmax=560&v=e&hloc=uk&plz=&dist=&mail=&sort=-lz&bl1_id=30

see website: https://skinflint.co.uk/?cat=hkuegef

therefore the actual parser function could be conceived as follows:

{{#drilldownui: inputs=
text (property=Description),
number (property=Price_from),
number (property=Price_to),
radio:any, in stock, short term (property=Availability),
radio: Austria, Germany, Poland, UK, All regions (property=Offers_from),
text (property=Near)
number (property=Distance_max)
|display parameters=
?Picture
;?Price
;?Rating
;?Offer
;?Model
;format=plainlist
;template=products
}}

note the parser function name drilldownui (or also drilldowninputs) and the parameter for the input text (property=Description), which could support a syntax for label, default value, placeholder, etc. for instance as: text;label:abc;default:val; ... (property=Description)

see also Semediawiki-user's list https://sourceforge.net/p/semediawiki/mailman/message/37777546/
(where this feature has been in some way envisaged)

Add support for more datatypes in filters (e.g. keyword, quantity)

Semantic Drilldown displays an error when data type quantity or keyword is used:
Error! Unsupported property type (Quantity) for filter Size.
as quantities support multiple units, I guess using the first unit would be ok.

https://testwiki2.kdz.eu/index.php?title=Special:BrowseData/Cities

If a property is selected of datatype keyword, SD displays "(There are no values for this filter)" even if there should be values (same query is working in filtered format.
There is also an error message
Error! Unsupported property type (Keyword) for filter Numismatic keyword.

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.