forked from tTh/FloatImg
74 lines
1.5 KiB
C
74 lines
1.5 KiB
C
/*
|
|
* +-------------------------+
|
|
* | S I N G L E P A S S |
|
|
* +-------------------------+
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
#include "../floatimg.h"
|
|
|
|
#include "single.h"
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
int verbosity;
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* ----------------------------------------------------------- */
|
|
static void help(void)
|
|
{
|
|
puts("--- Single pass serial filter ---\nusage:");
|
|
|
|
puts("\t-F\tdefine:the:filter:chain");
|
|
puts("\t-g\tinput glob pattern");
|
|
puts("\t-L\tlist available filters");
|
|
puts("\t-O\t/output/directory");
|
|
// puts("\t-s\tdo single test");
|
|
puts("\t-v\tspit more messages");
|
|
|
|
exit(0);
|
|
}
|
|
/* ----------------------------------------------------------- */
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int foo, opt;
|
|
char *filterchain = "none";
|
|
char *globbing = "./capture/?????.fimg";
|
|
char *outdir = "./png/";
|
|
int do_xper = 0;
|
|
|
|
fprintf(stderr, "*** %s : compiled %s %s\n", __FILE__,
|
|
__DATE__, __TIME__);
|
|
fimg_print_version(2);
|
|
|
|
while ((opt = getopt(argc, argv, "hF:g:LO:svx")) != -1) {
|
|
switch (opt) {
|
|
case 'h': help(); break;
|
|
|
|
case 'F': filterchain = optarg; break;
|
|
case 'g': globbing = optarg; break;
|
|
|
|
case 'L':
|
|
list_crapulors("available filters");
|
|
exit(0);
|
|
|
|
case 'O': outdir = optarg; break;
|
|
|
|
case 'v': verbosity++; break;
|
|
|
|
case 'x': do_xper = 1; break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* ----------------------------------------------------------- */
|