Compare commits
20 Commits
valid_set.
...
HFW_Weat_T
Author | SHA1 | Date | |
---|---|---|---|
|
ec5443b9f6 | ||
|
f3f61781e0 | ||
|
8df11cd258 | ||
|
519b4a11e1 | ||
2aa87bae00 | |||
|
4599ca2ccd | ||
125cb732ee | |||
|
aae97ec78a | ||
|
f1845c7101 | ||
|
f56b7877dc | ||
|
181caf6092 | ||
|
e31f02cd38 | ||
|
123733def0 | ||
|
226a3a3856 | ||
|
6ec4d836cc | ||
|
4d394dc080 | ||
|
d541628920 | ||
|
9d6ddf6e25 | ||
|
e0c1ad7e03 | ||
|
6fe5481363 |
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# Ignore node_module
|
||||||
|
**/node_modules/
|
||||||
|
|
||||||
|
# Ignore python stuff
|
||||||
|
**/__pycache__
|
||||||
|
**/.pytest_cache
|
||||||
|
|
||||||
|
# Ignore les fichiers système de MacOS
|
||||||
|
**/.DS_Store
|
101
.gitlab-ci.yml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
include:
|
||||||
|
- .gitlab/*.yml
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- Manifest
|
||||||
|
- Test
|
||||||
|
- Bundle
|
||||||
|
- Distribute
|
||||||
|
- Release
|
||||||
|
|
||||||
|
variables:
|
||||||
|
ENTRY_FOLDER: assets
|
||||||
|
RELEASE_VERSION: v$CI_PIPELINE_IID
|
||||||
|
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${RELEASE_VERSION}"
|
||||||
|
|
||||||
|
# Jobs from here run on Merge Requests as prerequisite for merging.
|
||||||
|
.manifest-job:
|
||||||
|
stage: Manifest
|
||||||
|
image: node:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
when: never
|
||||||
|
- changes:
|
||||||
|
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/*
|
||||||
|
script:
|
||||||
|
- cd src/
|
||||||
|
- npm install
|
||||||
|
- npm run start
|
||||||
|
- cat ../${ENTRY_FOLDER}/${PACKAGE_NAME}/theme.json
|
||||||
|
- npm run test
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/theme.json
|
||||||
|
when: on_success
|
||||||
|
expire_in: "1 hour"
|
||||||
|
|
||||||
|
.test-job:
|
||||||
|
stage: Test
|
||||||
|
image: python:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
changes:
|
||||||
|
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/*
|
||||||
|
script:
|
||||||
|
- pip install -U pytest pillow iteration_utilities
|
||||||
|
- python -m pytest src/test_images.py --tb=line -rA --color=yes
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
# Jobs from here run Merged_results or Push/Merge Commits to the main branch. Tag is created on release so no run with tag creation
|
||||||
|
.bundle-job:
|
||||||
|
stage: Bundle
|
||||||
|
image: javieraviles/zip:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
changes:
|
||||||
|
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/*
|
||||||
|
script:
|
||||||
|
- zip -j ${PACKAGE_NAME}.zip ${ENTRY_FOLDER}/${PACKAGE_NAME}/*
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- ${PACKAGE_NAME}.zip
|
||||||
|
when: on_success
|
||||||
|
expire_in: "1 hour"
|
||||||
|
|
||||||
|
.upload-job:
|
||||||
|
stage: Distribute
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
changes:
|
||||||
|
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/*
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
curl --fail \
|
||||||
|
--header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
|
||||||
|
--upload-file ${PACKAGE_NAME}.zip "${PACKAGE_REGISTRY_URL}/${PACKAGE_NAME}.zip?select=package_file"
|
||||||
|
|
||||||
|
.release-job:
|
||||||
|
stage: Release
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
changes:
|
||||||
|
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/*
|
||||||
|
script:
|
||||||
|
- echo "Releasing assets for $PACKAGE_NAME"
|
||||||
|
release:
|
||||||
|
name: "Release $PACKAGE_NAME $RELEASE_VERSION"
|
||||||
|
tag_name: "$PACKAGE_NAME.$RELEASE_VERSION"
|
||||||
|
description: "Version $RELEASE_VERSION"
|
||||||
|
ref: "$CI_COMMIT_SHA"
|
||||||
|
assets:
|
||||||
|
links:
|
||||||
|
- name: ${PACKAGE_NAME}
|
||||||
|
url: "${PACKAGE_REGISTRY_URL}/${PACKAGE_NAME}.zip"
|
32
.gitlab/BL2_frozen_wastelands.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
manifest-job/BL2_frozen_wastelands:
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL2_frozen_wastelands"
|
||||||
|
extends: .manifest-job
|
||||||
|
|
||||||
|
test-images-job/BL2_frozen_wastelands:
|
||||||
|
needs:
|
||||||
|
- manifest-job/BL2_frozen_wastelands
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL2_frozen_wastelands"
|
||||||
|
extends: .test-job
|
||||||
|
|
||||||
|
bundle-job/BL2_frozen_wastelands:
|
||||||
|
needs:
|
||||||
|
- manifest-job/BL2_frozen_wastelands
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL2_frozen_wastelands"
|
||||||
|
extends: .bundle-job
|
||||||
|
|
||||||
|
upload-job/BL2_frozen_wastelands:
|
||||||
|
needs:
|
||||||
|
- bundle-job/BL2_frozen_wastelands
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL2_frozen_wastelands"
|
||||||
|
extends: .upload-job
|
||||||
|
|
||||||
|
release-job/BL2_frozen_wastelands:
|
||||||
|
needs:
|
||||||
|
- upload-job/BL2_frozen_wastelands
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL2_frozen_wastelands"
|
||||||
|
extends: .release-job
|
32
.gitlab/BL3_Sanctuary_Bay.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
manifest-job/BL3_Sanctuary_Bay:
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL3_Sanctuary_Bay"
|
||||||
|
extends: .manifest-job
|
||||||
|
|
||||||
|
test-images-job/BL3_Sanctuary_Bay:
|
||||||
|
needs:
|
||||||
|
- manifest-job/BL3_Sanctuary_Bay
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL3_Sanctuary_Bay"
|
||||||
|
extends: .test-job
|
||||||
|
|
||||||
|
bundle-job/BL3_Sanctuary_Bay:
|
||||||
|
needs:
|
||||||
|
- manifest-job/BL3_Sanctuary_Bay
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL3_Sanctuary_Bay"
|
||||||
|
extends: .bundle-job
|
||||||
|
|
||||||
|
upload-job/BL3_Sanctuary_Bay:
|
||||||
|
needs:
|
||||||
|
- bundle-job/BL3_Sanctuary_Bay
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL3_Sanctuary_Bay"
|
||||||
|
extends: .upload-job
|
||||||
|
|
||||||
|
release-job/BL3_Sanctuary_Bay:
|
||||||
|
needs:
|
||||||
|
- upload-job/BL3_Sanctuary_Bay
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "BL3_Sanctuary_Bay"
|
||||||
|
extends: .release-job
|
32
.gitlab/HFW_Three_Spires_Mountain.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
manifest-job/HFW_Three_Spires_Mountain:
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Three_Spires_Mountain"
|
||||||
|
extends: .manifest-job
|
||||||
|
|
||||||
|
test-images-job/HFW_Three_Spires_Mountain:
|
||||||
|
needs:
|
||||||
|
- manifest-job/HFW_Three_Spires_Mountain
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Three_Spires_Mountain"
|
||||||
|
extends: .test-job
|
||||||
|
|
||||||
|
bundle-job/HFW_Three_Spires_Mountain:
|
||||||
|
needs:
|
||||||
|
- manifest-job/HFW_Three_Spires_Mountain
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Three_Spires_Mountain"
|
||||||
|
extends: .bundle-job
|
||||||
|
|
||||||
|
upload-job/HFW_Three_Spires_Mountain:
|
||||||
|
needs:
|
||||||
|
- bundle-job/HFW_Three_Spires_Mountain
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Three_Spires_Mountain"
|
||||||
|
extends: .upload-job
|
||||||
|
|
||||||
|
release-job/HFW_Three_Spires_Mountain:
|
||||||
|
needs:
|
||||||
|
- upload-job/HFW_Three_Spires_Mountain
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Three_Spires_Mountain"
|
||||||
|
extends: .release-job
|
32
.gitlab/HFW_Weat_Tuft.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
manifest-job/HFW_Weat_Tuft:
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Weat_Tuft"
|
||||||
|
extends: .manifest-job
|
||||||
|
|
||||||
|
test-images-job/HFW_Weat_Tuft:
|
||||||
|
needs:
|
||||||
|
- manifest-job/HFW_Weat_Tuft
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Weat_Tuft"
|
||||||
|
extends: .test-job
|
||||||
|
|
||||||
|
bundle-job/HFW_Weat_Tuft:
|
||||||
|
needs:
|
||||||
|
- manifest-job/HFW_Weat_Tuft
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Weat_Tuft"
|
||||||
|
extends: .bundle-job
|
||||||
|
|
||||||
|
upload-job/HFW_Weat_Tuft:
|
||||||
|
needs:
|
||||||
|
- bundle-job/HFW_Weat_Tuft
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Weat_Tuft"
|
||||||
|
extends: .upload-job
|
||||||
|
|
||||||
|
release-job/HFW_Weat_Tuft:
|
||||||
|
needs:
|
||||||
|
- upload-job/HFW_Weat_Tuft
|
||||||
|
variables:
|
||||||
|
PACKAGE_NAME: "HFW_Weat_Tuft"
|
||||||
|
extends: .release-job
|
121
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Gen-Manifest Valid_set",
|
||||||
|
"cwd": "${workspaceFolder}/src",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run",
|
||||||
|
"start"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"CI_PROJECT_DIR": "${workspaceFolder}",
|
||||||
|
"ENTRY_FOLDER": "test",
|
||||||
|
"PACKAGE_NAME": "valid_set"
|
||||||
|
},
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Test-Manifest Valid_set",
|
||||||
|
"cwd": "${workspaceFolder}/src",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run",
|
||||||
|
"test"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"CI_PROJECT_DIR": "${workspaceFolder}",
|
||||||
|
"ENTRY_FOLDER": "test",
|
||||||
|
"PACKAGE_NAME": "valid_set"
|
||||||
|
},
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Test-Images Valid_set",
|
||||||
|
"cwd": "${workspaceFolder}/src",
|
||||||
|
"console": "internalConsole",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "pytest",
|
||||||
|
"args": [
|
||||||
|
"test_images.py",
|
||||||
|
"-rA",
|
||||||
|
"--tb=line",
|
||||||
|
"--color=yes"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"CI_PROJECT_DIR": "${workspaceFolder}",
|
||||||
|
"ENTRY_FOLDER": "test",
|
||||||
|
"PACKAGE_NAME": "valid_set"
|
||||||
|
},
|
||||||
|
"justMyCode": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gen-Manifest existing_valid_theme_set",
|
||||||
|
"cwd": "${workspaceFolder}/src",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run",
|
||||||
|
"start"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"CI_PROJECT_DIR": "${workspaceFolder}",
|
||||||
|
"ENTRY_FOLDER": "test",
|
||||||
|
"PACKAGE_NAME": "existing_valid_theme_set"
|
||||||
|
},
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Test-Manifest existing_valid_theme_set",
|
||||||
|
"cwd": "${workspaceFolder}/src",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run",
|
||||||
|
"test"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"CI_PROJECT_DIR": "${workspaceFolder}",
|
||||||
|
"ENTRY_FOLDER": "test",
|
||||||
|
"PACKAGE_NAME": "existing_valid_theme_set"
|
||||||
|
},
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Test-Images existing_valid_theme_set",
|
||||||
|
"cwd": "${workspaceFolder}/src",
|
||||||
|
"console": "internalConsole",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "pytest",
|
||||||
|
"args": [
|
||||||
|
"test_images.py",
|
||||||
|
"-rA",
|
||||||
|
"--tb=line",
|
||||||
|
"--color=yes"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"CI_PROJECT_DIR": "${workspaceFolder}",
|
||||||
|
"ENTRY_FOLDER": "test",
|
||||||
|
"PACKAGE_NAME": "existing_valid_theme_set"
|
||||||
|
},
|
||||||
|
"justMyCode": true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
7
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"conventionalCommits.scopes": [
|
||||||
|
"cicd",
|
||||||
|
"#13",
|
||||||
|
"#14"
|
||||||
|
]
|
||||||
|
}
|
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_1.jpg
Normal file
After Width: | Height: | Size: 909 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_10.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_11.jpg
Normal file
After Width: | Height: | Size: 977 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_12.jpg
Normal file
After Width: | Height: | Size: 968 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_13.jpg
Normal file
After Width: | Height: | Size: 928 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_14.jpg
Normal file
After Width: | Height: | Size: 944 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_15.jpg
Normal file
After Width: | Height: | Size: 952 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_16.jpg
Normal file
After Width: | Height: | Size: 1002 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_17.jpg
Normal file
After Width: | Height: | Size: 892 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_18.jpg
Normal file
After Width: | Height: | Size: 876 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_19.jpg
Normal file
After Width: | Height: | Size: 935 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_2.jpg
Normal file
After Width: | Height: | Size: 942 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_20.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_21.jpg
Normal file
After Width: | Height: | Size: 996 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_22.jpg
Normal file
After Width: | Height: | Size: 878 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_23.jpg
Normal file
After Width: | Height: | Size: 947 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_3.jpg
Normal file
After Width: | Height: | Size: 980 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_4.jpg
Normal file
After Width: | Height: | Size: 954 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_5.jpg
Normal file
After Width: | Height: | Size: 1009 KiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_6.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_7.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/BL2_frozen_wastelands/BL2_frozen_wastelands_9.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_1.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_10.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_11.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_12.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_13.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_14.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_15.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_16.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_17.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_18.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_19.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_2.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_20.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_21.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_22.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_23.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_3.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_4.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_5.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_6.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_7.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_8.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/BL3_Sanctuary_Bay/BL3_Sanctuary_Bay_9.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 990 KiB |
After Width: | Height: | Size: 929 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 919 KiB |
After Width: | Height: | Size: 929 KiB |
After Width: | Height: | Size: 1021 KiB |
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/HFW_Three_Spires_Mountain/HFW_Three_Spires_Mountain_3.jpg
Normal file
After Width: | Height: | Size: 908 KiB |
BIN
assets/HFW_Three_Spires_Mountain/HFW_Three_Spires_Mountain_6.jpg
Normal file
After Width: | Height: | Size: 989 KiB |
BIN
assets/HFW_Three_Spires_Mountain/HFW_Three_Spires_Mountain_7.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/HFW_Three_Spires_Mountain/HFW_Three_Spires_Mountain_8.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/HFW_Three_Spires_Mountain/HFW_Three_Spires_Mountain_9.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_1.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_10.jpg
Normal file
After Width: | Height: | Size: 975 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_11.jpg
Normal file
After Width: | Height: | Size: 914 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_12.jpg
Normal file
After Width: | Height: | Size: 805 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_14.jpg
Normal file
After Width: | Height: | Size: 955 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_15.jpg
Normal file
After Width: | Height: | Size: 905 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_18.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_19.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_2.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_20.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_21.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_22.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_23.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_24.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_25.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_26.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_3.jpg
Normal file
After Width: | Height: | Size: 914 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_4.jpg
Normal file
After Width: | Height: | Size: 999 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_5.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_6.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_7.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_8.jpg
Normal file
After Width: | Height: | Size: 853 KiB |
BIN
assets/HFW_Weat_Tuft/HFW_Weat_Tuft_9.jpg
Normal file
After Width: | Height: | Size: 871 KiB |
78
src/build-manifest.js
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
const iptc = require("node-iptc");
|
||||||
|
const { exit } = require("process");
|
||||||
|
|
||||||
|
|
||||||
|
// Fetch envs to target the right folder
|
||||||
|
const workDir = process.env["CI_PROJECT_DIR"];
|
||||||
|
const root = process.env["ENTRY_FOLDER"];
|
||||||
|
const slug = process.env["PACKAGE_NAME"];
|
||||||
|
if (!workDir || !slug || !root) exit(1);
|
||||||
|
let workingDirectory = path.join(workDir, root, slug);
|
||||||
|
|
||||||
|
// extract metadata from them
|
||||||
|
fs.readdir(workingDirectory, (err, files) => {
|
||||||
|
if (err) { throw err }; // If IO error, exit with an error message
|
||||||
|
|
||||||
|
// If there is already a theme.json silentely exit and let mocha running afterwards
|
||||||
|
if (files.find(file => path.extname(file) == '.json')) exit(0);
|
||||||
|
|
||||||
|
// construct a JSON object
|
||||||
|
let theme = new Object();
|
||||||
|
theme.dayImageList = [];
|
||||||
|
theme.nightImageList = [];
|
||||||
|
theme.sunsetImageList = [];
|
||||||
|
theme.sunriseImageList = [];
|
||||||
|
|
||||||
|
// iterate each files
|
||||||
|
files.filter(file => path.extname(file) == '.jpg').forEach(image => {
|
||||||
|
buffer = fs.readFileSync(path.join(workingDirectory, image));
|
||||||
|
// extract metadata
|
||||||
|
let metadata = iptc(buffer);
|
||||||
|
theme.imageFilename ||= metadata.special_instructions + "_*" + path.extname(image);
|
||||||
|
theme.imageCredits ||= metadata.copyright_notice;
|
||||||
|
theme.displayName ||= metadata.headline;
|
||||||
|
// explore categories to find if image is dayHighlight or nightHighlight
|
||||||
|
metadata.supplemental_categories?.forEach(cat => {
|
||||||
|
switch (cat) {
|
||||||
|
case "dayHighlight":
|
||||||
|
theme.dayHighlight ||= parseInt(metadata.original_transmission_reference);
|
||||||
|
break;
|
||||||
|
case "nightHighlight":
|
||||||
|
theme.nightHighlight ||= parseInt(metadata.original_transmission_reference);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
switch (metadata.category) {
|
||||||
|
case "day":
|
||||||
|
theme.dayImageList.push(parseInt(metadata.original_transmission_reference));
|
||||||
|
break;
|
||||||
|
case "night":
|
||||||
|
case "nig":
|
||||||
|
theme.nightImageList.push(parseInt(metadata.original_transmission_reference));
|
||||||
|
break;
|
||||||
|
case "sunset":
|
||||||
|
case "twilight":
|
||||||
|
case "twi":
|
||||||
|
theme.sunsetImageList.push(parseInt(metadata.original_transmission_reference));
|
||||||
|
break;
|
||||||
|
case "sunrise":
|
||||||
|
case "dawn":
|
||||||
|
case "daw":
|
||||||
|
theme.sunriseImageList.push(parseInt(metadata.original_transmission_reference));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// make it the theme.json
|
||||||
|
fs.writeFileSync(path.join(workingDirectory, 'theme.json'), JSON.stringify(theme));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|