Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OpenDevelopmentMekong/wpsparql
A wordpress plugin for querying data from an SPARQL endpoint into Wordpress
https://github.com/OpenDevelopmentMekong/wpsparql
Last synced: about 1 month ago
JSON representation
A wordpress plugin for querying data from an SPARQL endpoint into Wordpress
- Host: GitHub
- URL: https://github.com/OpenDevelopmentMekong/wpsparql
- Owner: OpenDevelopmentMekong
- License: lgpl-3.0
- Created: 2016-05-09T14:22:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T11:00:12.000Z (almost 7 years ago)
- Last Synced: 2024-08-02T12:43:46.006Z (4 months ago)
- Language: PHP
- Homepage: https://opendevelopmentmekong.net
- Size: 368 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-starred - OpenDevelopmentMekong/wpsparql - A wordpress plugin for querying data from an SPARQL endpoint into Wordpress (others)
README
wp-sparql
=======A wordpress plug-in for querying data from a SPARQL endpoint and present results on WP http://wordpress.org/.
# Description
wpsparql is a wordpress plug-in that exposes a series of functionalities to bring content exposed by an sparql endpoint to Wordpress' UI.
# What is sparql?
SPARQL (pronounced "sparkle") is an RDF query language, that is, a semantic query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. SPARQL allows for a query to consist of triple patterns, conjunctions, disjunctions, and optional patterns.
# What is a sparql endpoint?
SPARQL endpoints are services that accept SPARQL queries and return results.
# This plugin is based on wpckan
This plug-in is based on http://github.com/OpenDevelopmentMekong/wpckan/, a wordpress plug-in exposing functionality to pull and present data exposed by a CKAN instance. More about CKAN on http://ckan.org/.
# Features
## Feature 1: Query SPARQL endpoint
wpsparql exposes the shortcode **[wpsparql_query_endpoint query="QUERY"]** which can be used to generate a query and present the results returned by the endpoint.
The shortcode has following parameters:
* **query**: (Mandatory) Term to query the database.
Examples:
```php
[wpsparql_query_endpoint query="SELECT * WHERE { ?person a foaf:Person . ?person foaf:name ?name } LIMIT 1"]
``````html
person
name
some_url
some_name
```
### Widget
This feature also exposes a widget for integrating the results of queries easily into Wordpress sidebars. Just add the **WPSPARQL query endpoint** widget available under **Appearance > Widgets** to any widget area and configure the query you want to execute.
# Installation
1. Either download the files as zip or clone
git clone https://github.com/OpenDevelopmentMekong/wpsparql.git
into the Wordpress plug-ins folder.
2. Install dependencies with composer (http://getcomposer.org)composer install
3. Activate the plugin through the 'Plugins' menu in WordPress# Configuration
1. Go to plug-in settings
2. Specify the URl of the sparql endpoint
3. Add the namespaces you want to support in your queries.
4. Save settings# Development
1. Install composer http://getcomposer.org/
2. Edit composer.json for adding/modifying dependencies versions
3. Install dependenciescomposer install
# Requirements
* PHP 5 >= 5.2.0
* PHP Curl extension (in ubuntu sudo apt-get install php5-curl)# Uses
* https://github.com/byjg/PHP-SPARQL-Lib.git
# Is used on
* http://www.suelourbano.org/bibliotecas/
* https://opendevelopmentmekong.net/topics/land# Copyright and License
This material is copyright (c) 2014-2015 East-West Management Institute, Inc. (EWMI).
It is open and licensed under the GNU Lesser General Public License (LGPL) v3.0 whose full text may be found at:
http://www.fsf.org/licensing/licenses/lgpl-3.0.html