alangrafu / lodspeakr Goto Github PK
View Code? Open in Web Editor NEWFramework to create Linked Data-based applications (formerly Linked Open Data Simple Publishing Kit)
Home Page: http://lodspeakr.org
License: Apache License 2.0
Framework to create Linked Data-based applications (formerly Linked Open Data Simple Publishing Kit)
Home Page: http://lodspeakr.org
License: Apache License 2.0
Add
to default html templates
This means that models/special.configure-epoch.model.html or views/special.configure-epoch.view.html (or both) don't exist.
state which of these three conditions is the case, so one can spend less time figuring it out.
LODSPKeaKr logo is fine but it can be better
Idea:
http://foo/ -> http://bar (local)
http://example.org/ -> http://base/example.org/
http://rpi.edu/ -> http://base/rpi.edu/
It would be desirable to add autmatically the needed namespaces on the sparql queries
use case:
prefix prov: <http://www.w3.org/ns/prov-o/>
prefix select: <http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/>
select distinct ?input
where {
[]
prov:wasAttributedTo {{base.args.arg0}};
prov:used ?input;
.
}
where the param is some unknown URI (so it is a hassle to find a qname for it.)
http://aquarius.tw.rpi.edu/datafaqs-view/special/index
lists classes, but the URL doesn't indicate that at all.
redirect to the "plain old" URL for the class lister?
doesn't look like it is in the repository.
#!/usr/bin/env bash
# Installation script for LODSPeaKr (http://lodspeakr.org)
# Author: Alvaro Graves ([email protected])
source ~/.bashrc
GIT=`which git`
if [ -z "$GIT" ]
then
echo "git not found. Please add git to your \$PATH. Installation terminated"
exit 1
fi
if [ ! -e lodspeakr ]; then
$GIT clone https://github.com/alangrafu/lodspeakr
cd lodspeakr
./install.sh
else
echo "There is already an existing directory called 'lodspeakr'. Installation cancelled. Remove it first and try again."
fi
http://aquarius.tw.rpi.edu/datafaqs/namedGraphs
<table>
<tr>
<td>Graph name</td>
<td>Dump file</td>
</tr>
{% for row in models.main %}
<tr>
<td>{{row.name.value}}</td>
<td><a href="{{row.dump.value}}">dump</a></td> <!--- This value may not exist. if so, we want to omit the anchor -->
</tr>
{% endfor %}
</table>
"List of classes in the triple store"
http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/index.html
should state the endpoint being inspected.
json-ld or rdf-json for RDF
application/sparql-results+json for sparql
It is annoying to write
{%foreach row in r%}
{{row.value.var}}
{%endfor%}
everytime I need only the first value. This is particularly painful when it comes to writing queries.
A simpler way should be something like
{{row.value.var.first}}
Or something similar
lebot@aquarius:/var/www/datafaqs/DataFAQs-lodspeakr$ utils/lodspk.sh create service datasets html
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-service.sh: line 26: warning: here-document at line 17 delimited by end-of-file (wanted `QUERY')
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-service.sh: line 57: warning: here-document at line 38 delimited by end-of-file (wanted `VIEW')
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-service.sh: line 48: warning: here-document at line 44 delimited by end-of-file (wanted `QUERY')
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-service.sh: line 50: warning: here-document at line 48 delimited by end-of-file (wanted `QUERY')
service.datasets created/modified successfully!
what if an instance has multiple types that match multiple models?
Is only one model applied? Or all of them. If the former, which takes priority?
please add the following to http://lodspeakr.org/install
if [ ! -e lodspeakr ]; then
$GIT clone https://github.com/alangrafu/lodspeakr
fi
Make {%if r.varname %}
a valid way to find if it contains elements
not a valid assumption for forks of the project.
e.g. https://github.com/timrdf/DataFAQs-lodspeakr/blob/master/root.htaccess
In order to allow forks to change the lodspeakr dir, the script should check the dirname when creating the .htaccess files
would be nice to have a standard place to put a list of URIs that can be fed into each model query for illustration purposes.
e.g. http://sparql.tw.rpi.edu/datafaqs/epoch/2012-01-21 into https://github.com/timrdf/DataFAQs-lodspeakr/blob/master/models/class.datafaqs:Epoch/html.queries/main.query
in https://github.com/alangrafu/lodspeakr/wiki/How-to-use-results
what does that mean?
It would be nice to have an example showing how to call lodspeakr from jquery. (yes, this has nothing to do with lodspeakr, but would help it get used).
e.g. how to invoke a special service such as:
http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/special/service-history/select-faqts:select-datasets:by-ckan-group
to get json or csv or html.
If
A rdf:type B
and
B rdfs:subClassOf C
It should be interesting to show A as B and C
the "resource representation" returned should be equivalent in content regardless of format. So demanding new queries for each content-type is redundant and makes it too easy to violate AWWW by providing different content for the same URI request.
and you grab the prefixes to apply.
Currently, I need to
This seems artificial and may lead to other problems in subdirs. Modify code so I only need to include
For example, a foaf:Person may want to obtain her basic data in one query while all her friends (foaf:know) in another.
Tim installed "one level too high" and it installed files all over /var/www.
Can you clean that up?
in https://github.com/alangrafu/lodspeakr/wiki/Models :
TODO: create an example of multiple queries for a class not an instance; we haven't gotten to instance-specific models yet (which the next one shows).
For now I'm thinking on the User-Agent HTTP header to decide wether show a mobile interface or a normal one. However this could be extended to any other HTTP header (Accept-Language or referer) that could define a different layout to be displayed.
Suggested by timrdf: 'type' is a better name
LODSPeaKr currently allows people to specify templates for different types. That means that a resource will displayed using a particular template if it appears in the query
SELECT ?instance WHERE{
?instance a <CLASS>
}
From that perspective, it is possible to think other queries that allow to define templates. Several questions arise:
Not useful:
LODSPeaKr could not find http://datafaqs.tw.rpi.edu/datafaqs/epoch/2012-01-26/faqt/2/dataset/1 or information about it.
e.g.
{{row.dump.value|localname}}
where value is http://aquarius.tw.rpi.edu/datafaqs/dump/__PIVOT_epoch/2012-01-26_07_10_22/dataset-references.ttl
In https://github.com/alangrafu/lodspeakr/wiki/Special-URIs you show code example:
{%for h in base.header %}
perhaps it would be easier to use if it were something like:
{%for h in lodspeakr.header %}
much like how jquery
is the (long-named) object you use to use jquery. It would help developers know when they are talking to lodspeakr and when they are talking to, say haanga or something.
or something shorter like lodspk
so it is easier to type.
Sometimes it is desirable to have special URIs that are not listed in the triple store nor pages generated for conneg. For example, a triple store may content several instances of class foaf:Person. Currently, it is not possible to list those entities, since that URI (most likely) won't be dereferenceable by lodspeakr.
<link href="{{base.baseUrl}}/lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" />
produces:
"<link href="http://aquarius.tw.rpi.edu/datafaqs//lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" />"
all of the templates using this need to be hunted down.
lebot@aquarius:/var/www/datafaqs/DataFAQs-lodspeakr$ utils/ldspk.sh create class datafaqs:Epoch html
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-class.sh: line 122: warning: here-document at line 71 delimited by end-of-file (wanted `VIEW')
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-class.sh: line 81: warning: here-document at line 77 delimited by end-of-file (wanted `QUERY')
/var/www/datafaqs/DataFAQs-lodspeakr/utils/modules/create-class.sh: line 83: warning: here-document at line 81 delimited by end-of-file (wanted `VIEW')
WARNING: At least one model for datafaqs:Epoch exists.
WARNING: At least one view for datafaqs:Epoch exists.
class.datafaqs:Epoch created/modified successfully!
foaf:Person.model.html/
|
->details1
|
->friends
|
->dbpedia/
|
->details1
in https://github.com/alangrafu/lodspeakr/wiki/How-to-use-results
should one be details2?
util/lodspk.sh debug on|off
turns debug mode on/off
util/lodspk.sh backup
storesa copy of models/views/settings.inc.php
util/lodspk.sh restore 20120120180901
restores models/views/settings from backup done in 20120120180901
Idea:
http://foo/ -> http://bar (local)
http://example.org/ -> http://base/example.org/
http://rpi.edu/ -> http://base/rpi.edu/
"List of classes in the triple store"
http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/index.html
should state the endpoint being inspected.
http://aquarius.tw.rpi.edu/datafaqs/index.html
shows
Services available
List of classes in the triple store
Named graphs in the triple store
even though there are three other services in there.
Also, what types can I feed this lodspeakr? These should be listed in the index by default.
find . around in the models/ to list these from php.
after running:
utils/lodspk.sh create service datasets html
the service "datasets" should appear in the index automatically.
Move the retrieval function to the client side, generating javascript that fetches the data.
In doesn't allow to autocomplete models
Good Idea from Eric: to write a function in php and allow user to implement functionalities that can be appended in .value
Example: Return the value as an array
{{varname.value.split.tostring}}
double slash in http://aquarius.tw.rpi.edu/datafaqs/datasets
<http://aquarius.tw.rpi.edu/datafaqs/datasets> xhv:stylesheet
<http://aquarius.tw.rpi.edu/datafaqs//lodspeakr/css/basic.css> .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.