<commit_before>let filewrite fn st =
  let o = open_out fn in
  output_string o st;
  close_out o;
  Printf.fprintf stderr "Output written on %s (%d bytes)\n%t"
    fn (String.length st) flush

let syspr cmd =
  Printf.fprintf stderr "(*%s*)\n%t" cmd flush;
  0==Sys.command cmd

let isyspr cmd = ignore(syspr cmd)

let drive stem bl =
  filewrite (stem^".tex") (Latex.xlate bl);
  filewrite (stem^".nr") (Nroff.xlate bl);
  filewrite (stem^".html") (Html.xlate bl);
  filewrite (stem^".rtf") (Rtf.xlate bl);

  if syspr("latex "^stem) then begin
    isyspr("dvips "^stem^" -o");
    (* isyspr("pdflatex "^stem) *)
    isyspr("dvipdfm -v "^stem)
  end;

  if syspr("nroff -c "^stem^".nr > "^stem^".tty") then begin
    isyspr("ul -t ansi "^stem^".tty > "^stem^".ansi");
    isyspr("ul -t dumb "^stem^".tty > "^stem^".txt");
  end<commit_msg>Delete LaTeX aux/log files, so I can glob-copy the output.<commit_after>let filewrite fn st =
  let o = open_out fn in
  output_string o st;
  close_out o;
  Printf.fprintf stderr "Output written on %s (%d bytes)\n%t"
    fn (String.length st) flush

let syspr cmd =
  Printf.fprintf stderr "(*%s*)\n%t" cmd flush;
  0==Sys.command cmd

let isyspr cmd = ignore(syspr cmd)

let drive stem bl =
  filewrite (stem^".tex") (Latex.xlate bl);
  filewrite (stem^".nr") (Nroff.xlate bl);
  filewrite (stem^".html") (Html.xlate bl);
  filewrite (stem^".rtf") (Rtf.xlate bl);

  if syspr("latex "^stem) then begin
    isyspr("rm -f "^stem^".aux "^stem^".log");
    isyspr("dvips "^stem^" -o");
    (* isyspr("pdflatex "^stem) *)
    isyspr("dvipdfm -v "^stem)
  end;

  if syspr("nroff -c "^stem^".nr > "^stem^".tty") then begin
    isyspr("ul -t ansi "^stem^".tty > "^stem^".ansi");
    isyspr("ul -t dumb "^stem^".tty > "^stem^".txt");
  end
{'fraction_non_alphanumeric': 0.19052987598647125, 'fraction_numerical': 0.0011273957158962795, 'mean_word_length': 3.5280612244897958, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6040254', 'n_tokens_mistral': 769, 'n_tokens_neox': 713, 'n_words': 198}