@@ -13,6 +13,21 @@ from commands that produce dynamic or variable output.
1313Creating a transcript
1414=====================
1515
16+ Automatically
17+ -------------
18+ A transcript can automatically generated based upon commands previously executed in the *history *::
19+
20+ (Cmd) help
21+ ...
22+ (Cmd) help history
23+ ...
24+ (Cmd) history 1:2 -t transcript.txt
25+ 2 commands and outputs saved to transcript file 'transcript.txt'
26+
27+ This is by far the easiest way to generate a transcript.
28+
29+ Manually
30+ --------
1631Here's a transcript created from ``python examples/example.py ``::
1732
1833 (Cmd) say -r 3 Goodnight, Gracie
@@ -38,9 +53,9 @@ lines of the transcript as comments::
3853 # Lines at the beginning of the transcript that do not
3954 ; start with the prompt i.e. '(Cmd) ' are ignored.
4055 /* You can use them for comments. */
41-
56+
4257 All six of these lines before the first prompt are treated as comments.
43-
58+
4459 (Cmd) say -r 3 Goodnight, Gracie
4560 Goodnight, Gracie
4661 Goodnight, Gracie
@@ -105,21 +120,21 @@ the path instead of specifying it verbatim, or we can escape the slashes::
105120 trailing spaces which are impossible to see. Instead of leaving them
106121 invisible, you can add a regular expression to match them, so that you can
107122 see where they are when you look at the transcript::
108-
123+
109124 (Cmd) set prompt
110125 prompt: (Cmd)/ /
111-
126+
112127 Some terminal emulators strip trailing space when you copy text from them.
113128 This could make the actual data generated by your app different than the
114129 text you pasted into the transcript, and it might not be readily obvious why
115130 the transcript is not passing. Consider using :ref: `output_redirection ` to
116131 the clipboard or to a file to ensure you accurately capture the output of
117132 your command.
118-
133+
119134 If you aren't using regular expressions, make sure the newlines at the end
120135 of your transcript exactly match the output of your commands. A common cause
121136 of a failing transcript is an extra or missing newline.
122-
137+
123138 If you are using regular expressions, be aware that depending on how you
124139 write your regex, the newlines after the regex may or may not matter.
125140 ``\Z `` matches *after * the newline at the end of the string, whereas
0 commit comments