Fast reader and writer of Darwin Core Archive Files. For now only checklist files are supported.
Homebrew on Mac OS X, Linux, and Linux on Windows (WSL2)
TLDR:
```bash
brew tap gnames/gn
brew install dwca
```
Homebrew is a popular package manager for Open Source software originally developed for Mac OS X. Now it is also available on Linux, and can easily be used on MS Windows 10 or 11, if Windows Subsystem for Linux (WSL) is installed.
Note that Homebrew requires some other programs to be installed, like Curl,
Git, a compiler (GCC compiler on Linux, Xcode on Mac). If it is too much,
go to the Linux and Mac without Homebrew section.
-
Install Homebrew according to their instructions.
-
Install
dwcawith:brew tap gnames/gn brew install dwca # to upgrade brew upgrade dwca
dwca consists of just one executable file, so it is pretty easy to
install it by hand. To do that download the binary executable for your
operating system from the latest release.
Move dwca executable somewhere in your PATH
(for example /usr/local/bin)
sudo mv path_to/gnfinder /usr/local/binInstall Go v1.22 or higher.
git clone git@github.com:/gnames/dwca
cd dwca
make tools
make installWhen you run dwca -V command for the first time, it will create a
[dwca.yml][dwca.yml] configuration file.
This file should be located in the following places:
MS Windows: C:\Users\AppData\Roaming\dwca.yml
Mac OS: $HOME/.config/dwca.yml
Linux: $HOME/.config/dwca.yml
This file allows to set options that will modify behaviour of dwca
according to your needs. It will spare you from entering the same flags for the
command line application again and again.
Command line flags will override the settings in the configuration file.
It is also possible to setup environment variables. They will override the settings in both the configuration file and from the flags.
| Settings | Environment variables |
|---|---|
| RootPath | DWCA_ROOT_PATH |
| OutputArchiveCompression | DWCA_OUTPUT_ARCHIVE_COMPRESSION |
| OutputCSVType | DWCA_OUTPUT_CSV_TYPE |
| JobsNum | DWCA_JOBS_NUM |
To see flags and usage:
dwca --help
# or just
dwcaTo see the version of its binary:
dwca -VNormalizing DwCA file
dwca normalize input_file.zip <output.zip>
## change number of concurrent jobs
dwca normalize -j 100 input_file.zip <output.zip>
## change to comma-separated format for the output
dwca normalize -c csv input_dwca.zip
## change to a `tar.gz` archive
dwca normalize -a tar input_dwca.zip
## to skip or process rows with wrong number of fields in CSV files
dwca normalize -w skip input_dwca.zip
dwca normalize --wrong-fields-num process input_dwca.zipIf output path is not given, the output will be {input file name}.norm.zip or
{input file name}.norm.tar.gz
To install the latest dwca
git clone git@github.com:/gnames/dwca
cd gnfinder
make tools
make installTo avoid conflicts in filesystem run tests in sequential order.
go test -p 1 -count=1 ./...