1 /* @source wossinput application
2 **
3 ** Finds programs by EDAM input data
4 **
5 ** @author Copyright (C) Peter Rice (pmr@ebi.ac.uk)
6 ** @@
7 **
8 ** This program is free software; you can redistribute it and/or
9 ** modify it under the terms of the GNU General Public License
10 ** as published by the Free Software Foundation; either version 2
11 ** of the License, or (at your option) any later version.
12 **
13 ** This program is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ** GNU General Public License for more details.
17 **
18 ** You should have received a copy of the GNU General Public License
19 ** along with this program; if not, write to the Free Software
20 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ******************************************************************************/
22
23 #include "emboss.h"
24
25
26
27
28 /* @prog wossinput ***********************************************************
29 **
30 ** Finds programs by EDAM input data
31 **
32 ******************************************************************************/
33
main(int argc,char ** argv,char ** env)34 int main(int argc, char **argv, char **env)
35 {
36
37 AjPList newlist = NULL;
38 AjPList glist; /* list of groups pointing to lists of programs */
39 AjPList alpha; /* alphabetical list of all programs */
40 AjPFile outfile = NULL;
41 AjPStr search = NULL;
42 AjBool showkey;
43 AjBool html;
44 AjBool groups;
45 AjBool alphabetic;
46 AjBool emboss;
47 AjBool embassy;
48 AjBool explode;
49 AjBool colon;
50 AjBool gui;
51 AjPStr showembassy;
52 AjBool sensitive = ajFalse;
53 AjBool subclasses = ajTrue;
54 AjBool obsolete = ajFalse;
55
56 embInit("wossinput", argc, argv);
57
58 search = ajAcdGetString("identifier");
59 outfile = ajAcdGetOutfile("outfile");
60 html = ajAcdGetToggle("html");
61 showkey = ajAcdGetBoolean("showkeywords");
62 groups = ajAcdGetBoolean("groups");
63 alphabetic = ajAcdGetBoolean("alphabetic");
64 emboss = ajAcdGetBoolean("emboss");
65 embassy = ajAcdGetBoolean("embassy");
66 showembassy = ajAcdGetString("showembassy");
67 explode = ajAcdGetBoolean("explode");
68 colon = ajAcdGetBoolean("colon");
69 gui = ajAcdGetBoolean("gui");
70 sensitive = ajAcdGetBoolean("sensitive");
71 subclasses = ajAcdGetBoolean("subclasses");
72 obsolete = ajAcdGetBoolean("obsolete");
73
74
75 glist = ajListNew();
76 alpha = ajListNew();
77
78 /* get the groups and program information */
79 embGrpGetProgGroups(glist, alpha, env, emboss, embassy, showembassy,
80 explode, colon, gui);
81
82
83 /* is a search string specified */
84 newlist = ajListNew();
85 if(alphabetic)
86 embGrpSearchProgsEdam(newlist, alpha, search, "input",
87 sensitive, subclasses, obsolete);
88 else
89 embGrpSearchProgsEdam(newlist, glist, search, "input",
90 sensitive, subclasses, obsolete);
91
92
93 embGrpOutputGroupsList(outfile, newlist, !groups, html,
94 showkey, showembassy);
95
96 ajFileClose(&outfile);
97
98 embGrpGroupsListDel(&newlist);
99 embGrpGroupsListDel(&glist);
100 embGrpGroupsListDel(&alpha);
101
102 ajFileClose(&outfile);
103 ajStrDel(&search);
104 ajStrDel(&showembassy);
105
106 embExit();
107
108 return 0;
109 }
110
111