SRCREDACT(1)
π SRCREDACT(1) β the Text tools girly π
okay bestie so this is the manual page for srcredact, from section 1 of the man pages (the Text tools girlies β¨). it redacts text files. yes. literally that. let's go π«Ά
β¨ NAME β¨
srcredact β a program for redaction of text files. she does one thing and she does it iconically π
π SYNOPSIS π
srcredact [OPTIONS] -e audience [full_file]
srcredact [OPTIONS] -u audience full_file [redacted_file]
srcredact -l [full_file]
srcredact -h|-v
π¦ DESCRIPTION π¦
so srcredact is THE program that either pulls redacted versions'' out of the master file (that's option `-e`, the extract vibe) or takes the changes you made in the redacted versions and shoves them back into the master file (that's the unredact'' girl, option -u). no cap. π₯
the master file is basically a bunch of chunks, and each chunk is meant for a different audience. every audience has a name, like "classified", "unclassified", "expert" etc. chunks get started and stopped by guard lines. each guard line has this format (this is for the default TeX syntax, keep up bestie):
%<*name1|name2|...>
or
%</name1|name2|...>
first case: everything after the guard is included for the audiences "name1", "name2", .... second case: it's excluded for those audiences. periodt. π
there's also a special audience called "ALL" β she's a wild card for literally every audience. so this idiom:
%</ALL>
%<*classified>
means the chunk is excluded for all audiences but "classified". main character energy tbh π
exactly one of the options -e (extract) or -u (unextract) has to be present, okay? exactly one. not zero, not two. π
in extract mode, the non-option argument is the name of the full file. if it's missing, or if it's "-", then standard input gets used. in the unextract mode the first non-option argument
yes bestie the sentence really does just end there in the original. the manpage said "and that's it, i'm done" π iconic behavior honestly. moving on!!
πΈ OPTIONS πΈ
-clist of comment patterns β use the given pattern for comment lines when searching for guards, instead of the default"TeX"pattern. the recognized patterns are:c
/*<guard>*/
cpp
//<guard>
fortran
C<guard>
shell
#<guard>
TeX
%<guard>
the pattern names should be separated by commas, and the list can be wrapped in quotes to stop the shell from doing shell expansion things to it, e.g.
-c "TeX, c, shell"
-dβ debug mode on. we're snooping now π-eaudience β extract the contents for the current audience into the file file. the current audience gets guessed from the file name, if that name has the structurebase-audience.extension, e.g."report-unclassified.tex". the key-aoverrides this guess and should be used if the file name does not follow this pattern. the file name"-"means standard output.-hβ print help information and exit. we love a girl who explains herself π«Ά-lβ list all audiences set in the file (one per line) and exit. little lineup, so satisfying β¨-uaudience β take an edited file intended for the audience (that's the second non-option argument) and incorporate the changes in it into the full file (that's the first non-option argument). if the second argument is missing, standard input is used instead. as usual,"-"also means standard input. and note: only one of the two file arguments in this case can be standard input. not both. i don't make the rules, bestie π-vβ print version information and exit. a little "who am i" moment π-won|off|1|0|true|false β if it's"on",1or"true"(the default), implicitly wrap the full document into the guards
%<*ALL>
...
%</ALL>
π RETURN VALUE π
the program returns 0 if everything went great, 1 if conflicts were found in the "unextract" mode, and 2 in case of problems. so like, zero is the slay, one is the drama, two is the crisis π
π₯ CONFLICTS IN UNEXTRACT MODE π₯
just like the standard diff3(1) tool, the program may find conflicts between the full version and the edited one in the -u mode. when that happens, the resulting file brackets the conflicts in the usual manner, e.g.
<<<<<<< /tmp/BrjXo0hMOB/full
%</nobonds>
Forty-five tons best old dry government bonds, suitable for furnace, gold
7 per cents., 1864, preferred.
%<*nobonds>
||||||| /tmp/BrjXo0hMOB/extracted
Forty-five tons best old dry government bonds, suitable for furnace, gold
7 per cents., 1864, preferred.
=======
>>>>>>> /tmp/BrjXo0hMOB/new
so here "full" is the full document, "extracted" is the extracted file for the given audience, and "new" is the edited file. three girlies, one conflict, we've all been there π
π AUTHOR π
Boris Veytsman, borisv@lk.net
this work was commissioned by Consumer Financial Protection Bureau, United States Treasury. (yes the actual US Treasury. she's employed-employed π)
π LICENSE AND COPYRIGHT π
Copyright (C) 2015 Boris Veytsman. Version 1.0
this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details.
you should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
okay that's the whole thing bestie, and this was version 1.0, dated 2015-10-24 β go forth and redact responsibly, mwah πβ¨π
π¦ where this page comes from
- alpine 3.24: texmf-dist-binextra-doc 2026.0-r0 Β· LPPL-1.0 AND LPPL-1.1 AND LPPL-1.2 AND LPPL-1.3a AND LPPL-1.3c AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms