Syntax:
gmX injector (field) (inputfile) (mode)takes data from the specified inputfile, which should be in the .forw format of the extractor:
charfile1 first line of thing1 maybe more of thing1 maybe even more of thing1 first line of thing2 maybe more of thing2 maybe even more of thing2, etc first line of thing3 ... charfile2 first line of thing4 etc, etcand considers it a mapping between the charfiles (no .tex suffixes) specified in inputfile and the contents of the extractable specified by field. It looks in Charsheets for those charfiles and changes them.
If mode is --replace
(or -r
),
the current content of that extractable field for the specified charfiles
is replaced with the injected content. (Initial comments survive.)
This is the usual mode. The alternative is --add
(or -a
), for which the injected contents are added
at the end of the current contents.
The inputfile is almost always either a .forw file produced
by the extractor and edited by you, or a file produced by
invertmap acting on a .back file which was
produced by the extractor and edited by you. In either case, the format
of the file should be ok if you maintain the pattern while editing,
and --replace
will be the appropriate mode.
If an injection fails for a charsheet, look at it. Possible causes include the file being read-only or the file not having the extractable field present.
The old versions will be in charfile1.old, charfile2.old, etc; you look at the differences between the .old files and the .tex files before you blow away the .old files. This is especially true when you (as usual) use --replace, since you're losing old content. Be careful.
Also see the other mass-editing scripts.