Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicola/folder-to-rdf

Get an RDF graph of the contents of a folder
https://github.com/nicola/folder-to-rdf

Last synced: 18 days ago
JSON representation

Get an RDF graph of the contents of a folder

Awesome Lists containing this project

README

        

# folder-to-rdf

Create an [RDF-ext](https://rdf-ext/rdf-ext) compatible graph of a folder. This library looks at a `folder` and tries to parse the Linked Data files and then returns what is in the folder in a RDF-graph

Like `ls`, with `Linked Data output`

## Install

```
$ npm install --save folder-to-rdf
```

## Usage

### Simple

```javascript
var opts = {
suffixMeta: '.meta',
skipFiles: ['secret*', '.git', '*.pem'],
posix: true
}
var ls = require('folder-to-rdf')(opts)

ls('./', function(err, graph) {
console.log(graph.toString())
})

```

## Test

```
npm test
```

## License

MIT © Nicola Greco 2015