home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 2536 / xtxt / anglais / xtxt.doc < prev    next >
Text File  |  1994-07-01  |  24KB  |  498 lines

  1.                 XTXT 1.01  User's Manual.
  2.  
  3.  
  4.  
  5.     1. Program description.
  6.  
  7.        The purpose of XTXT is to extract a set of characters from any type
  8.        of file, the text included in a program for instance. A front end
  9.        which uses menus, dialog boxes, etc. makes its usage handy.
  10.  
  11.        The program works as follows : It looks inside a file for a
  12.        continuation of n successive characters. These characters are
  13.        chosen in predefinite sets or selected one by one. You can display
  14.        the result of extraction on the screen (in the extraction buffer)
  15.        or save it in a text file.
  16.  
  17.        So, one can very easily recover help screens embedded in an executable
  18.        file, examine messages, look for keywords. Yet, you can extract the
  19.        text from a document which has been formatted by a word processor, a
  20.        database, etc.
  21.  
  22.        Moreover, XTXT can display any text file (its own files for instance)
  23.        or any binary file in a specific window (reading buffer).
  24.  
  25.        These two buffers (Extraction and reading) use the Borland's
  26.        Turbo-Vision syntax. This syntax is given in an annexe at the end
  27.        of this manual.
  28.  
  29.        Still, ASCII / ANSI text conversion functions have been included.
  30.  
  31.  
  32.     2. Working with XTXT.
  33.  
  34.        2.1. "File" menu.
  35.             - Change Dir. allows to modify the current directory.
  36.  
  37.             - TXT Extraction. Displays a dialog box for choosing the file
  38.               you want to examine and performs the text extraction. The
  39.               resulting text is displayed in a window.
  40.  
  41.             - You can save the result in a text file for a later reading.
  42.               This file which extension is ".XTX", is created in the same
  43.               directory than the source file. If an "XTX" file already
  44.               exists, it is replaced by the new one.
  45.               If you extract toward the screen and a file at the same time,
  46.               the saturation of one of them does not involve to stop the
  47.               extraction. For instance, if you have no more free memory,
  48.               the extraction will continue toward the output file (unless
  49.               the disk is full, naturally).
  50.  
  51.             - TXT Reading. Allows to read any text file (an "XTX" file for
  52.               instance). WARNING, the text files must not have lines
  53.               longer than 255 characters.
  54.  
  55.             - Binary Reading. Displays the content of any file (programs,
  56.               pictures, etc.). Each line begins with its address in hexa.
  57.               The line's length which can vary from 16 to 240 is always a
  58.               multiple of 16. If you specify the line's length in the
  59.               " output" dialog box, this length will be adjusted
  60.               automatically.
  61.  
  62.               The buffers' size is limited to 32767 lines. The size of the
  63.               output file is only limited by the amount of free space on the
  64.               disk.
  65.  
  66.               One can open up to 8 windows at the same time (extracting plus
  67.               reading windows).
  68.  
  69.             - ASCII -> ANSI and ANSI -> ASCII conversion. XTXT uses the
  70.               international ASCII set of characters for text output (default
  71.               set). Some programs, words processing under WINDOWS for
  72.               instance use another set : the ANSI one. The difference
  73.               concerns the characters comprise between 128 and 255,
  74.               accentuated letters for the most part. A good deal of them
  75.               are present in both sets so one can convert fairly an
  76.               accentuated text from one set to the other (seen in annex the
  77.               conversion table : file CONVERT.DOC).
  78.  
  79.               WARNING : Most of the documents which come from a word
  80.               processing, a spreadsheet or a database contain control
  81.               characters. Translating these characters is obviously a
  82.               nonsense so, the conversion program replace them by blank
  83.               spaces.
  84.               You must keep in mind that ASCII / ANSI conversion concerns
  85.               only the standard sets of characters and certainly not all
  86.               characters sets (look at the "Winding" font on WINDOWS WRITE
  87.               to understand the problem).
  88.  
  89.               The conversion resulting file has the same size than the
  90.               original document but owns a different extension (".ASC" for
  91.               ANSI -> ASCII and ".ANS" for ASCII -> ANSI conversions).
  92.  
  93.  
  94.             - DOS Shell. Allows to temporarely quit the program in order to
  95.               execute a DOS command. Typing "Exit" brings you back in the
  96.               program.
  97.  
  98.             - Exit. End of the program.
  99.  
  100.  
  101.        2.2. Options menu.
  102.  
  103.             - Research area. Displays an ASCII table with the characters
  104.               you have selected (white) and not selected (black). You can
  105.               modify this selection with the keyboard or the mouse.
  106.  
  107.                 - With the keyboard, move in the ASCII table by typing the
  108.                   arrow keys or type directly the letter you want to select.
  109.                   You can also select the letter under the cursor with the
  110.                   "ENTER" key.
  111.  
  112.                 - With the mouse. Just click on the selected character.
  113.  
  114.                   There are some predefinite research areas. You can select
  115.                   them in typing the function keys Fx (F2 to F7) or unselect
  116.                   them with Alt-Fx. There too, you can select theses areas
  117.                   by clicking on Fx or Alt-Fx (on the right in the table).
  118.                   F6 and F7 are useful for french text only.
  119.  
  120.                   Remark. Three characters are not displayed correctly :
  121.                   ASCII 0, 32 AND 255 which would appear as blank spaces
  122.                   are replaced by points. This is the only way to show if
  123.                   they are selected or not. Obviously, in the output file
  124.                   or in the displaying window, they are represented as
  125.                   they actually are.
  126.  
  127.             - Output filters. The menu items are :
  128.  
  129.                 - Number of contiguous characters. Defines the minimum number
  130.                   of characters of a "word". The default value (5) eliminates
  131.                   the erratic characters which are scattered in a file and
  132.                   permits an optimal text extraction from an exe file.
  133.                   On the other hand, if you wish to extract data from a
  134.                   word processor or editor document, the best result is
  135.                   obtained when using a value of 1.
  136.                   That number must be comprise between 1 and 254.
  137.  
  138.                 - Line feed. If you choose that option, every ASCII $0A
  139.                   character provokes a jump to the next line, even if this
  140.                   character is disactivated in the research area. This option
  141.                   is especially useful when you extract help text from an
  142.                   exe file. This type of text if very frequently formatted
  143.                   and the "line feed" option keeps its correct shape.
  144.  
  145.                 - Empty line. When you check that box, the empty or too
  146.                   short lines are retained. It is preferable to activate this
  147.                   option when you extract text from a text file (editor,
  148.                   word processor or database) in order to maintain its
  149.                   making up whereas, if you extract text from an exe file,
  150.                   that option makes big blank areas in the extraction buffer.
  151.  
  152.                 - Accents conversion. As seen above, some programs use
  153.                   ANSI characters for accentuated letters. For instance the
  154.                   "à" (ASCII 133) is coded "α" (ASCII 224). The same probleme
  155.                   arise when you get texts from non-PC computers (VAX for
  156.                   example).
  157.  
  158.                   If the conversion is off, these characters will be
  159.                   displayed just as they are (i.e. like greek letters
  160.                   α, Φ, Θ for instance).
  161.                   If you wish to perform "binary" extraction (for viewing
  162.                   a whole exe file for example), it is better to put the
  163.                   conversion off.
  164.  
  165.                 - Control-Z. If you check that box, the ASCII 26 character
  166.                   (end of text file) will be included in the research area.
  167.                   WARNING : If you include this character in the output file,
  168.                   you will not be able to read it fully : the reading process
  169.                   will be ended on the first occurence of this character.
  170.                   The default setting does exclude Control-Z.
  171.  
  172.                 - Control-M and Control-J (carriage return and end of line).
  173.                   These characters control the text file format. If you keep
  174.                   them, the output file displaying may be corrupted.
  175.  
  176.                 - Printer commands. Some characters (Form feed, "Escape"
  177.                   codes, etc.) are used for controls when printing. It is
  178.                   better to eliminate them if you wish to print the output
  179.                   file correctly. These characters are ASCII 0 to 31 + ASCII
  180.                   127.
  181.  
  182.                   When you modify the research area, it is not possible to
  183.                   activate these control characters if the corresponding
  184.                   option is off.
  185.  
  186.                   An advice to end this chapter : If you wish to avoid the
  187.                   cutting of words which are at the end of a line (frequent
  188.                   when you extract data from a text file) remove the
  189.                   ASCII 32 character (space) in the research area.
  190.  
  191.             - Result output.
  192.  
  193.                  - Output. Select the output peripheral : File and/or screen.
  194.                    The default output is the screen.
  195.  
  196.                  - File format. If you generate an output file, you can
  197.                    format it by 60 lines page ("page" mode). This option is
  198.                    useful if you wish to print a listing. Be careful to
  199.                    the control codes ("Escape" codes for instance). If
  200.                    you choose "continuous" (default), the output file remains
  201.                    just as it is.
  202.  
  203.                  - Information. Add a few lines on the top of the display
  204.                    (or output file) which remind the parameters of
  205.                    extraction.
  206.  
  207.                  - Line size. Sets the width of the line in the output buffer
  208.                    or file. This number must be comprise between 2 and 255.
  209.                    The line size must be greater than the number of
  210.                    continguous characters. The default setting is 78 which
  211.                    is the width of the extraction buffer.
  212.  
  213.                  - File extension. The default extension is ".XTX". It has
  214.                    been choosen in order to decrease the risk to erase an
  215.                    important file. Nevertheless, the user can custom this
  216.                    extension. When you read a file (TXT read), this
  217.                    extension is used as a filter.
  218.  
  219.                  - Complete name. The output file default name is Source
  220.                    path + source file name + Output extension. You can
  221.                    change the path and name if you wish by typing it in
  222.                    that box. Obviously, this option is used only if an
  223.                    output file is created. WARNING : If you wish to change
  224.                    the sole path, don't forget to end this one by the
  225.                    character "\".
  226.  
  227.             - File conversion.
  228.  
  229.               This menu allows to choose the parameters used in the ASCII /
  230.               ANSI conversion. It works just like the previous menu.
  231.  
  232.             - Save config.
  233.  
  234.               Every parameter you can change in the dialog boxes of the
  235.               "Options" menu (except the output file complete name) can be
  236.               saved in the XTXT.CFG file. This file is created in the same
  237.               directory than the XTXT.EXE's one. If the configuration file
  238.               is missing, the default settings are used.
  239.  
  240.               WARNING : the configuration file's name is made of : program
  241.               name + ".CFG". You will remark that both programs XTXT.EXE and
  242.               XTXT386.EXE generate two different configuration files which
  243.               are XTXT.CFG and XTXT386.CFG. If you rename XTXT.EXE
  244.               ZGLURB.EXE for instance, the configuration file will be named
  245.               ZGLURB.CFG.
  246.  
  247.             - Default config.
  248.  
  249.               Sets the default values of the parameters. WARNING : if you
  250.               have already saved a configuration file, it will be used in
  251.               the next session. There are two ways to suppress the old
  252.               configuration : Erase the XTXT.CFG file or activate "Default
  253.               config." and then "Save config.".
  254.  
  255.        2.3. "Tools" menu.
  256.  
  257.             - Memory. Indicates the amount of free or used memory and the
  258.               size of each buffer.
  259.  
  260.             - Find.
  261.             - Search again.
  262.  
  263.               Classical tools of string searching. The search string is
  264.               the one which is placed under the cursor (if there is one).
  265.               The search string's length cannot be wider than 255
  266.               characters.
  267.  
  268.             - Go to line number.
  269.  
  270.               Allows to jump to the desired line. The "search again"
  271.               command starts from the line you've jumped to. If the line
  272.               number is greater than the buffer size, the cursor jumps to
  273.               the last line.
  274.  
  275.         2.4. "Window" menu.
  276.  
  277.             - The "tile" and "cascade" commands set the windows for they are
  278.               all visible.
  279.  
  280.  
  281.     3. Information warnings.
  282.  
  283.        - Erasing a file.
  284.          When you create an output file, XTXT informs you when another
  285.          file with the same name already exists and asks you to confirm its
  286.          erasement.
  287.  
  288.        - Buffer full.
  289.          Each buffer is limited to 32767 lines. This size is quite sufficent
  290.          for almost every case. If you try to pass beyond this limit, the
  291.          program warns you that the display will be uncomplete.
  292.  
  293.        - Not enough memory.
  294.          If you extract too much data or read a too big file, memory
  295.          saturation can happens. XTXT itself retains about 15 Ko. (8086
  296.          version) or 250 Ko. (386 version) for its own running.
  297.  
  298.        - Unable to run the DOS shell.
  299.          If the memory amount is unsufficient, you cannot run a DOS session
  300.          from the program.
  301.  
  302.        - Packed files.
  303.          Some considerations on packed files. It is generally impossible to
  304.          extract any relevant data from this kind of files. XTXT warns you
  305.          when it detects one of them. Be careful : this program will not
  306.          find ALL packed files (it is not exactly its purpose) but can gives
  307.          you a hint in some cases. For instance the ".LZH", ".ARJ" or ".ZIP"
  308.          which are usually related to LHARC, ARJ or PKZIP/UNZIP programs
  309.          are detected.
  310.  
  311.          WARNING : In some case, the packer's name can be related to several
  312.          programs. Example : PKLITE can be used by PKLITE (obviously), SQZ
  313.          or ZIP2EXE (and maybe others).
  314.  
  315.          Some packers generate self-extractible archives (exe files). XTXT
  316.          detects most of them thanks to their header's signature.
  317.          Unfortunately, I have not been able to register all these programs,
  318.          so, these tests aren't absolutely complete. Anyway, running
  319.          theses archives will give you some information on their kind.
  320.  
  321.          A special chapter must be devoted to self-extractible programs.
  322.          (let's notice for instance the excellent Fabrice Bellard's LZEXE
  323.          or Microsoft's EXEPACK). XTXT warns you when it detects one of
  324.          these programs.
  325.  
  326.          In that case, except if you own the adequate unpacker, there is only
  327.          one method for scanning the program's content : To take a "snapshot"
  328.          in the course of their running. You will find on the disk a tool
  329.          (SNAPMEM.EXE), resident program which purpose is to save in a file
  330.          a "picture" of the DOS memory (less than 1 Mo.). This tools also
  331.          allows to read crypted exe file : the original file is crypted but
  332.          its image in memory is obviously not.
  333.  
  334.        - Empty file.
  335.  
  336.          If you try to extract data from a zero byte size file, XTXT warns
  337.          you.
  338.  
  339.        - Probably not text file.
  340.          When you use the "TXT reading" command, the programs checks if
  341.          the file is a text file. If it is not (an executable file for
  342.          instance), the text reading is not allowed (risk of program crash
  343.          and awful display). In this case, you'd better to use the
  344.          "Binary reading" command.
  345.  
  346.     4. Errors messages.
  347.  
  348.       - Syntax.
  349.         Every syntax error about the parameters is pointed out.
  350.  
  351.        - Line size.
  352.  
  353.          The line limits are set between 2 and 255 characters.
  354.  
  355.        - Number of contiguous characters.
  356.  
  357.          The number of continguous characters must be greater than 1 and
  358.          less than 254.
  359.  
  360.          Anyway, the line size must be greater than the number of
  361.          contiguous characters.
  362.  
  363.          If theses limits are exceeded, an error message is displayed.
  364.  
  365.        - No definite research area
  366.          If no character is selected in the research area table, XTXT
  367.          displays an error message.
  368.  
  369.     6. Miscellanous errors.
  370.  
  371.        - If there is not enough free memory, you cannot run the DOS shell.
  372.          In this case, close one window to free the memory.
  373.  
  374.        - A certain number of messages points out the read or write errors
  375.          (disk full, write protect, etc.). There is no need for a further
  376.          explanation.
  377.  
  378.  
  379.  
  380.     ANNEX 1. Turbo-Vision front end.
  381.  
  382.     In order to make the best use of XTXT, it is important to know the basic
  383.     commands for using windows, dialog boxes, etc.
  384.  
  385.          1. Menu line. One activate this line by clicking on or by typing
  386.             the F10 key then the arrow keys. Menu items are displayed in
  387.             grey if they are disactivated. The first letter (the red one)
  388.             is used as an activation key for the related item (hit Alt +
  389.             letter for direct running or Menu + letter if no hotkey is
  390.             definite).
  391.  
  392.         2. Status line (last line). This line recalls the most used commands.
  393.           Sometimes, error messages can be displayed in.
  394.  
  395.         3. Display window. This window appears as follows :
  396.  
  397.           a               b         c                     d
  398.  
  399.        ╔═[■]════════════ Extr. 386SPART.PAR ═════════════[|]═╗
  400.        ║                                                     █ e
  401.        ║                                                     ▒
  402.        ║                                                     ▒ f
  403.        ║                                                     ▒
  404.        ║                                                     ■ g
  405.        ║                                                     ▒
  406.        ║                                                     ▒
  407.        ║                                                     ▒
  408.        ║                                                     ▒
  409.        ║                                                     █
  410.        ╚═══21:10═══█▒▒▒▒▒▒▒▒▒▒▒▒■▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█─┘ h
  411.  
  412.          l     k             j              i
  413.  
  414.  
  415.         The buffer type (extraction or reading) is indicated in "b".
  416.         The file name is given in "c".
  417.         The cursor position Line:Column is displayed in "l".
  418.         The relative position of the text is indicated by the marks "g" and
  419.         "j" in the scrollers "f" and "i".
  420.  
  421.                                  Mouse          Keyboard
  422.  
  423.         a : closing box          Click          Ctl-F3
  424.  
  425.         d : zoom box             Click          F5
  426.  
  427.         e : vertical             Click on       Up and down arrows
  428.             scrolling            vertical       (line feed)
  429.                                  scroller       PgUp and PgDwn (next page)
  430.                                                 Ctl-PgUp and Ctl-PgDwn
  431.                                                 (top and bottom of text)
  432.  
  433.         k : horizontal           Click on       Right and left arrows
  434.             scrolling            horizontal     (character)
  435.                                  scroller       "Home" and "End"
  436.                                                 (start and end of line)
  437.  
  438.         Next window              Click on       F6
  439.                                  the window
  440.  
  441.         Resize window            Click on "h"   Ctl-F5 then Shift-arrow
  442.                                  and move       "Enter" to end.
  443.  
  444.         Move window              Click on the   Ctl-F5 then arrow keys
  445.                                  title bar      "Enter" to end.
  446.  
  447.  
  448.          4. Dialog box. You activate an option by clicking or typing the
  449.             hotkey Alt + letter (in this case, the selected letter is
  450.             colored in yellow). In several cases, one can see a little
  451.             box close to the input line (on the right). It is the "memo"
  452.             box where the previous inputs are maintained. You activate
  453.             the memo by typing the down arrow.
  454.  
  455.            Jumping from one item to the next is performed by typing "Tab"
  456.            or "Shift-Tab".
  457.  
  458.            Moving the dialog boxes is identical to the windows' : With
  459.            the mouse, click on the title bar and move. With the keyboard,
  460.            Ctl-F5 then arrow keys.
  461.  
  462.         5. One special dialog box is used for grabbing the file names.
  463.            It is figured as follows :
  464.  
  465.           a                              b
  466.  
  467.        ╔═[■]═══════════════ Open file ══════════════════╗
  468.        ║                                                ║
  469.        ║  Name                                          ║
  470.     j  ║  [*.*                        ] [|]   [Open   ] ║   c
  471.        ║                                                ║
  472.        ║  Files                               [Cancel ] ║   d
  473.        ║  │AUTOEXEC.BAT   │               │             ║
  474.        ║  │CONFIG.SYS     │               │             ║
  475.     i  ║  │NDOS.COM       │               │             ║
  476.        ║  │386SPART.PAR   │               │             ║
  477.     h  ║  │ ..\           │               │             ║
  478.        ║  │               │               │             ║
  479.     g  ║  █▒▒▒▒▒▒▒▒■▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█             ║
  480.        ║                                                ║
  481.     f  ║  C:\*.*                                        ║
  482.     e  ║  AUTOEXEC.BAT  1254   Oct 29,  1994  19:00am   ║
  483.        ╚════════════════════════════════════════════════╝
  484.  
  485.  
  486.                                     Mouse           Keyboard
  487.  
  488.         a : closing box             Click           Escape
  489.         b : memo box                Click           Down arrow key
  490.         c : Open button             Click           Alt-O or Enter
  491.         d : Cancel button           Click           Escape or Enter
  492.         g : scroller                Click           Arrow keys
  493.         h : Previous directory      Double click    idem + Enter
  494.         i : File selection          Double click    idem + Enter
  495.  
  496.         The selected name is displayed in "j". The current directory and
  497.         file informations are located in "f" and "e".
  498.