115 lines
No EOL
2.5 KiB
YAML
115 lines
No EOL
2.5 KiB
YAML
---
|
|
scheduler:
|
|
alias: darksoulIII
|
|
cron: '* * * * *'
|
|
# interval: 10000 # ms
|
|
enableLog: true # (Optional) default: false
|
|
|
|
|
|
property:
|
|
workspace: /home/deck/.steam/steam/steamapps/compatdata/374320/pfx/drive_c/users/steamuser/AppData/Roaming/DarkSoulsIII
|
|
saveFolder: <!property.workspace>/01100001112a7a14
|
|
savePath: <!property.saveFolder>/DS30000.sl2
|
|
|
|
pipeline:
|
|
id: main
|
|
workflow:
|
|
- exe: read-web
|
|
- exe: json-read-web
|
|
- exe: json-read-local
|
|
- exe: diff
|
|
- if:
|
|
condition-bool: <!property.diff> == true
|
|
on-true:
|
|
- exe: info
|
|
- if:
|
|
condition-date: <!property.lastSavedWeb> < <!property.info.modified>
|
|
on-true:
|
|
- exe: json-write-local
|
|
- exe: upload
|
|
- if:
|
|
condition-date: <!property.lastSavedWeb> > <!property.lastSavedLocal>
|
|
on-true:
|
|
- exe: json-write-web
|
|
- exe: download
|
|
|
|
|
|
commands:
|
|
- command: FileInfo
|
|
id: info
|
|
param:
|
|
path: <!property.savePath>
|
|
setInfo: <@property.info>
|
|
|
|
- command: WebRequest
|
|
id: read-web
|
|
param:
|
|
url: https://toki-labs.com/cdn/save/darksoulIII/save.json
|
|
setResponse: <@property.web>
|
|
|
|
- command: JsonReader
|
|
id: json-read-web
|
|
param:
|
|
json: <!property.web>
|
|
pair:
|
|
- from: lastSaved
|
|
setValue: <@property.lastSavedWeb>
|
|
|
|
- command: JsonReaderFile
|
|
id: json-read-local
|
|
param:
|
|
path: <!property.saveFolder>/save.json
|
|
pair:
|
|
- from: lastSaved
|
|
setValue: <@property.lastSavedLocal>
|
|
|
|
- command: Print
|
|
id: print
|
|
param:
|
|
message: change save file
|
|
|
|
- command: FileDiffCheck
|
|
id: diff
|
|
param:
|
|
paths:
|
|
- <!property.savePath>
|
|
setDiff: <@property.diff>
|
|
|
|
- command: JsonWriterFile
|
|
id: json-write-local
|
|
param:
|
|
path: <!property.saveFolder>/save.json
|
|
pair:
|
|
- from: lastSaved
|
|
value: <!property.info.modified>
|
|
|
|
- command: Upload
|
|
id: upload
|
|
param:
|
|
sftp: true
|
|
port: 22
|
|
host: toki-labs.com
|
|
user: toki
|
|
password: r0bins
|
|
map:
|
|
<!property.savePath> : /Users/toki/docker/nginx/home/cdn/save/darksoulIII
|
|
<!property.saveFolder>/save.json : /Users/toki/docker/nginx/home/cdn/save/darksoulIII
|
|
|
|
- command: JsonWriterFile
|
|
id: json-write-web
|
|
param:
|
|
path: <!property.saveFolder>/save.json
|
|
pair:
|
|
- from: lastSaved
|
|
value: <!property.lastSavedWeb>
|
|
|
|
- command: Download
|
|
id: download
|
|
param:
|
|
sftp: true
|
|
port: 22
|
|
host: toki-labs.com
|
|
user: toki
|
|
password: r0bins
|
|
map:
|
|
/Users/toki/docker/nginx/home/cdn/save/darksoulIII/DS30000.sl2 : <!property.saveFolder> |