@staff0rd/assist 0.621.0 → 0.622.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.621.0",
9
+ version: "0.622.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -32448,20 +32448,22 @@ ${text18}`;
32448
32448
  function formatNoteBlock(lines2) {
32449
32449
  return lines2.length ? [lines2.map((line) => `NOTE ${line}`).join("\n")] : [];
32450
32450
  }
32451
- function formatPassage(passage) {
32451
+ function formatPassage(passage, sourceMarks) {
32452
32452
  return [
32453
- `NOTE source: ${passage.source} @ ${formatClock(passage.sourceStartMs)}`,
32453
+ ...sourceMarks ? [
32454
+ `NOTE source: ${passage.source} @ ${formatClock(passage.sourceStartMs)}`
32455
+ ] : [],
32454
32456
  ...passage.cues.map(formatCue)
32455
32457
  ];
32456
32458
  }
32457
32459
  function formatVtt(cues) {
32458
32460
  return ["WEBVTT", ...cues.map(formatCue)].join("\n\n");
32459
32461
  }
32460
- function formatVttPassages(passages, notes = []) {
32462
+ function formatVttPassages(passages, notes = [], { sourceMarks = true } = {}) {
32461
32463
  return [
32462
32464
  "WEBVTT",
32463
32465
  ...formatNoteBlock(notes),
32464
- ...passages.flatMap(formatPassage)
32466
+ ...passages.flatMap((passage) => formatPassage(passage, sourceMarks))
32465
32467
  ].join("\n\n");
32466
32468
  }
32467
32469
 
@@ -32736,9 +32738,11 @@ async function merge(files, options2 = {}) {
32736
32738
  const passages = rebasePassages(
32737
32739
  selection ? selectPassages(sources, selection) : wholePassages(sources)
32738
32740
  );
32741
+ const provenance = options2.provenance !== false;
32739
32742
  const document = formatVttPassages(
32740
32743
  passages,
32741
- headerNotes(sources, selection?.removed ?? [])
32744
+ provenance ? headerNotes(sources, selection?.removed ?? []) : [],
32745
+ { sourceMarks: provenance }
32742
32746
  );
32743
32747
  if (!options2.out) {
32744
32748
  console.log(document);
@@ -32807,7 +32811,9 @@ function transcriptWorkflowHelp() {
32807
32811
  "",
32808
32812
  " 3. Merge assist transcript merge ./a.vtt ./b.vtt --select ./selection.json --out ./merged.vtt",
32809
32813
  " Cue times are rebased onto one continuous timeline; the sources, the",
32810
- " removal count and each passage's original start survive as NOTE blocks."
32814
+ " removal count and each passage's original start survive as NOTE blocks.",
32815
+ " Add --no-provenance when the merged file leaves for somewhere the source",
32816
+ " names and cut points should not follow."
32811
32817
  ].join("\n");
32812
32818
  }
32813
32819
 
@@ -32826,6 +32832,9 @@ function registerTranscript(program2) {
32826
32832
  ).option("--out <path>", "write the merged transcript to this path").option(
32827
32833
  "--select <file|->",
32828
32834
  "keep/removed JSON naming the passages to keep (- for stdin)"
32835
+ ).option(
32836
+ "--no-provenance",
32837
+ "omit every NOTE: the Collapsed-from header, the per-passage source marks and the removed count"
32829
32838
  ).action(merge);
32830
32839
  transcriptCommand.command("move <file>").description(
32831
32840
  "Convert a raw .vtt to a dated markdown transcript and archive the original"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.621.0",
3
+ "version": "0.622.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {