Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
natlibfi-jonollil committed Sep 24, 2024
1 parent 61812ba commit 464ef01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 41 deletions.
41 changes: 12 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,13 @@ DC to MARC21 json record transformer for the Melinda record batch import system.
## Configuration

### Record import system
| Name | Description | default |
|----------------------------------------|--------------------------------------------------------------------|------------------------------|
| ABORT_ON_INVALID_RECORDS | If record transformation fails abort transformation process | false |
| PROFILE_IDS | Record-import profiles that wish to use this transformer | ["foobar"] |
| AMQP_URL | Rabbit MQ container url | "amqp://127.0.0.1:5672/" |
| MONGO_URI | MongoDB connection | "mongodb://127.0.0.1/db"
| | | |

### Record import api
| Name | Description | default |
|----------------------------------------|--------------------------------------------------------------------|------------------------------|
| RI_API_URL | Record import api url | 'cli' |
| RI_API_CLIENT_USER_AGENT | Api client user agent | "_RECORD-IMPORT-TRANSFORMER" |
| RI_API_ALLOW_SELF_SIGNED | Whether to allow record import api to use self-signed certificates | false |
| | | |


### Authentication
| Name | Description | default |
|----------------------------------------|--------------------------------------------------------------------|------------------------------|
| KEYCLOAK_ISSUER_BASE_URL | Keycloak realm base url | 'not set!' |
| KEYCLOAK_SERVICE_CLIENT_ID | Keycloak client id | 'not set!' |
| KEYCLOAK_SERVICE_CLIENT_SECRET | Keycloak client secret | 'not set!' |
| | | |
| Name | Description | default |
|--------------------------|-------------------------------------------------------------|--------------------------|
| ABORT_ON_INVALID_RECORDS | If record transformation fails abort transformation process | false |
| PROFILE_IDS | Record-import profiles that wish to use this transformer | ["foobar"] |
| AMQP_URL | Rabbit MQ container url | "amqp://127.0.0.1:5672/" |
| MONGO_URI | MongoDB connection | "mongodb://127.0.0.1/db" |
| | | |


### Filters
Expand All @@ -45,11 +28,11 @@ Filters define which records should and should not be converted based on the sou
- filterByIssuedYear: requires dc.date.issued to be equal or greater than what is defined in FILTER_YEAR_NOT_BEFORE to pass
- filterByMaterialType: if dc.type.okm is found, requires the value be something else than A3/B2/D2 to pass

| Name | Description | default |
|----------------------------------------|-------------------------------------------------------------------------|------------------------------|
| FILTERS | Names of filters which should be applied before converting record | [] |
| FILTER_YEAR_NOT_BEFORE | Configuration for filterByIssuedYear: oldest publication year to allow | [] |
| | | |
| Name | Description | default |
|------------------------|------------------------------------------------------------------------|---------|
| FILTERS | Names of filters which should be applied before converting record | [] |
| FILTER_YEAR_NOT_BEFORE | Configuration for filterByIssuedYear: oldest publication year to allow | [] |
| | | |


#### Other configuration
Expand Down
12 changes: 0 additions & 12 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ export const filterConfig = {
}
};

export const recordImportApiOptions = {
recordImportApiUrl: readEnvironmentVariable('RECORD_IMPORT_API_URL', {defaultValue: 'cli'}),
userAgent: readEnvironmentVariable('API_CLIENT_USER_AGENT', {defaultValue: '_RECORD-IMPORT-TRANSFORMER'}),
allowSelfSignedApiCert: readEnvironmentVariable('ALLOW_API_SELF_SIGNED', {defaultValue: false, format: parseBoolean})
};

export const keycloakOptions = {
issuerBaseURL: readEnvironmentVariable('KEYCLOAK_ISSUER_BASE_URL', {defaultValue: 'not set!'}),
serviceClientID: readEnvironmentVariable('KEYCLOAK_SERVICE_CLIENT_ID', {defaultValue: 'not set!'}),
serviceClientSecret: readEnvironmentVariable('KEYCLOAK_SERVICE_CLIENT_SECRET', {defaultValue: 'not set!'})
};

// NB: Source config is static and not to be read from env vars
export const sourceConfig = {
// eslint-disable-next-line no-process-env
Expand Down

0 comments on commit 464ef01

Please sign in to comment.