MakeReady

.psc export (PractiScore format)

A hit-factor (Comstock) match or training can be exported as a .psc file in two places. Time-plus events (LVR, multigun) cannot be exported in this format.

  • App (tablet or phone): the event → Results → Export .psc (.psc on a phone). The app builds the file from the data on the device, so it also works without internet, and asks what to do with it: Save to device (pick a folder such as Downloads, then import the file in the PractiScore app from there) or Share… (the share sheet: choose the PractiScore app directly, or Drive, mail, …).
  • Website (staff and admins of the event): the event → Results → Export .psc, or GET /api/v1/matches/:id/export.psc.

A competition that is one match (several trainings or matches of a club ranked together, see docs/scoring.md) is exported as one file: website → Competitions → the competition → Export .psc, or GET /api/v1/competitions/:id/export.psc (the admins of the club). The file is a single match with the name of the competition and the date of its first event: the stages of the combined match, every competitor once (numbered on, matched across the events by name) and the scores that count in the combined standings. The events become the squads of the file, so it shows who shot in which session. A series cannot be exported as one file; export its matches one by one.

The combined file is a match of its own: its match id, the id of every stage and the id of every competitor belong to this export alone (worked out from the competition, so they are the same every time it is exported) and are never the ids used in the files of the single events. An app that already holds the Tuesday and the Wednesday match sees a third match instead of offering to merge or overwrite one of them; importing a newer export of the same competition updates that third match.

All use the same builder (packages/scoring/src/psc.ts), so the files are identical for the same data. The app exports what it has synchronised; refresh first when other devices scored as well.

What is in the file

A .psc file is a ZIP with two JSON files:

  • match_def.json: the event (name, date, club), the divisions, the categories, the active stages with their paper targets (required hits) and the number of poppers and plates, and every competitor with number, squad, division, power factor and categories.
  • match_scores.json: per stage the latest approved revision of every competitor's score: time, the shot times from the timer (see below), hits per paper target, steel hit and missed, no-shoots, procedurals, DNF and DQ. Scores still awaiting approval are left out.

Hits are counted as on MakeReady: per paper target the best required hits count, missing hits become misses (not on a disappearing target) and at most two no-shoots count. Every paper target's hits are packed in one number (ts): A in bits 0–3, C in 8–11, D in 12–15, NS in 16–19 and M in 20–23.

Getting the results onto practiscore.com

There is no public upload interface, so MakeReady cannot publish there itself. The way to publish is the scoring app: import the .psc file in the PractiScore scoring app (Import/Export, or via the app's share sheet as above) and post the results from there with the club's account.

Importing a match scored in the PractiScore apps

Website → Matches → Import PractiScore: choose the file, the discipline (IPSC Handgun, FDS or LVR — any hit-factor discipline), the organising club (a MakeReady admin can pick any club, or "Another club" with a name: the club is then created without members and can claim it later), the visibility and, optionally, the yearly competition it counts for. MakeReady creates a finished match with the stages (the target list in its order — a target named Steel or without C/D zones becomes steel, the others paper with their required hits — then the poppers counted on the stage), the squads, the competitors (division, power factor, categories; a division name the MakeReady admins mapped under Admin → Division names lands in that division, other unknown division or category names are added to the match; a competitor without a valid number gets the next free one) and one approved score per competitor and stage: the hits from ts (A, C = B + C, D, NS, M; a steel target is hit when it has an A), the counted poppers from poph/popm, the time as the sum of the string times, the shot times from the string0 meta item, procedurals, DNF and DQ (also a stage DQ). The scores carry timerSource = psc_import. Hit-factor matches only.

The file is one of:

  • the .psc export of the scoring app (a ZIP with stored or deflated entries);
  • the results page of practiscore.com (/results/all/<id> or /results/new/<id>) saved from the browser as a complete HTML page ("Save page as…", Webpage, complete or HTML only): the page embeds the same two objects as matchDef = {…} and scores = {…} and MakeReady reads them from the script (the results tables are not needed);
  • a JSON file with those two objects ({ "matchDef": …, "scores": … }, { "match_def": …, "match_scores": … } or the two in an array), for example copied from the browser console.

Code: packages/scoring/src/pscImport.ts (mapping), pscPage.ts (the page) and POST /api/v1/matches/import/psc.

Known limits

  • The field set follows the publicly documented format and files read by existing tools; the import into the PractiScore app has not been tested with every app version. Report a file that does not import together with the app version.
  • Classes are not kept by MakeReady; every competitor is exported as unclassified (U).
  • Shot times: a score recorded with a shot timer (SG Timer, AMG Commander) carries the cumulative time of every shot; the export writes them as the PractiScore apps do, a meta item per string on the score: { "k": "string0", "v": "2.08,2.84,…,10.42;SG Timer", "t": "<recorded at>" }. MakeReady stages have one string (string0). After the semicolon comes the timer type (the timer's serial number is not recorded by MakeReady); t is when the score was recorded (UTC). Scores whose time was typed in have no shot times and only the string time (str); nothing is made up from it.
  • The files follow a match file that imports in the PractiScore app: match_scores_history is an object ({}; written as a list, the import failed without a message), every score has meta (empty without shot times), and the match, stage and competitor settings the app expects are present with its defaults (check-ins, power factor limits per division from MakeReady's thresholds, best string kept, …).