Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Batch file makes SFK help files.

2008-07-17
2013-01-06
  • SFK is not yet powerful enough to replace Windows XP, but it is very powerful.

    This batch file generates all the SFK help files:

    ::     SFK_DOC.BAT
    :: ___________________________________________________________
    ::
    :: Make all Swiss File Knife help files.
    ::
    :: Usage: SFK_Doc <version-number-or-none>
    :: ___________________________________________________________
    ::
    @echo off
    ::
    :: Main help file:
    sfk%1.exe               > sfk.txt
    ::
    :: General methods:
    sfk%1.exe help chain    > sfk_Combine_Multiple_Commands.txt
    sfk%1.exe help colors   > sfk_Change_Result_Colors.txt
    sfk%1.exe help options  > sfk_Options_and_Config.txt
    sfk%1.exe help patterns > sfk_Wildcards_and_Slash_Patterns.txt
    sfk%1.exe help select   > sfk_Select_Files.txt
    ::
    :: Specific capabilities with extended parameters:
    sfk%1.exe bin-to-src    > sfk_Bin-to-Src.txt
    sfk%1.exe del           > sfk_Delete_Files.txt
    sfk%1.exe ff            > sfk_File_Find.txt
    sfk%1.exe filter        > sfk_Filter.txt
    sfk%1.exe fromclip -h   > sfk_From_Clipboard.txt
    sfk%1.exe hexdump       > sfk_Hex_Dump.txt
    sfk%1.exe list          > sfk_List.txt
    sfk%1.exe patch         > sfk_Patch_Source_File.txt
    sfk%1.exe rep           > sfk_Replace_in_File.txt
    sfk%1.exe scantab       > sfk_Scan_for_Tabs.txt
    sfk%1.exe snapto        > sfk_Snapto_Collect_Text_Files.txt
    sfk%1.exe split         > sfk_File_Split.txt
    sfk%1.exe tail          > sfk_Tail_Last_Lines.txt
    sfk%1.exe tcpdump       > sfk_TCP_Hex_Dump.txt
    sfk%1.exe view          > sfk_Depeche_View_Text.txt

     
    • This version puts the word HELP in the names of the generated general configuration help file names. That makes it easier to find them.

      _____________________________

      ::     SFK_DOC.BAT
      :: ___________________________________________________________
      ::
      :: Make all Swiss File Knife help files.
      ::
      :: Usage: SFK_Doc <version-number-or-none>
      :: ___________________________________________________________
      ::
      :: @echo off
      ::
      :: Main help file:
      sfk%1.exe               > sfk.txt
      ::
      :: General methods:
      sfk%1.exe help colors   > sfk_Help_Change_Result_Colors.txt
      sfk%1.exe help chain    > sfk_Help_Combine_Multiple_Commands.txt
      sfk%1.exe help options  > sfk_Help_Options_and_Config.txt
      sfk%1.exe help select   > sfk_Help_Select_Files.txt
      sfk%1.exe help patterns > sfk_Help_Wildcards_and_Slash_Patterns.txt
      ::
      :: Specific capabilities with extended parameters:
      sfk%1.exe bin-to-src    > sfk_Bin-to-Src.txt
      sfk%1.exe del           > sfk_Delete_Files.txt
      sfk%1.exe ff            > sfk_File_Find.txt
      sfk%1.exe filter        > sfk_Filter.txt
      sfk%1.exe fromclip -h   > sfk_Clipboard_From.txt
      sfk%1.exe hexdump       > sfk_Hex_Dump.txt
      sfk%1.exe list          > sfk_List.txt
      sfk%1.exe patch         > sfk_Patch_Source_File.txt
      sfk%1.exe rep           > sfk_Replace_in_File.txt
      sfk%1.exe scantab       > sfk_Scan_for_Tabs.txt
      sfk%1.exe snapto        > sfk_Snapto_Collect_Text_Files.txt
      sfk%1.exe split         > sfk_File_Split.txt
      sfk%1.exe tail          > sfk_Tail_Last_Lines.txt
      sfk%1.exe tcpdump       > sfk_TCP_Hex_Dump.txt
      sfk%1.exe view          > sfk_Depeche_View_Text.txt

       
    • This batch file will generate apparently ALL of the SFK help files.

      In many cases, something that SFK does is the best way to do it, so the documentation is important.

      :: ___________________________________________________________
      ::
      ::     SFK_DOC.BAT
      ::
      :: Make all Swiss File Knife (SFK) help files.
      ::
      ::   Usage: SFK_Doc <version-number-or-none>
      ::
      :: Example: SFK_Doc 150
      ::          Makes all help files for version 150. (sfk150.exe)
      ::
      :: ___________________________________________________________
      ::
      @echo off
      ::
      :: Main help file:
      sfk%1.exe                > sfk.txt
      ::
      :: General methods:
      sfk%1.exe help colors    > sfk_Help_Change_Result_Colors.txt
      sfk%1.exe help chain     > sfk_Help_Combine_Multiple_Commands.txt
      sfk%1.exe      errortest > sfk_Help_Error_Handling.txt
      sfk%1.exe help options   > sfk_Help_Options_and_Config.txt
      sfk%1.exe help select    > sfk_Help_Select_Files.txt
      sfk%1.exe help patterns  > sfk_Help_Wildcards_and_Slash_Patterns.txt
      ::
      :: Specific capabilities with extended parameters:
      sfk%1.exe alias          > sfk_Alias_Command_Shortcuts.txt
      sfk%1.exe bin-to-src     > sfk_Bin-to-Src.txt
      sfk%1.exe fromclip -h    > sfk_Clipboard_From.txt
      sfk%1.exe del            > sfk_Delete_Files.txt
      sfk%1.exe dupfind        > sfk_Duplicate_File_Finder.txt
      sfk%1.exe echo           > sfk_Echo_to_Console.txt
      sfk%1.exe ff             > sfk_File_Find.txt
      sfk%1.exe filter         > sfk_Filter.txt
      sfk%1.exe find           > sfk_Find_in_File.txt
      sfk%1.exe ftp            > sfk_FTP_Connection.txt
      sfk%1.exe ftpserv -help  > sfk_FTP_Server.txt
      sfk%1.exe hexdump        > sfk_Hex_Dump.txt
      sfk%1.exe list           > sfk_List_Files_like_Dir.txt
      sfk%1.exe md5            > sfk_MD5_Calculate_Hash.txt
      sfk%1.exe patch          > sfk_Patch_Source_File.txt
      sfk%1.exe reflist        > sfk_Referenced_Files_List.txt
      sfk%1.exe replace        > sfk_Replace_in_File.txt
      sfk%1.exe run            > sfk_Run_Command.txt
      sfk%1.exe scantab        > sfk_Scan_for_Tabs.txt
      sfk%1.exe snapto         > sfk_Snapto_Collect_Text_Files.txt
      sfk%1.exe split          > sfk_File_Split.txt
      sfk%1.exe synctext       > sfk_Collect_Text_Files_for_Editing.txt
      sfk%1.exe tail           > sfk_Tail_Last_Lines.txt
      sfk%1.exe tcpdump        > sfk_TCP_Hex_Dump.txt
      sfk%1.exe view           > sfk_Depeche_View_Text.txt

       
    • stahlworks
      stahlworks
      2008-07-20

      And if you like to create one large html, you may try this:

      ----- do-make-html.bat begin -----
      @echo off
      sfk echo -spat "<html><body><pre>\n" >sfkhelp.html
      sfk -html >>sfkhelp.html
      sfk echo " " >>sfkhelp.html
      rem call sub-make-html.bat addhead
      rem call sub-make-html.bat addtail
      call sub-make-html.bat alias
      call sub-make-html.bat bin-to-src
      call sub-make-html.bat color
      call sub-make-html.bat crlf-to-lf
      call sub-make-html.bat deblank
      call sub-make-html.bat del
      call sub-make-html.bat deplist
      call sub-make-html.bat detab
      call sub-make-html.bat dupfind
      call sub-make-html.bat echo
      call sub-make-html.bat filter
      call sub-make-html.bat find
      call sub-make-html.bat fromclip -h
      call sub-make-html.bat ftp
      call sub-make-html.bat ftpserv -h
      call sub-make-html.bat grep
      rem call sub-make-html.bat help
      call sub-make-html.bat hexdump
      call sub-make-html.bat hextobin
      call sub-make-html.bat inst
      call sub-make-html.bat join
      call sub-make-html.bat lf-to-crlf
      call sub-make-html.bat list
      call sub-make-html.bat md5
      call sub-make-html.bat md5check
      call sub-make-html.bat md5gento
      call sub-make-html.bat mkcd
      call sub-make-html.bat patch
      call sub-make-html.bat pathfind
      call sub-make-html.bat reflist
      call sub-make-html.bat remcr
      call sub-make-html.bat rep
      call sub-make-html.bat run
      call sub-make-html.bat runloop
      call sub-make-html.bat scantab
      call sub-make-html.bat snapto
      call sub-make-html.bat split
      call sub-make-html.bat stat
      rem call sub-make-html.bat strings
      call sub-make-html.bat synctext
      call sub-make-html.bat tail
      call sub-make-html.bat tcpdump
      rem call sub-make-html.bat text-join-lines
      ----- do-make-html.bat end -----

      ----- sub-make-html.bat begin -----
      @echo off
      sfk -html %1 %2 >>sfkhelp.html
      sfk echo " " >>sfkhelp.html
      ----- sub-make-html.bat end -----

      However, i haven't checked recently if the above batch
      still covers all commands.

       
  • periboob
    periboob
    2009-09-26

    I had done a bit of tinkering based on the previous posts, and came up with a generator for linked HTML format help. But could not post it. The forum software keeps interacting with my code. Am I doing something wrong? Has anyone else had similar problems? Maybe new forum software? 

     
  • Could you update your batch files do-make-html.bat and sub-make-html.bat?

    It could cover all commands. The above has an error. There apparently is no "synctext".