relocate tools/ to Assets/Scripts/
This commit is contained in:
@@ -3,12 +3,12 @@ Scan TwitchDownloader chat JSONs for roster logins, download distinct profile im
|
|||||||
(commenter.logo) as JPEGs under Story/pfp/, and print markdown snippets (or patch files).
|
(commenter.logo) as JPEGs under Story/pfp/, and print markdown snippets (or patch files).
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
python tools/pfp_from_chat.py [--chat-root PATH] [--story-root PATH] [--no-write-md]
|
python Assets/Scripts/pfp_from_chat.py [--chat-root PATH] [--story-root PATH] [--no-write-md]
|
||||||
|
|
||||||
Defaults:
|
Defaults:
|
||||||
chat-root: MIXER_TWITCH_CHAT env, else Windows Synology path used in this project.
|
chat-root: MIXER_TWITCH_CHAT env, else Windows Synology path used in this project.
|
||||||
Writes JPEGs under Story/pfp/<slug>/ and inserts a marked section into each roster .md.
|
Writes JPEGs under Story/pfp/<slug>/ and inserts a marked section into each roster .md.
|
||||||
Also fills Story/Cameo-Creatures.md from CAMEO_ROSTER (see tools/pfp_from_chat.py).
|
Also fills Story/Cameo-Creatures.md from CAMEO_ROSTER (see Assets/Scripts/pfp_from_chat.py).
|
||||||
"""
|
"""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
@@ -15,13 +15,13 @@ Optional:
|
|||||||
PRISM_ORIGIN Default https://prism.tal.one (Origin + Referer for API calls)
|
PRISM_ORIGIN Default https://prism.tal.one (Origin + Referer for API calls)
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
python tools/prism_ingest.py list
|
python Assets/Scripts/prism_ingest.py list
|
||||||
python tools/prism_ingest.py parse Story/Azure.md
|
python Assets/Scripts/prism_ingest.py parse Story/Azure.md
|
||||||
python tools/prism_ingest.py parse Story/Azure.md --blob
|
python Assets/Scripts/prism_ingest.py parse Story/Azure.md --blob
|
||||||
python tools/prism_ingest.py inspect <CHARACTER_UUID>
|
python Assets/Scripts/prism_ingest.py inspect <CHARACTER_UUID>
|
||||||
python tools/prism_ingest.py sync
|
python Assets/Scripts/prism_ingest.py sync
|
||||||
python tools/prism_ingest.py sync --map-md
|
python Assets/Scripts/prism_ingest.py sync --map-md
|
||||||
$env:PRISM_ALLOW_WRITE='1'; $env:PRISM_API_KEY='…'; python tools/prism_ingest.py sync --apply --map-md
|
$env:PRISM_ALLOW_WRITE='1'; $env:PRISM_API_KEY='…'; python Assets/Scripts/prism_ingest.py sync --apply --map-md
|
||||||
|
|
||||||
Writes need a destination field on the character JSON. Run `inspect` on one id, pick a string or object slot
|
Writes need a destination field on the character JSON. Run `inspect` on one id, pick a string or object slot
|
||||||
(e.g. internal notes), pass its dot-path as --attach-field. Use --experimental-merge only if our blob keys
|
(e.g. internal notes), pass its dot-path as --attach-field. Use --experimental-merge only if our blob keys
|
||||||
@@ -868,7 +868,7 @@ def cmd_sync(args: argparse.Namespace) -> int:
|
|||||||
print(f"List failed HTTP {code}: {body[:1500]}", file=sys.stderr)
|
print(f"List failed HTTP {code}: {body[:1500]}", file=sys.stderr)
|
||||||
return 1
|
return 1
|
||||||
remote = _normalize_list_payload(json.loads(body))
|
remote = _normalize_list_payload(json.loads(body))
|
||||||
cfg_path = Path(args.match_profile) if args.match_profile else Path("tools/prism_match_overrides.json")
|
cfg_path = Path(args.match_profile) if args.match_profile else Path("Assets/Scripts/prism_match_overrides.json")
|
||||||
overrides, uuid_overrides = _load_match_config(cfg_path)
|
overrides, uuid_overrides = _load_match_config(cfg_path)
|
||||||
|
|
||||||
story = Path(args.story_root)
|
story = Path(args.story_root)
|
||||||
@@ -1044,7 +1044,7 @@ def main() -> int:
|
|||||||
p_sync = sub.add_parser("sync", help="Match local .md files to remote characters and merge-push")
|
p_sync = sub.add_parser("sync", help="Match local .md files to remote characters and merge-push")
|
||||||
p_sync.add_argument("--story-root", default="Story")
|
p_sync.add_argument("--story-root", default="Story")
|
||||||
p_sync.add_argument("--production", default=os.environ.get("PRISM_PRODUCTION_ID", "111"))
|
p_sync.add_argument("--production", default=os.environ.get("PRISM_PRODUCTION_ID", "111"))
|
||||||
p_sync.add_argument("--match-profile", default="tools/prism_match_overrides.json")
|
p_sync.add_argument("--match-profile", default="Assets/Scripts/prism_match_overrides.json")
|
||||||
p_sync.add_argument("--apply", action="store_true", help="Actually PUT/PATCH (needs PRISM_ALLOW_WRITE=1)")
|
p_sync.add_argument("--apply", action="store_true", help="Actually PUT/PATCH (needs PRISM_ALLOW_WRITE=1)")
|
||||||
p_sync.add_argument(
|
p_sync.add_argument(
|
||||||
"--attach-field",
|
"--attach-field",
|
||||||
Reference in New Issue
Block a user