From 4d3be6578ad7fa088577143027bc60cca1a545eb Mon Sep 17 00:00:00 2001 From: Wouter Beek Date: Tue, 13 Jun 2017 11:22:03 +0200 Subject: [PATCH] DOC: Updated installation docs to use pack_install/1 i.o. pack_rebuild/1. --- README.md | 64 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index de660aa..f3ca2a6 100644 --- a/README.md +++ b/README.md @@ -8,52 +8,50 @@ HDT files form a natural addition to SWI-Prolog's memory based RDF store to access large amounts of static background knowledge without enlarging the memory footprint. -This repository is organised as a SWI-Prolog _pack_. To install it, -perform the steps below. Tested on Ubuntu Linux. Should work on most -Unix-like machines. Installation on Windows requires more creativity. +This repository is organised as a SWI-Prolog _pack_. To install it, +perform the steps below. Installation and usage is tested on Ubuntu +and Fedora. This should work on most Unix-like machines. +Installation on Windows requires more creativity though. -1. Clone this repository in your SWI-Prolog _pack_ directory, - typically `~/lib/swipl/pack` and install it: - a. Clone this pack: - ```bash - $ git clone https://github.com/JanWielemaker/hdt - ``` +## Installation - b. Install a recent version of Serd: +1. Install a recent version of Serd: - ```bash - curl -s http://download.drobilla.net/serd-0.26.0.tar.bz2 | tar -xj && \ - cd serd-0.26.0 && \ - ./waf configure && \ - ./waf && \ - sudo ./waf install; - ``` +```bash +curl -s http://download.drobilla.net/serd-0.26.0.tar.bz2 | tar -xj && \ + cd serd-0.26.0 && \ + ./waf configure && \ + ./waf && \ + sudo ./waf install; +``` - c. Install Raptor: +2. Install Raptor2. - * On Fedora: + On Fedora: `sudo dnf install raptor2-devel` - ```bash - sudo dnf install raptor2-devel - ``` + On Ubuntu: `sudo apt-get install libraptor2-dev` - * On Ubuntu: +3. After the prerequisites are installed, the HDT library can be + installed from within Prolog using the following command: - ```bash - sudo apt-get install libraptor-dev - ``` +```bash +?- pack_install(hdt). +``` - d. Start SWI-Prolog and run - ```prolog - ?- pack_rebuild(hdt). - ``` -If all worked out, you can now use `?- use_module(library(hdt)).` to -load the library. Please example the comments there to understand the -interface. +## Usage + +If the installation went well, you can load the HDT library with the following command: + + +```bash +?- [library(hdt)]. +``` + + ## Status