Avoid repetition in getRawPathFromCell and fix up paths with bold/italic

This commit is contained in:
mtkennerly 2020-07-17 15:24:37 -04:00
parent 5bedaff845
commit f9fdb28d8b
3 changed files with 102 additions and 42 deletions

View file

@ -11950,12 +11950,12 @@ American McGee's Alice (2011):
- os: windows
American McGee's Grimm:
files:
<base>///GrimmGame/Config:
<base>/*/*/GrimmGame/Config:
tags:
- config
when:
- os: windows
<base>///GrimmGame/Config/GameSetting.ini:
<base>/*/*/GrimmGame/Config/GameSetting.ini:
tags:
- save
when:
@ -53020,7 +53020,7 @@ Cryptozookeeper:
- config
when:
- os: windows
<base>/czk.ini (Gargoyle interpreter):
<base>/czk.ini:
tags:
- config
when:
@ -124905,16 +124905,16 @@ Kansei:
id: 771340
Kao the Kangaroo:
files:
<base>/kao*.sav:
tags:
- save
when:
- os: windows
<base>/kao.ini:
tags:
- config
when:
- os: windows
<base>/kao.sav:
tags:
- save
when:
- os: windows
'Kao the Kangaroo: Round 2':
files:
<base>/media:
@ -151873,7 +151873,7 @@ MotoGP 2:
- config
when:
- os: windows
<base>/save/Player:
<base>/save/Player *:
tags:
- save
when:
@ -155180,7 +155180,19 @@ NEKOPALIVE:
id: 469990
NEKOPARA Extra:
files:
"<base>/Profile/<storeUserId>/Saves\n\n\n\n<winAppData>/NEKO WORKs/nekopara_extra\n\n\n<home>Documents/NEKO WORKs/nekopara_extra":
<base>/Profile/<storeUserId>/Saves:
tags:
- config
- save
when:
- os: windows
<home>/Documents/NEKO WORKs/nekopara_extra:
tags:
- config
- save
when:
- os: windows
<winAppData>/NEKO WORKs/nekopara_extra:
tags:
- config
- save
@ -155270,16 +155282,28 @@ NEKOPARA Vol. 2:
id: 420110
NEKOPARA Vol. 3:
files:
"<base>/config\n\n\n\n<winAppData>/NEKO WORKs/nekopara3\n\n\n<home>Documents/NEKO WORKs/nekopara_vol3":
<base>/config:
tags:
- config
when:
- os: windows
"<base>/savedata\n\n\n\n<winAppData>/NEKO WORKs/nekopara3\n\n\n<home>Documents/NEKO WORKs/nekopara_vol3":
<base>/savedata:
tags:
- save
when:
- os: windows
<home>/Documents/NEKO WORKs/nekopara_vol3:
tags:
- config
- save
when:
- os: windows
<winAppData>/NEKO WORKs/nekopara3:
tags:
- config
- save
when:
- os: windows
installDir:
NEKOPARA Vol. 3: {}
steam:
@ -160949,7 +160973,7 @@ Notrium:
- save
when:
- os: windows
<base>/save/s.sav:
<base>/save/s*.sav:
tags:
- config
when:
@ -185099,7 +185123,21 @@ Rayman Designer:
- os: dos
Rayman Fiesta Run:
files:
<winLocalAppData>/Packages/Ubisoft.RaymanFiestaRun_ngz4m417e0mpw <winLocalAppData>/Packages/Ubisoft.RaymanFiestaRunWindows10Edition_ngz4m417e0mpw <winLocalAppData>/Packages/UbisoftEntertainment.RaymanFiestaRunPreloadEdition_dbgk1hhpxymar:
<winLocalAppData>/Packages/Ubisoft.RaymanFiestaRunWindows10Edition_ngz4m417e0mpw:
tags:
- config
- save
when:
- os: windows
store: microsoft
<winLocalAppData>/Packages/Ubisoft.RaymanFiestaRun_ngz4m417e0mpw:
tags:
- config
- save
when:
- os: windows
store: microsoft
<winLocalAppData>/Packages/UbisoftEntertainment.RaymanFiestaRunPreloadEdition_dbgk1hhpxymar:
tags:
- config
- save
@ -277028,21 +277066,51 @@ Yu-Gi-Oh! Legacy of the Duelist:
id: 1150640
'Yu-Gi-Oh! Power of Chaos: Joey the Passion':
files:
See:
<base>/../Yu-Gi-Oh! Power of Chaos Common/*.ydc:
tags:
- save
when:
- os: windows
<base>/../Yu-Gi-Oh! Power of Chaos Common/*.ydr:
tags:
- save
when:
- os: windows
<base>/../Yu-Gi-Oh! Power of Chaos Common/system.dat:
tags:
- save
when:
- os: windows
'Yu-Gi-Oh! Power of Chaos: Kaiba the Revenge':
files:
See:
<base>/../Yu-Gi-Oh! Power of Chaos Common/*.ydc:
tags:
- save
when:
- os: windows
<base>/../Yu-Gi-Oh! Power of Chaos Common/*.ydr:
tags:
- save
when:
- os: windows
<base>/../Yu-Gi-Oh! Power of Chaos Common/system.dat:
tags:
- save
when:
- os: windows
'Yu-Gi-Oh! Power of Chaos: Yugi the Destiny':
files:
See:
<base>/../Yu-Gi-Oh! Power of Chaos Common/*.ydc:
tags:
- save
when:
- os: windows
<base>/../Yu-Gi-Oh! Power of Chaos Common/*.ydr:
tags:
- save
when:
- os: windows
<base>/../Yu-Gi-Oh! Power of Chaos Common/system.dat:
tags:
- save
when:

View file

@ -5620,7 +5620,7 @@ American McGee's Alice (2011):
revId: 976638
American McGee's Grimm:
pageId: 13683
revId: 968936
revId: 984000
American Mensa Academy:
pageId: 67448
revId: 958129
@ -24778,7 +24778,7 @@ Cryptographer:
revId: 848530
Cryptozookeeper:
pageId: 99204
revId: 848531
revId: 984011
Cryptrunner:
pageId: 135167
revId: 848532
@ -58613,7 +58613,7 @@ Kansei:
revId: 937925
Kao the Kangaroo:
pageId: 20358
revId: 935796
revId: 984002
'Kao the Kangaroo: Round 2':
pageId: 60616
revId: 971509
@ -71427,7 +71427,7 @@ MotoGP 19:
revId: 973854
MotoGP 2:
pageId: 8947
revId: 779294
revId: 984003
MotoGP 20:
pageId: 158061
revId: 973853
@ -73114,7 +73114,7 @@ NEKOPALIVE:
revId: 970132
NEKOPARA Extra:
pageId: 102813
revId: 896195
revId: 984006
NEKOPARA Vol. 0:
pageId: 27348
revId: 862615
@ -73126,7 +73126,7 @@ NEKOPARA Vol. 2:
revId: 972133
NEKOPARA Vol. 3:
pageId: 60784
revId: 972134
revId: 984008
NEKOPUGI:
pageId: 155735
revId: 930808
@ -75870,7 +75870,7 @@ Notmycar:
revId: 863401
Notrium:
pageId: 34693
revId: 863402
revId: 984009
Notruf 112 - Die Feuerwehr Simulation:
pageId: 53055
revId: 896636
@ -87523,7 +87523,7 @@ Rayman Designer:
revId: 968364
Rayman Fiesta Run:
pageId: 74002
revId: 964458
revId: 984010
Rayman Jungle Run:
pageId: 19499
revId: 963243
@ -129659,13 +129659,13 @@ Yu-Gi-Oh! Legacy of the Duelist:
revId: 974338
'Yu-Gi-Oh! Power of Chaos: Joey the Passion':
pageId: 99059
revId: 959162
revId: 984013
'Yu-Gi-Oh! Power of Chaos: Kaiba the Revenge':
pageId: 99051
revId: 959163
revId: 984014
'Yu-Gi-Oh! Power of Chaos: Yugi the Destiny':
pageId: 99043
revId: 959164
revId: 984015
Yucatan:
pageId: 128555
revId: 878713

View file

@ -245,22 +245,14 @@ function getRawPathFromCell(cell: string | PathCell): [string, boolean] {
if (segment === undefined) {
break;
}
if (typeof segment === "string") {
composite += segment;
} else if (segment.type === "transclusion") {
const [stringified, segmentRegular] = stringifyTransclusionCell(segment);
if (!segmentRegular) {
regular = false;
}
composite += stringified;
} else if (segment.type === "tag") {
const [stringified, segmentRegular] = stringifyTagCell(segment);
if (!segmentRegular) {
regular = false;
}
composite += stringified;
const [stringified, segmentRegular] = getRawPathFromCell(segment);
if (!segmentRegular) {
regular = false;
}
composite += stringified;
}
} else if (cell.type !== "comment" && cell.type !== "page_title") {
regular = false;
}
return [composite.trim(), regular];