home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 20 / AACD20.BIN / AACD / Utilities / afilter / aFilter.cfg < prev    next >
Text File  |  2001-03-18  |  9KB  |  418 lines

  1. /*
  2.     Amiga Filterium 2001 configuration file
  3.  
  4.     by Andy Silva + some kreative inspirations of LEA
  5.  
  6.     write to: silva@psi5.com
  7.     homepage: http://www.psi5.com/~silva/afilter/
  8. */
  9.  
  10. ; optional custom PlugIns directory
  11. ;
  12. ;PLUGINSDIRECTORY    = "path here"
  13.  
  14.  
  15. ; open own console window x/y/w/h
  16.  
  17. ;WINDOW            70/11/535/188
  18. ;WINDOW            0/0/605/199
  19. ;USEWINDOW        0/0/605/199
  20.  
  21.  
  22. ; global filehandling
  23.  
  24. FILEOPTIONS    ALLWAYSREQUESTER
  25. {
  26. ;    IFEXISTS    ADDNUMBER
  27.     REQUESTER    ASL
  28.     {
  29.         PATTERN    OFF
  30.         LEFT    330
  31.         TOP    5
  32.         WIDTH    207
  33.         HEIGHT    210
  34.     }
  35.     ;ALLFIXBEHIND
  36.     PATH        { SAVE ram: TEMP ram: }
  37.     COMMENT        "%type from %loadname - %afilter"
  38.     EXCLUDE    "(#?.(inf#?+htm#?+fnf+guide+asm+c+s+a+doc+i+h+dok+dox+txt+text+lst+log)+#?(readme+liesmich+displayme)#?)"
  39. }
  40.  
  41.  
  42. ; configurable color of bitplane in memview
  43.  
  44. SETPLUGIN    memview    { CFG { PLANECOLOR $044 } }
  45.  
  46.  
  47. ; default macro to use
  48.  
  49. DEFAULTCALL    ffa
  50.  
  51.  
  52. ; other global options
  53.  
  54. ;NOMOUSESTOP
  55. ;NOUSER
  56. ;REPORTDEBUG
  57.  
  58.  
  59.  
  60. ; simple macro to save the Kickstart ROM into a file
  61.  
  62. MACRO    kickromtofile
  63. {
  64.     DESC    "save Kickstart ROM image file"
  65.     CALL    selectkickrom
  66.     {
  67.         CALL    savefile
  68.     }
  69. }
  70.  
  71. ; annother simple one to find music in chipmem
  72.  
  73. MACRO    findchipsound
  74. {
  75.     DESC    "run unirip on the chipmem"
  76.     CALL    selectchipmem
  77.     {
  78.         CALL    scanloop        ; step it through
  79.         {
  80.             CALL    unirip.find
  81.             {
  82.                 CALL    savefile
  83.             }
  84.         }
  85.     }
  86. }
  87.  
  88.  
  89. ; next is to find all on a non AmigaDOS Amiga disk (games)
  90.  
  91. MACRO    fda
  92. {
  93.     DESC    "find all on a directoryless game disk"
  94.     CALL    disk.readimage { CALL ma_everythingrecursively }
  95. }
  96.  
  97.  
  98. ; the following macro was specified at the DEFAULTCALL keyword above,
  99. ; thus it will be used as default
  100. ;
  101. ;    it is optimized to find averagely everything
  102. ;    Amiga Filterium now _can_ find,
  103. ;    so, all plugins are used somehow
  104.  
  105. MACRO    ffa    ; after the keyword 'MACRO' follows the name
  106.         ; of the macro define here
  107.         ; 'ffa' I choosed for means 'find in file all'
  108.  
  109. {    ; open subsection for macro contents
  110.  
  111.     ; description for 'afilter MACROS' list of macros
  112.  
  113.     DESC    "find in file all and choose save or other"
  114.  
  115.     ; now the operation steps which this macro will do follow
  116.  
  117.     CALL    xvs.cleansys    ; survey memory from viruses
  118.  
  119.     ; first: use a builtin filter for first input,
  120.     ; 'loadfile' will load a file or open a requester
  121.     ; (other source-input-filters can be used here, too)
  122.  
  123.     CALL    loadfile
  124.  
  125.     {    ; open subsection for parameters to 'loadfile'
  126.         ; and to define what to do whit that file
  127.  
  128.         ; give a path where to start in the filerequester
  129.         ; if no filename is given in the commandline or
  130.         ; in some other ways per icon, opus, etc
  131.  
  132.         ;ARG    ram:
  133.  
  134.         ; lets use the macro named 'ma_everything' for
  135.         ; our input file (continue there, see below)
  136.  
  137.         ; change the following line to 'ma_simple'
  138.         ; or whatever you want to do with the file(s)
  139.  
  140.         CALL    ma_everythingrecursively
  141.     }
  142. }
  143.  
  144.  
  145.  
  146. ; now the macro 'ma_simple' follows
  147. ;
  148. ; As you can see it is not neccessary to put every keyword or
  149. ; subkeyword in a new line. As far as you know what you do...
  150. ; And again this macro calls other macros (see below)
  151.  
  152. MICRO    ma_simple
  153. {
  154.     ; input datas to this macro (the file) will be checked
  155.     ; for beeing xfd-compatible packed via the filter 'xfd.check'
  156.     ; from the plugin 'xfd', what to do if the _are_ follows in
  157.     ; a subsection to its call
  158.  
  159.     ; in the _same_  section as the call of 'xfd.check' follows
  160.     ; what to do if the input datas were _not_ xfd-compatible
  161.  
  162.     CALL xfd.check {CALL xfd.decrunch {CALL scanloop {CALL ma_whatis}}}
  163.  
  164.     ; if none of the above both filters matched,
  165.     ; the macro 'ma_whatis' (see below) is called to run the
  166.     ; other filters from other plugins on the input datas
  167.  
  168.     CALL scanloop {CALL ma_whatis}
  169.  
  170.     ; if none of the above filters matched, scan with xfd
  171.     ;    the call of the 'ma_whatis' macro in a subsection to
  172.     ;    'xfd.decrunch' works with the outputs from the decrunch
  173.  
  174.     CALL xfd.scan {CALL xfd.decrunch {CALL scanloop {CALL ma_whatis}}}
  175. }
  176.  
  177.  
  178.  
  179. ; The following does the same and even much more recursively!
  180. ; Why? Yeah ... don't ask me why someone put an lha-file in
  181. ; a powerpackerfile and that in some krzkrlcruncha or paranoimia uhhh...
  182.  
  183. MICRO    ma_everythingrecursively
  184. {
  185.     CALL    xvs.checkrepair { CALL ma_everythingrecursively }
  186.     CALL    disk.unflash { CALL ma_choice }
  187.     CALL    xad.unarc { CALL ma_everythingrecursively }
  188.     CALL    xfd.check { CALL xfd.decrunch { CALL ma_everythingrecursively } }
  189.     CALL    scanloop { CALL ma_whatis }
  190.     CALL    xfd.scan { CALL xfd.decrunch { CALL ma_everythingrecursively } }
  191.     CALL    ma_choice
  192.  
  193. ;    ; gag
  194. ;    PRINT    "Hello world!"
  195. ;
  196. ;    ; aufwändig, flexibel
  197. ;    CALL    filterselect { CALL filterselect }
  198. ;    CALL    macroselect
  199. ;
  200. ;    ; flexibel
  201. ;    IFCLASS    Protracker { CALL to_delitracker }
  202. ;
  203. ;    ; abwegig
  204. ;    INPUT    ...
  205.  
  206. }
  207.  
  208.  
  209.  
  210. ; the followings are called from multiple places above
  211.  
  212. MICRO    ma_whatis
  213. {
  214.     CALL    findtext { 
  215.  
  216.         ; remove ';' below for other opts combination
  217.         CFG    {
  218.             ;UPPERCASEONLY
  219.              MINLENGTH 30        ; default is 20
  220.             ;NOGAP            ; no 2 byte gaps of not-text
  221.             }
  222.         CALL textformat { CALL ma_choice } }
  223.  
  224.     CALL    iff.find { CALL ma_choice }
  225.     CALL    unirip.find { CALL ma_choice }
  226.     CALL    prowiz.find { CALL choice {
  227.  
  228.         ; do what
  229.  
  230.         ARG    "'s'ave, convert to 't'racker, 'm'emview"
  231.         CFG    {DEFAULT m}
  232.  
  233.         CALL    savefile
  234.         CALL    prowiz.tomod { CALL savefile }
  235.         CALL    memview.view { CALL savefile } }}
  236.  
  237.     CALL    hunk.find { CALL ma_choice }
  238. }
  239.  
  240. MICRO    ma_choice
  241. {
  242.     CALL    choice
  243.     {
  244.         ARG    "'s'ave, sc'a'n, 'm'emview, m'u'ltiview, cygnus 'e'd"
  245.         CFG    {DEFAULT m}
  246.  
  247.         CALL    savefile
  248.         CALL    ma_everythingrecursively
  249.         CALL    memview.view { CALL savefile }
  250.         CALL    to_multiview
  251.         CALL    to_ced
  252.     }
  253. }
  254.  
  255.  
  256. MICRO    ma_sfxsave
  257. {
  258.     CALL    choice    {
  259.  
  260.         ARG    "'s'ave, 'm'ake it Soundtracker15"
  261.         CFG    {DEFAULT s}
  262.  
  263.         CALL    savefile
  264.         CALL    unirip.sfxtomod { CALL    savefile } }
  265. }
  266.  
  267.  
  268.  
  269. MACRO   mvf
  270. {
  271.     DESC    "memview file, select and save range"
  272.     CALL    loadfile { CALL    memview.view { CALL savefile } }
  273. }
  274.  
  275. MACRO    uni
  276. {
  277.     DESC    "use unirip only"
  278.     CALL    loadfile {CALL scanloop {CALL unirip.find {CALL savefile}}}
  279. }
  280.  
  281. MACRO    eorfile
  282. {
  283.     DESC "make exclusive or on a file with a byte value"
  284.     CALL loadfile {CALL eor { CFG{BYTE=$FF} CALL ma_choice }}
  285. }
  286.  
  287. MACRO    unlink
  288. {
  289.     DESC    "separate linked files with xfd.unlink"
  290.     CALL    loadfile {CALL xfd.unlink {CALL savefile} }
  291. }
  292.  
  293. MACRO    clipboot
  294. {
  295.     DESC    "save the bootblock from a diskimage as file"
  296.     CALL    loadfile { CALL    selectrange {
  297.         CFG    { OFFSET 0 LENGTH $400 }
  298.         CALL    savefile } }
  299. }
  300.  
  301. MACRO    saveboot
  302. {
  303.     DESC    "view or save a disk bootblock to a file"
  304.     CALL    disk.readboot { CALL ma_choice }
  305. }
  306.  
  307. MACRO    makeadf
  308. {
  309.     DESC    "save a complete 880k Amiga disk to a file"
  310.     CALL    disk.readimage { CALL savefile }
  311. }
  312.  
  313. MACRO    unarc
  314. {
  315.     DESC    "unarchive anything, use XAD/XVS only"
  316.     CALL    loadfile { CALL xad.unarc {
  317.             CFG {MAKEDIRS, ALLFILES}
  318.  
  319.             CALL xvs.checkrepair { CALL savefile }
  320.  
  321.             CALL savefile } }
  322. }
  323.  
  324.  
  325.  
  326. ; paths and calls of external programs, batchfiles, arexx
  327. ;
  328. ;    - this macros are used from other macros
  329. ;      to have the paths to the programs only once
  330. ;    - they do not work as stand alone but from other macros
  331.  
  332.  
  333. MICRO    to_multiview    { CALL execute {ARG "sys:tool/multiview %"}}
  334. MICRO    to_ced        { CALL execute {ARG "sys:tool/ed %"}}
  335.  
  336.  
  337.  
  338. ; give global names to bundle settings for sounddatas
  339.  
  340. CLASS    Sound
  341. {
  342.     CLASS    Tracker
  343.     {
  344.         CLASS    Protracker
  345.         CLASS    Soundtracker15
  346.         CLASS    Startrekker
  347.         CLASS    StartrekkerAM
  348.  
  349.         ; save all tracker things to this path
  350.  
  351.         PATH    mod:
  352.  
  353.         COMMENT    "%loadname"
  354.     }
  355.  
  356.  
  357.     CLASS    Exotic
  358.     {
  359.         CLASS    SoundFX13
  360.         {
  361.             ; call macro automatically if SoundFX13 encountered
  362.  
  363.             AUTO    ma_sfxsave
  364.         }
  365.  
  366.         ; automatically invoke some patchers
  367.         ; if data of their type found
  368.  
  369.         CLASS    SidMon1        {AUTO unirip.patchsid}
  370.         CLASS    Gremlin        {AUTO unirip.patchgremlin}
  371.         CLASS    Whittacker    {AUTO unirip.patchdw}
  372.  
  373.         ; save these types to own path
  374.  
  375.         PATH    mus:
  376.     }
  377. }
  378.  
  379.  
  380. ; following class definition will call the macro 'to_ced' (see above,
  381. ; which sends to cygnus ed) everytime immediately
  382. ; when formated text is produced
  383.  
  384. ;CLASS    fText    { AUTO to_ced }
  385.  
  386.  
  387. ; Note: 'Text', 'Protracker', 'Soundtracker15' and 'SoundFX13' here are
  388. ; the names of the types of data as you can list them with afilter
  389. ; (shell command 'afilter ?' will bring you some infos on howto).
  390. ;
  391. ; But: 'Sound' and 'Tracker' actually are not an existing special
  392. ; type of data.
  393. ; Here they just hold the place and combine more specific types with
  394. ; the same reactions as you can see if you follow the hierarchy.
  395.  
  396.  
  397.  
  398. ; misc debug and test purpose macros
  399.  
  400. MACRO    disktest
  401. {
  402.     DESC "just for debug purposes"
  403.     call loadfile { call disk.unflash { call memview.view } }
  404. }
  405.  
  406. MACRO    testxvs
  407. {
  408.     DESC    "just for debugging"
  409.     CALL loadfile { call xvs.checkrepair { call memview.view } }
  410. }
  411.  
  412.  
  413. /* ----------------------------------------------------------------------
  414.  
  415.     ps: Zak McKracken for president
  416.  
  417. */
  418.