Skip to content

Commit 673e460

Browse files
committed
Update README with new usage, after it writes separate template and properties files
1 parent 659efbb commit 673e460

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

README.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
1-
RDF2SMW
1+
rdf2smw
22
=======
33

4-
A (commandline) tool to convert from RDF triples to Semantic MediaWiki facts
5-
(in MediaWiki XML export format).
4+
A commandline tool to convert from RDF triples to [Semantic MediaWiki](http://semantic-mediawiki.org) facts
5+
in MediaWiki XML export format to be used with [MediaWiki](https://www.mediawiki.org)'s built-in
6+
[XML import feature](https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps).
67

7-
It allows you too import RDF data into a [Semantic MediaWiki](http://semantic-mediawiki.org), via [MediaWiki](https://www.mediawiki.org)'s
8-
robust built-in [XML import feature](https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps).
8+
This allows you to quickly and simply populate a Semantic MediaWiki page
9+
structure, from an RDF data file.
910

10-
It is written in Go for better performance (than PHP). The latest version
11+
It is written in Go for better performance than PHP. The latest version
1112
processes triples into pages in the order of ~55K triples/sec converted into
12-
~13K pages/sec on an 2014 i5 Haswell, dual core processor (max 2.1GHz I think)
13-
running Xubuntu, although these numbers probably depend a lot on the structure
14-
of the dataset.
13+
~13K pages/sec on an 2014 i5 Haswell dual core processor, to give an idea.
1514

16-
RDF2SMW is very similar to the RDF import function in the
15+
rdf2smw is very similar to the RDF import function in the
1716
[RDFIO](https://github.com/rdfio/RDFIO) Semantic MediaWiki extension, but takes
1817
another approach: Whereas RDFIO converts RDF to wiki pages and imports them in
19-
the same go, RDF2SMW first converts RDF to an XML file outside of PHP (for
18+
the same go, rdf2smw first converts RDF to an XML file outside of PHP (for
2019
better performance), and then importing using MediaWiki's built-in import
2120
function.
2221

23-
**Status:** The tool is now feature complete, including ability to write facts
24-
via template calls, if a categorization (via owl:Class) of the subject can be
25-
done. What is lacking is more options to fine-tune things. Right now you'll
26-
have to modify the source code yourself if you need any customization. Hope to
27-
address this in the near future.
28-
29-
For more detailed status, see [TODO.md](https://github.com/samuell/rdf2smw/blob/master/TODO.md)
22+
**Status:** The tool is pretty much feature complete, including ability to
23+
write facts via template calls if a categorization (via owl:Class or rdf:type)
24+
of the subject can be done. What is lacking is more options to fine-tune
25+
things. Right now you'll have to modify the source code yourself if you need
26+
any customization. Hope to address this in the near future.
3027

3128
Installation
3229
------------
@@ -37,7 +34,6 @@ For linux 64 bit:
3734
2. Unpack it with: `gunzip rdf2smw_linux64.gz`
3835
3. Call it, on the commandline (see the usage section below).
3936

40-
4137
Usage
4238
-----
4339

@@ -49,21 +45,31 @@ format, with the `--in` flag, and an output file in XML format with the
4945
./rdf2smw --in triples.nt --out semantic_mediawiki_pages.xml
5046
```
5147

52-
The resulting XML file, can then be imported into MediaWiki / Semantic
53-
MediaWiki, via the `importDump.php` maintenance script, located in the
54-
`maintenance` folder under the main mediawiki folder:
48+
In addition to the specified output file, there will be separate files for
49+
templates and properties, named similar to the main output file, but replacing
50+
`.xml` with `_templates.xml` and `_properties.xml` respectively.
51+
52+
These XML files can then be imported into MediaWiki / Semantic MediaWiki, via
53+
the `importDump.php` maintenance script, located in the `maintenance` folder
54+
under the main mediawiki folder.
5555

5656
```bash
57+
php <wikidir>/maintenance/importDump.php semantic_mediawiki_pages_templates.xml
58+
php <wikidir>/maintenance/importDump.php semantic_mediawiki_pages_properties.xml
5759
php <wikidir>/maintenance/importDump.php semantic_mediawiki_pages.xml
5860
```
5961

62+
Note that the order above is highly recommended (templates, then properties,
63+
then the rest), so as to avoid unnecessary re-computing of semantic data after
64+
the import is done.
65+
6066
Technical notes
6167
---------------
6268

63-
RDF2SMW is based on the [FlowBase](https://github.com/flowbase/flowbase)
69+
rdf2smw is based on the [FlowBase](https://github.com/flowbase/flowbase)
6470
flow-based programming micro-framework.
6571

6672
Acknowledgements
6773
----------------
6874

69-
RDF2SMW makes heavy use of [Petter Goksøyr Åsen](https://github.com/boutros)'s awesome [RDF parsing library](https://github.com/knakk/rdf).
75+
rdf2smw makes heavy use of [Petter Goksøyr Åsen](https://github.com/boutros)'s awesome [RDF parsing library](https://github.com/knakk/rdf).

0 commit comments

Comments
 (0)