Pointrel20150110 by Paul Fernhout
The intent of this version of the Pointrel system was to have a quick-and-dirty experimental command line version of a triple store inspired by the MH (mail handling) concept, where you could use standard shell operations alongside command to create and find Pointrel triples. I made an initial version in Node.js. So, with the proper aliasing, you could issue shell commands like: "$ pointrel add a b c".
Then I added a test file to add triples from the browser, which interacted with extra server functions to add a triple or to list things.
License: MIT license
Useful things to know for command line use:
For a shorthand command in bash to use "p" instead of "pointrel", add this to a "p" file in ~/bin and make it executable (adjust for where you copied Pointrel20150110 or where node is installed):
#!/bin/bash /usr/bin/node ~/Pointrel20150110/pointrel.js "$@"
You can list the first item of all triples with:
$ pointrel list
You can list the second (b, or relationship) part of triples for a first (a) part with:
$ pointrel list $ITEM
You can list all the third (c, or value) part of triples for the a and b parts with:
$ pointrel list $ITEM $RELATIONSHIP
You can also "find" the last value for an item with (note the underscore "_", which is optional at the end, and can be used in any of the three fields):
$ pointrel find $ITEM $RELATIONSHIP _
You can find all the matches for something, which lists the file ID something is in with:
$ pointrel findall $ITEM $RELATIONSHIP _ $ pointrel findall _ $RELATIONSHIP $VALUE
You can delete previously added relationships if you know their timestamp ID (from the previous command, or from inspecting the files under the resources directory) with the delete command:
$ pointrel delete $SOME_TIMESTAMP_ID
Screenshot of using Pointrel command line to add a "thought"
Useful things to know for web server use:
To get the webserver running in the background to use the pages:
$ pointrel server &
To add web pages for display, create a triple like so (replace $PAGE_NAME with your page name):
$ pointrel add page:$PAGE_NAME content 'Your page content...'
You can also specify a content-type if it is not the default "text/plain" like so:
As an example, to add the content for a bootstrap editor running as "http://localhost:8000/editor.html" using bash in the project directory:
Setting the content-type for those two demos files is actually optional, as URLs ending in .html and .js will have their content-type guessed correctly if not set. The default content-type otherwise if it is not set is "text/plain".
There is also a more complex IBIS demo. You can load the files by running "upload-ibis.sh" after cd-ing to the demos directory. You can then run that demo by opening the URL of "http://localhost:8000/ibis/ibis.html".