Skip to content

Commit

Permalink
Merge pull request #74 from duncdrum/nuseir-rebase
Browse files Browse the repository at this point in the history
Nuseir kre
  • Loading branch information
duncdrum committed Feb 4, 2018
2 parents 00deb87 + 7f1f5f5 commit 3a5334f
Show file tree
Hide file tree
Showing 27 changed files with 2,206 additions and 1,068 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ src/xml/*.xml
.DS_Store

*.zip
*.xpr
41 changes: 26 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Because *CBDB* consists of roughly ~350k records, users are strongly encouraged


## Requirements
* eXist-db version ``2.2`` or greater with min. ``2gb`` (!) allocated memory.
* There are over 350k xml files in this app, so a larger then default cacheSize is recommended (min 500 Mb).
* (ant version ``1.10.1`` for compiling from source)
* eXist-db version `3.0` or greater with min. `2gb` (!) allocated memory.
* (ant version `1.10.1` for compiling from source)



## Releases
Expand All @@ -29,33 +29,44 @@ The other two zip files are provided as a courtesy, the first includes the clean
just the converted tei files.

### Application
The eXist-db app is a ``.xar`` package that contains the xQuery conversion modules, and the complete TEI files.
The eXist-db app is a `.xar` package that contains the xQuery conversion modules, and the complete TEI files.
But not the CBDB's source files.

### Source
A zip file that contains a cleaned up (fixing illegal unicode characters) export of CBDB as xml.
The root element of each file is ``<root xmlns="http://none">``, each table-row is wrapped inside a ``<row>`` element.
The root element of each file is `<root xmlns="http://none">`, each table-row is wrapped inside a `<row>` element.

The files are in a dummy namespace for easier processing.
Each file is named after the original table, e.g.:
``BIOG_MAIN`` becomes ``BIOG_MAIN.xml`` etc. .
`BIOG_MAIN` becomes `BIOG_MAIN.xml` etc. .

### Data
A zip file with just the TEI files. See the encoding [guidelines](doc/encoding-desc.md) for details.

## Installation
1. Download the ``.xar`` file from the [releases](https://github.com/duncdrum/cbdb-data/releases) page.
2. Go to your running eXist-db and open package manager from the dashboard.
1. Click on the "add package" symbol in the upper left corner and select the ``.xar`` file you just downloaded.
1. Download the `.xar` file from the [releases](https://github.com/duncdrum/cbdb-data/releases) page.
2. Go to your running eXist-db instance and open the package manager from the dashboard.
1. Click on the "add package" symbol in the upper left corner and select the `.xar` file you just downloaded.

### Building from source
1. Download, fork or clone this GitHub repository
1. There are different build targets in ``build.xml`` un-/comment the one that best suits your needs, or simply build all and pick later.
2. In your CLI, go to the folder you just downloaded:``cd cbdb-data``
3. now call ant:``ant`` after a few minutes you should see:``BUILD SUCCESSFUL``
4. Go to your running eXist-db and open package manager from the dashboard.
1. Click on the "add package" symbol in the upper left corner and select the ``.xar`` file you just created which is inside the ``/build`` folder.
5. Simultaneous installs of multiple ``.xar`` will fail.
2. There are four build targets in `build.xml`:
* `dev` includes *all* files from the source folder including those with potentially sensitive information.
* `deploy` is the official release. It excludes files necessary for development but that have no effect upon deployment.
* `src` the unmodified sources as xml
* `tei` just the tei file
3. Calling `ant` in your CLI will build all files:
```bash
cd cbdb-data
ant
```
1. to only build a specific target call either `dev` or `deploy` like this:
```bash
ant deploy
```

If you see `BUILD SUCCESSFUL` ant has generated a `cbdb-data-0.0.7.xar` file in the `build/` folder. To install it, follow the instructions [above](#installation).



## Documentation
Expand Down
42 changes: 21 additions & 21 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="cbdb-data">
<project default="all" name="cbdb-data">
<xmlproperty file="expath-pkg.xml"/>
<property name="project.version" value="${package(version)}"/>
<property name="project.app" value="cbdb-data"/>
<property name="teiTitle" value="cbdbTEI"/>
<property name="cbdbVersion" value="20150202"/>
<property name="build.dir" value="build"/>
<target name="xar">
<mkdir dir="${build.dir}"/>
<!--
Development Version includes source files
-->
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}-dev.xar" excludes="${build.dir}/*, src/xml/*.md"/>

<!--
Official Release for uploading on Github
-->
<!--<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="${build.dir}/*, src/xml/*.xml"/>
<zip basedir="." destfile="${build.dir}/${cbdbVersion}-src.zip" includes="src/xml/*.xml"/>
<zip basedir="." destfile="${build.dir}/${teiTitle}-${project.version}.zip" includes="target/**"/>-->

<!--
DEBUG Version for faster testing
-->
<!--<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}-debug.xar"
excludes="${build.dir}/*, src/xml/*.xml, **/chunk-0?/**, **/chunk-1?/**, **/chunk-2?/**">
</zip>-->
<target name="init" description="create build directory">
<tstamp/>
<mkdir dir="${build.dir}"/>
</target>
<!-- Dev build (includes everything) -->
<target name="dev" depends="init" description="compile all source files">
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}-dev.xar" excludes="${build.dir}/*, src/xml/*.md, .existdb.json, .yo-rc.json, README.md, **/.git*/**, .DS_Store, *.xpr"/>
</target>
<!-- Github Release -->
<target name="deploy" depends="init" description="compile release build">
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="${build.dir}/*, src/xml/*.xml, .existdb.json, .yo-rc.json, README.md, **/.git*/**, .DS_Store, *.xpr"/>
</target>
<target name="src" depends="init" description="source files in xml">
<zip basedir="." destfile="${build.dir}/${cbdbVersion}-src.zip" includes="src/xml/*.xml"/>
</target>
<target name="tei" depends="init" description="just the TEI files">
<zip basedir="." destfile="${build.dir}/${teiTitle}-${project.version}.zip" includes="target/**"/>
</target>
<target name="all" depends="dev, deploy, src, tei">
<tstamp/>
</target>
</project>
2 changes: 1 addition & 1 deletion collection.xconf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<create qname="tei:catDesc" type="xs:string"/>
<create qname="tei:desc" type="xs:string"/>
<create qname="tei:term" type="xs:string"/>
<create qname="tei:note" type="xs:string"/>
<!--<create qname="tei:note" type="xs:string"/>-->
<create qname="tei:label" type="xs:string"/>

<!-- ref attributes -->
Expand Down
Loading

0 comments on commit 3a5334f

Please sign in to comment.