https://github.com/dgf/dm4-csv
DeepaMehta 4 CSV Importer
https://github.com/dgf/dm4-csv
Last synced: 10 months ago
JSON representation
DeepaMehta 4 CSV Importer
- Host: GitHub
- URL: https://github.com/dgf/dm4-csv
- Owner: dgf
- Created: 2013-03-07T23:12:18.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2018-06-20T08:12:07.000Z (about 8 years ago)
- Last Synced: 2025-03-16T19:25:51.179Z (over 1 year ago)
- Language: Java
- Size: 172 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DeepaMehta 4 CSV Importer
simple CSV importer to update flat topic compositions

Limitations:
* delimiter: ```|``` (default)
* data type: Text
## Requirements
* [DeepaMehta 4](http://github.com/jri/deepamehta) 4.1.3-SNAPSHOT
* Write access to dm4.filerepo.path (see DM4 config file)
## Usage
the plugin adds an *Import CSV* action for topic types
### import some topics from a CSV file
to create some *Note* topics use a CSV file like the following:
```
csv.example | dm4.notes.title | dm4.notes.text
one | check this | with content
two | check this too | and with another content
```
upload the file with the *Import CSV* action of the *Note* topic type
an import of some *Web Resource* topics could look like this:
```
deep.web | dm4.webbrowser.url | dm4.webbrowser.web_resource_description
site | http://www.deepamehta.de |
DeepaMehta
Cope With Complexity
demo | http://demo.deepamehta.de | Demo Server
try it now
ci | http://ci.deepamehta.de | Continuous Integration
fresh nightly builds
```
### update existing topics
to update all instances of a topic type just import the modified CSV file again,
but be aware of these rules:
* existing topic is updated by a URI match
* row without a matching topic URI creates a new topic instance
* existing topic instance with a type URI and no actual row match is deleted
### CSV Format Description
* topic URI prefix as the first entry (row: 0, col: 0)
* all direct child topics are the remaining header columns
* one topic per row with topic URI suffix in the first column
## Development
clone this repo and install the plugin before starting the runner
git clone https://github.com/dgf/dm4-csv
cd dm4-csv
mvn install
mvn pax:run