No description
Find a file
2018-11-18 20:25:22 +01:00
gradle/wrapper Add command line option parsing 2018-11-14 20:38:51 +01:00
src Add some tests 2018-11-18 20:25:22 +01:00
.gitignore Add generated files to gitignore 2018-11-15 22:38:16 +01:00
build.gradle Clean up code and comment 2018-11-17 15:39:58 +01:00
gradlew Add command line option parsing 2018-11-14 20:38:51 +01:00
gradlew.bat Add command line option parsing 2018-11-14 20:38:51 +01:00
LICENSE Initial commit 2018-11-13 17:11:17 +01:00
README.md Add some tests 2018-11-18 20:25:22 +01:00
requirements.md Add command line option parsing 2018-11-14 20:38:51 +01:00
settings.gradle Add command line option parsing 2018-11-14 20:38:51 +01:00

IMI-Application

Application task for IMI Münster.

Purpose of the app is to generate label codes for sample tubes. The user enters the number code of the study associated with the samples they want to label, along with the sample type and number of labels to generate.

The application then does a lookup on disk, to determine how many codes have already been generated for the given study and then generates fresh ones.

The resulting labels are written to a HTML file, which can either be opened by the app itself or by the user.

Usage

The application can be started by executing the script in the bin folder. Some command line arguments are expected, others are optional.

Command Argument Description
-b, --browser none If provided, the application will try to open the HTML file in a browser.
-h, --help none Do nothing but print a help page.
-n, --number 1, 2, ..., 9999 Specifies, how many codes should be generated by the program.
-o, --output relative/absolute file path Specify an output file for the generated HTML. If absent, the file will be written to ./out.html.
-s, --study 3 letter study number from [a-zA-Z0-9] Number of the associated study.
-t, --type 1 letter type symbol from [a-zA-Z0-9] Symbol that specifies the type of the sample.

Any valid study code can be entered. Some studies are preemptively hard-coded (AAA, BBB). Unknown studies will be newly created.

Records about existing studies are stored in the directory ./.imicodes/. That directory contains text files which are named after studies. Each study file contains the number of the next code which will be generated, so new codes will have different numbers by incrementing the last code by one.