Contents
Currently our tools have by-default log entries written to stdout. To disable this create a logback.xml with the following content
Code Block |
---|
<configuration>
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<root level="OFF"/>
</configuration> |
and refer to this file with
Code Block |
---|
-Dlogback.configurationFile=/path/to/logback.xml |
This tool takes as input several arcfiles, and inserts all the records of the input arcfiles into a single arcfile. This arcfile is currently dumped to stdout, but can of course be redirected to a file. Deprecated because it only handles ARCfiles. use JWAT-tools instead.
Code Block |
---|
export CLASSPATH=/path/to/installdir/lib/netarchivesuite-common-core.jar
export LOG=-Dlogback.configurationFile=/path/to/logback.xml
java $LOG dk.netarkivet.common.tools.ArcMerge arcfile1.arc arcfile2.arc > resulting.arc
|
This tool takes an input file, an URI for this file, and a mime-type for this file, and creates an ARC-file with only one ARCRecord, which has the input file as contents, and with the given mimetype and URI. The ARCfile is written to stdout, but can of course be redirected to a file. Deprecated because it only generates ARC-files
Code Block |
---|
export CLASSPATH=/path/to/installdir/lib/netarchivesuite-common-core.jar
export LOG=-Dlogback.configurationFile=/path/to/logback.xml
java $LOG dk.netarkivet.common.tools.ArcWrap input_file uri mime-type > myarchive.arc
|
This tool generates CDX-entries for all records in the given (W)ARC-files, and prints the CDX'es to stdout, but can of course be redirected to a file like we show below.
Code Block |
---|
export CLASSPATH=/path/to/installdir/lib/netarchivesuite-common-core.jar
export LOG=-Dlogback.configurationFile=/path/to/logback.xml
java $LOG dk.netarkivet.common.tools.ArchiveExtractCDX [arcfile]+ > output.cdx
|
This tool makes large files primarily for testing purposes. The tool needs two arguments, the number of bytes that must be written (nbytes), and the name of the file to write to. The number of bytes must be > chunksize (currently 10000000), otherwise 0 bytes will be written to the file.
Code Block |
---|
export CLASSPATH=/path/to/installdir/lib/netarchivesuite-common-core.jar
export LOG=-Dlogback.configurationFile=/path/to/logback.xml
java $LOG dk.netarkivet.common.tools.WriteBytesToFile nbytes filename
|
This tests, if it is possible to communicate with the FTP server mentioned in the settings from the given server
Code Block |
---|
export INSTALLDIR=/fullpath/to/installdir
export CLASSPATH=/path/to/installdir/lib/netarchivesuite-common-core.jar
export OPTs=-Ddk.netarkivet.settings.file=$INSTALLDIR/conf/settings_GUIApplication.xml
java $OPTS dk.netarkivet.common.tools.FTPValidator
or
java dk.netarkivet.common.tools.FTPValidator /full/path/to/settingsfile
or
java dk.netarkivet.common.tools.FTPValidator ftpHost ftpPort ftpUser ftpPasswd |
After running, it will either write test fail or test succeeded
This program tests if Netarchivesuite is able to send notification mails from the server
Code Block |
---|
export INSTALLDIR=/fullpath/to/installdir
export CLASSPATH=/path/to/installdir/lib/netarchivesuite-common-core.jar
export OPTs=-Ddk.netarkivet.settings.file=$INSTALLDIR/conf/settings_GUIApplication.xml
java $OPTS dk.netarkivet.common.tools.MailValidator
or
java dk.netarkivet.common.tools.MailValidator /full/path/to/settingsfile |
This program will try to send a notification to the mail-address given in the settings.
If successful it will write Test-Mail now sent successfully to address 'X' using 'Y' as mailserver, and 'Z' as sender