ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/crab_help.py
Revision: 1.42
Committed: Tue Dec 11 16:20:28 2007 UTC (17 years, 4 months ago) by fanzago
Content type: text/x-python
Branch: MAIN
CVS Tags: CRAB_2_0_4, CRAB_2_0_4_pre2, CRAB_2_0_4_pre1
Changes since 1.41: +8 -0 lines
Log Message:
added -publish option to help

File Contents

# Content
1
2 ###########################################################################
3 #
4 # H E L P F U N C T I O N S
5 #
6 ###########################################################################
7
8 import common
9
10 import sys, os, string
11
12 import tempfile
13
14 ###########################################################################
15 def usage():
16 usa_string = common.prog_name + """ [options]
17
18 The most useful general options (use '-h' to get complete help):
19
20 -create -- Create all the jobs.
21 -submit n -- Submit the first n available jobs. Default is all.
22 -status -- check status of all jobs.
23 -getoutput|-get [range] -- get back the output of all jobs: if range is defined, only of selected jobs
24 -publish [dbs_url] -- after the getouput, publish the data user in a local DBS instance
25 -kill [range] -- kill submitted jobs
26 -cancelAndResubmit [range] -- kill and resubmit submitted jobs
27 -clean -- gracefully cleanup the idrectory of a task
28 -testJdl [range] -- check if resources exist which are compatible with jdl
29 -list [range] -- show technical job details
30 -postMortem [range] -- provide a file with information useful for post-mortem analysis of the jobs
31 -printId [range] -- print the job SID
32 -continue|-c [dir] -- Apply command to task stored in [dir].
33 -h [format] -- Detailed help. Formats: man (default), tex, html, txt.
34 -cfg fname -- Configuration file name. Default is 'crab.cfg'.
35 -debug N -- set the verbosity level to N
36 -v -- Print version and exit.
37
38 "range" has syntax "n,m,l-p" which correspond to [n,m,l,l+1,...,p-1,p] and all possible combination
39
40 Example:
41 crab -create -submit 1
42 """
43 print
44 sys.exit(2)
45
46 ###########################################################################
47 def help(option='man'):
48 help_string = """
49 =pod
50
51 =head1 NAME
52
53 B<CRAB>: B<C>ms B<R>emote B<A>nalysis B<B>uilder
54
55 """+common.prog_name+""" version: """+common.prog_version_str+"""
56
57 This tool B<must> be used from an User Interface and the user is supposed to
58 have a valid Grid certificate.
59
60 =head1 SYNOPSIS
61
62 B<"""+common.prog_name+"""> [I<options>] [I<command>]
63
64 =head1 DESCRIPTION
65
66 CRAB is a Python program intended to simplify the process of creation and submission into Grid environment of CMS analysis jobs.
67
68 Parameters for CRAB usage and configuration are provided by the user changing the configuration file B<crab.cfg>.
69
70 CRAB generates scripts and additional data files for each job. The produced scripts are submitted directly to the Grid. CRAB makes use of BOSS to interface to the Grid scheduler, as well as for logging and bookkeeping and eventually real time monitoring.
71
72 CRAB support any CMSSW based executable, with any modules/libraries, including the user provided one, and deals with the output produced by the executable. Up to version 1_2_1, also ORCA (and FAMOS) based executable were supported. CRAB provides an interface with CMS data discovery services (DBS and DLS), which are completely hidden to the final user. It also splits a task (such as analyzing a whole dataset) into smaller jobs, according with user requirements.
73
74 CRAB web page is available at
75
76 I<http://cmsdoc.cern.ch/cms/ccs/wm/www/Crab/>
77
78 =head1 HOW TO RUN CRAB FOR THE IMPATIENT USER
79
80 Please, read all anyway!
81
82 Source B<crab.(c)sh> from the CRAB installation area, which have been setup either by you or by someone else for you.
83
84 Modify the CRAB configuration file B<crab.cfg> according to your need: see below for a complete list: in particular set your jobtype (orca or famos) and fill the corresponding section. A template and commented B<crab.cfg> can be found on B<$CRABDIR/python/crab.cfg>
85
86 ~>crab -create
87 create all jobs (no submission!)
88
89 ~>crab -submit 2 -continue [ui_working_dir]
90 submit 2 jobs, the ones already created (-continue)
91
92 ~>crab -create -submit 2
93 create _and_ submit 2 jobs
94
95 ~>crab -status
96 check the status of all jobs
97
98 ~>crab -getoutput
99 get back the output of all jobs
100
101 ~>crab -publish
102 publish all user outputs in the DBS specified in the crab.cfg (dbs_url_for_publication) or written as argument of this option
103
104 =head1 RUNNING CMSSW WITH CRAB
105
106 =over 4
107
108 =item B<A)>
109
110 Develop your code in your CMSSW working area. Do anything which is needed to run interactively your executable, including the setup of run time environment (I<eval `scramv1 runtime -sh|csh`>), a suitable I<ParameterSet>, etc. It seems silly, but B<be extra sure that you actaully did compile your code> I<scramv1 b>.
111
112 =item B<B)>
113
114 Source B<crab.(c)sh> from the CRAB installation area, which have been setup either by you or by someone else for you. Modify the CRAB configuration file B<crab.cfg> according to your need: see below for a complete list.
115
116 The most important parameters are the following (see below for complete description of each parameter):
117
118 =item B<Mandatory!>
119
120 =over 6
121
122 =item B<[CMSSW]> section: datasetpath, pset, splitting parameters, output_file
123
124 =item B<[USER]> section: output handling parameters, such as return_data, copy_data etc...
125
126 =back
127
128 =item B<Run it!>
129
130 You must have a valid voms-enabled Grid proxy. See CRAB web page for details.
131
132 =back
133
134 =head1 HOW TO RUN ON CONDOR-G
135
136 The B<Condor-G> mode for B<CRAB> is a special submission mode next to the standard Resource Broker submission. It is designed to submit jobs directly to a site and not using the Resource Broker.
137
138 Due to the nature of this submission possibility, the B<Condor-G> mode is restricted to OSG sites within the CMS Grid, currently the 7 US T2: Florida(ufl.edu), Nebraska(unl.edu), San Diego(ucsd.edu), Purdue(purdue.edu), Wisconsin(wisc.edu), Caltech(ultralight.org), MIT(mit.edu).
139
140 =head2 B<Requirements:>
141
142 =over 2
143
144 =item installed and running local Condor scheduler
145
146 (either installed by the local Sysadmin or self-installed using the VDT user interface: http://www.uscms.org/SoftwareComputing/UserComputing/Tutorials/vdt.html)
147
148 =item locally available LCG or OSG UI installation
149
150 for authentication via Grid certificate proxies ("voms-proxy-init -voms cms" should result in valid proxy)
151
152 =item set of the environment variable EDG_WL_LOCATION to the edg directory of the local LCG or OSG UI installation
153
154 =back
155
156 =head2 B<What the Condor-G mode can do:>
157
158 =over 2
159
160 =item submission directly to a single OSG site,
161
162 the requested dataset has to be published correctly by the site in the local and global services
163
164 =back
165
166 =head2 B<What the Condor-G mode cannot do:>
167
168 =over 2
169
170 =item submit jobs if no condor scheduler is running on the submission machine
171
172 =item submit jobs if the local condor installation does not provide Condor-G capabilities
173
174 =item submit jobs to more than one site in parallel
175
176 =item submit jobs to a LCG site
177
178 =item support Grid certificate proxy renewal via the myproxy service
179
180 =back
181
182 =head2 B<CRAB configuration for Condor-G mode:>
183
184 The CRAB configuration for the Condor-G mode only requires changes in crab.cfg:
185
186 =over 2
187
188 =item select condor_g Scheduler:
189
190 scheduler = condor_g
191
192 =item select the domain for a single OSG site:
193
194 CE_white_list = "one of unl.edu,ufl.edu,ucsd.edu,wisc.edu,purdue.edu,ultralight.org,mit.edu"
195
196 =back
197
198 =head1 COMMAND
199
200 =over 4
201
202 =item B<-create>
203
204 Create the jobs: from version 1_3_0 it is only possible to create all jobs.
205 The maximum number of jobs depens on dataset and splittig directives. This set of identical jobs accessing the same dataset are defined as a task.
206 This command create a directory with default name is I<crab_0_date_time> (can be changed via ui_working_dir parameter, see below). Inside this directory it is placed whatever is needed to submit your jobs. Also the output of your jobs (once finished) will be place there (see after). Do not cancel by hand this directory: rather use -clean (see).
207 See also I<-continue>.
208
209 =item B<-submit n>
210
211 Submit n jobs: 'n' is either a positive integer or 'all'. Default is all.
212 The first 'n' suitable jobs will be submitted. This option must be used in conjunction with -create (to create and submit immediately) or with -continue, to submit previously created jobs. Failure to do so will stop CRAB and generate an error message.
213 See also I<-continue>.
214
215 =item B<-continue [dir] | -c [dir]>
216
217 Apply the action on the task stored on directory [dir]. If the task directory is the standard one (crab_0_date_time), the more recent in time is taken. Any other directory must be specified.
218 Basically all commands (but -create) need -continue, so it is automatically assumed, with exception of -submit, where it must be explicitly used. Of course, the standard task directory is used in this case.
219
220 =item B<-status>
221
222 Check the status of the jobs, in all states. If BOSS real time monitor is enabled, also some real time information are available, otherwise all the info will be available only after the output retrieval.
223
224 =item B<-getoutput|-get [range]>
225
226 Retrieve the output declared by the user via the output sandbox. By default the output will be put in task working dir under I<res> subdirectory. This can be changed via config parameters. B<Be extra sure that you have enough free space>. See I<range> below for syntax.
227
228 =item B<-publish [dbs_url]>
229
230 Publish user output in a local DBS instance after retrieving of output. By default the publish uses the dbs_url_for_publication specified in the crab.cfg file, otherwise you can write it as argument of this option.
231
232 =item B<-resubmit [range]>
233
234 Resubmit jobs which have been previously submitted and have been either I<killed> or are I<aborted>. See I<range> below for syntax.
235 The resubmit option can be used only with CRAB without server. For the server this option will be implemented as soon as possible
236
237 =item B<-kill [range]>
238
239 Kill (cancel) jobs which have been submitted to the scheduler. A range B<must> be used in all cases, no default value is set.
240
241 =item B<-testJdl [range]>
242
243 Check if the job can find compatible resources. It's equivalent of doing I<edg-job-list-match> on edg.
244
245 =item B<-printId [range]>
246
247 Just print the SID (Grid job identifier) of the job(s) or the taskId if you are using CRAB with the server
248
249 =item B<-postMortem [range]>
250
251 Produce a file (via I<edg-job-logging-info -v 2>) which might help in understanding Grid related problem for a job.
252
253 =item B<-list [range]>
254
255 Dump technical informations about jobs: for developers only.
256
257 =item B<-clean [dir]>
258
259 Clean up (i.e. erase) the task working directory after a check whether there are still running jobs. In case, you are notified and asked to kill them or retrieve their output. B<Warning> this will possibly delete also the output produced by the task (if any)!
260
261 =item B<-help [format] | -h [format]>
262
263 This help. It can be produced in three different I<format>: I<man> (default), I<tex> and I<html>.
264
265 =item B<-v>
266
267 Print the version and exit.
268
269 =item B<range>
270
271 The range to be used in many of the above commands has the following syntax. It is a comma separated list of jobs ranges, each of which may be a job number, or a job range of the form first-last.
272 Example: 1,3-5,8 = {1,3,4,5,8}
273
274 =back
275
276 =head1 OPTION
277
278 =over 4
279
280 =item B<-cfg [file]>
281
282 Configuration file name. Default is B<crab.cfg>.
283
284 =item B<-debug [level]>
285
286 Set the debug level: high number for high verbosity.
287
288 =back
289
290 =head1 CONFIGURATION PARAMETERS
291
292 All the parameter describe in this section can be defined in the CRAB configuration file. The configuration file has different sections: [CRAB], [USER], etc. Each parameter must be defined in its proper section. An alternative way to pass a config parameter to CRAB is via command line interface; the syntax is: crab -SECTION.key value . For example I<crab -USER.outputdir MyDirWithFullPath> .
293 The parameters passed to CRAB at the creation step are stored, so they cannot be changed by changing the original crab.cfg . On the other hand the task is protected from any accidental change. If you want to change any parameters, this require the creation of a new task.
294 Mandatory parameters are flagged with a *.
295
296 B<[CRAB]>
297
298 =over 4
299
300 =item B<jobtype *>
301
302 The type of the job to be executed: I<cmssw> jobtypes are supported
303
304 =item B<scheduler *>
305
306 The scheduler to be used: I<edg> is the standard Grid one. Other choice are I<glite> or I<glitecoll> for bulk submission or I<condor_g> (see specific paragraph)
307
308 =item B<server_mode>
309
310 To use the CRAB-server mode put 1 in this field. If the server_mode key is equal to 0 crab works, as usual, in standalone way.
311
312 =item B<server_name>
313
314 The name of the server that you want to use plus the path of the server storage (eg: hostname/data/cms/). For the server names that are dedicated to the user analysis you have to contact the CRAB\' developers (use hyper-news mailing list).
315
316 =back
317
318 B<[CMSSW]>
319
320 =over 4
321
322 =item B<datasetpath *>
323
324 the path of processed dataset as defined on the DBS. It comes with the format I</PrimaryDataset/DataTier/Process> . In case no input is needed I<None> must be specified.
325
326 =item B<pset *>
327
328 the ParameterSet to be used
329
330 =item I<Of the following three parameter exactly two must be used, otherwise CRAB will complain.>
331
332 =item B<total_number_of_events *>
333
334 the number of events to be processed. To access all available events, use I<-1>. Of course, the latter option is not viable in case of no input. In this case, the total number of events will be used to split the task in jobs, together with I<event_per_job>.
335
336 =item B<events_per_job*>
337
338 number of events to be accessed by each job. Since a job cannot cross the boundary of a fileblock it might be that the actual number of events per job is not exactly what you asked for. It can be used also with No input.
339
340 =item B<number_of_jobs *>
341
342 Define the number of job to be run for the task. The number of event for each job is computed taking into account the total number of events required as well as the granularity of EventCollections. Can be used also with No input.
343
344 =item B<output_file *>
345
346 the output files produced by your application (comma separated list).
347
348 =item B<pythia_seed>
349
350 If the job is pythia based, and has I<untracked uint32 sourceSeed = x> in the ParameterSet, the seed value can be changed using this parameter. Each job will have a different seed, of the type I<pythia_seed>I<$job_number> .
351
352 =item B<vtx_seed>
353
354 Seed for random number generation used for vertex smearing: to be used only if PSet has I<untracked uint32 VtxSmeared = x>. It is modified if and only if also I<pythia_seed> is set. As for I<pythia_seed> the actual seed will be of the type I<vtx_seed>I<$job_number>.
355
356 =item B<g4_seed>
357
358 Seed for randome generation of Geant4 SimHits I<untracked uint32 g4SimHits = x>. The treatment is that of I<vtx_seed> above
359
360 =item B<mix_seed>
361
362 Seed for randome generation of mixing module I<untracked uint32 mix = x>. The treatment is that of I<vtx_seed> above
363
364 =item B<first_run>
365
366 First run to be generated in a generation jobs. Relevant only for no-input workflow.
367
368 =item B<executable>
369
370 The name of the executable to be run on remote WN. The default is cmsrun. The executable is either to be found on the release area of the WN, or has been built on user working area on the UI and is (automatically) shipped to WN. If you want to run a script (which might internally call I<cmsrun>, use B<USER.script_exe> instead.
371
372 =item I<DBS and DLS parameters:>
373
374 =item B<dbs_url>
375
376 The URL of the DBS query page. For expert only.
377
378 =back
379
380 B<[USER]>
381
382 =over 4
383
384 =item B<additional_input_files>
385
386 Any additional input file you want to ship to WN: comma separated list. These are the files which might be needed by your executable: they will be placed in the WN working dir. You don\'t need to specify the I<ParameterSet> you are using, which will be included automatically. Wildcards are allowed.
387
388 =item B<script_exe>
389
390 A user script that will be run on WN (instead of default cmsrun). It\'s up to the user to setup properly the script itself to run on WN enviroment. CRAB guarantees that the CMSSW environment is setup (eg scram is in the path) and that the modified pset.cfg will be placed in the working directory, with name CMSSW.cfg . The script itself will be added automatically to the input sandbox.
391
392 =item B<ui_working_dir>
393
394 Name of the working directory for the current task. By default, a name I<crab_0_(date)_(time)> will be used. If this card is set, any CRAB command which require I<-continue> need to specify also the name of the working directory. A special syntax is also possible, to reuse the name of the dataset provided before: I<ui_working_dir : %(dataset)s> . In this case, if eg the dataset is SingleMuon, the ui_working_dir will be set to SingleMuon as well.
395
396 =item B<thresholdLevel>
397
398 This has to be a value between 0 and 100, that indicates the percentage of task completeness (jobs in a ended state are complete, even if failed). The server will notify the user by e-mail (look at the field: B<eMail>) when the task will reach the specified threshold. Works just with the server_mode = 1.
399
400 =item B<eMail>
401
402 The server will notify the specified e-mail when the task will reaches the specified B<thresholdLevel>. A notification is also sended when the task will reach the 100\% of completeness. This field can also be a list of e-mail: "B<eMail = user1@cern.ch, user2@cern.ch>". Works just with the server_mode = 1.
403
404 =item B<return_data *>
405
406 The output produced by the executable on WN is returned (via output sandbox) to the UI, by issuing the I<-getoutput> command. B<Warning>: this option should be used only for I<small> output, say less than 10MB, since the sandbox cannot accomodate big files. Depending on Resource Broker used, a size limit on output sandbox can be applied: bigger files will be truncated. To be used in alternative to I<copy_data>.
407
408 =item B<outputdir>
409
410 To be used together with I<return_data>. Directory on user interface where to store the output. Full path is mandatory, "~/" is not allowed: the defaul location of returned output is ui_working_dir/res .
411
412 =item B<logdir>
413
414 To be used together with I<return_data>. Directory on user interface where to store the standard output and error. Full path is mandatory, "~/" is not allowed: the defaul location of returned output is ui_working_dir/res .
415
416 =item B<copy_data *>
417
418 The output (only the one produced by the executable, not the std-out and err) is copied to a Storage Element of your choice (see below). To be used as an alternative to I<return_data> and recomended in case of large output.
419
420 =item B<storage_element>
421
422 To be used together with I<copy_data>. Storage Element name.
423
424 =item B<storage_path>
425
426 To be used together with I<copy_data>. Path where to put output files on Storage Element. Full path is needed, and the directory must be writeable by all.
427
428 =item B<register_data>
429
430 Not more supported.
431
432 =item B<use_central_bossDB>
433
434 Use central BOSS DB instead of one for each task: the DB must be already been setup. See installation istruction for more details.
435
436 =item B<use_boss_rt>
437
438 Use BOSS real time monitoring.
439
440 =back
441
442 B<[EDG]>
443
444 =over 4
445
446 =item B<RB>
447
448 Which RB you want to use instead of the default one, as defined in the configuration of your UI. The ones available for CMS are I<CERN> and I<CNAF>: the configuration files needed to change the broker will be automatically downloaded from CRAB web page and used. If the files are already present on the working directory they will be used.
449 You can use any other RB which is available, if you provide the proper configuration files. Eg, for RB XYZ, you should provide I<edg_wl_ui.conf.CMS_XYZ> and I<edg_wl_ui_cmd_var.conf.CMS_XYZ> for EDG RB, or I<glite.conf.CMS_XYZ> for glite WMS. These files are searched for in the current working directory, and, if not found, on crab web page. So, if you put your private configuration files in the working directory, they will be used, even if they are not available on crab web page.
450 Please get in contact with crab team if you wish to provide your RB or WMS as a service to the CMS community.
451
452 =item B<proxy_server>
453
454 The proxy server to which you delegate the responsibility to renew your proxy once expired. The default is I<myproxy.cern.ch> : change only if you B<really> know what you are doing.
455
456 =item B<role>
457
458 The role to be set in the VOMS. See VOMS documentation for more info.
459
460 =item B<group>
461
462 The group to be set in the VOMS, See VOMS documentation for more info.
463
464 =item B<dont_check_proxy>
465
466 If you do not want CRAB to check your proxy. The creation of the proxy (with proper lenght), its delegation to a myproxyserver is your responsability.
467
468 =item B<requirements>
469
470 Any other requirements to be add to JDL. Must be written in compliance with JDL syntax (see LCG user manual for further info). No requirement on Computing element must be set.
471
472 =item B<additional_jdl_parameters:>
473
474 Any other parameters you want to add to jdl file: comma separated list, each
475 item B<must> be complete, including the closing ";".
476 With this field it\'s also possible to specify which WMS you want to use, adding the parameter "additional_jdl_parameters = WMProxyEndpoints ={"https://hostname:port/pathcode"};" where "hostname" is WMS\' name, the "port" generally is 7443 and the "pathcode" should be something like "glite_wms_wmproxy_server".
477
478 =item B<max_cpu_time>
479
480 Maximum CPU time needed to finish one job. It will be used to select a suitable queue on the CE. Time in minutes.
481
482 =item B<max_wall_clock_time>
483
484 Same as previous, but with real time, and not CPU one.
485
486 =item B<CE_black_list>
487
488 All the CE (Computing Element) whose name contains the following strings (comma separated list) will not be considered for submission. Use the dns domain (eg fnal, cern, ifae, fzk, cnaf, lnl,....)
489
490 =item B<CE_white_list>
491
492 Only the CE (Computing Element) whose name contains the following strings (comma separated list) will be considered for submission. Use the dns domain (eg fnal, cern, ifae, fzk, cnaf, lnl,....)
493
494 =item B<SE_black_list>
495
496 All the SE (Storage Element) whose name contains the following strings (comma separated list) will not be considered for submission.It works only if a datasetpath is specified.
497
498 =item B<SE_white_list>
499
500 Only the SE (Storage Element) whose name contains the following strings (comma separated list) will be considered for submission.It works only if a datasetpath is specified
501
502 =item B<virtual_organization>
503
504 You don\'t want to change this: it\'s cms!
505
506 =item B<retry_count>
507
508 Number of time the Grid will try to resubmit your job in case of Grid related problem.
509
510 =item B<shallow_retry_count>
511
512 Number of time shallow resubmission the Grid will try: resubmissions are tried B<only> if the job aborted B<before> start. So you are guaranteed that your jobs run strictly once.
513
514 =item B<maxtarballsize>
515
516 Maximum size of tar-ball in Mb. If bigger, an error will be generated. The actual limit is that on the RB input sandbox. Default is 9.5 Mb (sandbox limit is 10 Mb)
517
518 =back
519
520 =head1 FILES
521
522 I<crab> uses a configuration file I<crab.cfg> which contains configuration parameters. This file is written in the INI-style. The default filename can be changed by the I<-cfg> option.
523
524 I<crab> creates by default a working directory 'crab_0_E<lt>dateE<gt>_E<lt>timeE<gt>'
525
526 I<crab> saves all command lines in the file I<crab.history>.
527
528 =head1 HISTORY
529
530 B<CRAB> is a tool for the CMS analysis on the Grid environment. It is based on the ideas from CMSprod, a production tools implemented originally by Nikolai Smirnov.
531
532 =head1 AUTHORS
533
534 """
535 author_string = '\n'
536 for auth in common.prog_authors:
537 #author = auth[0] + ' (' + auth[2] + ')' + ' E<lt>'+auth[1]+'E<gt>,\n'
538 author = auth[0] + ' E<lt>' + auth[1] +'E<gt>,\n'
539 author_string = author_string + author
540 pass
541 help_string = help_string + author_string[:-2] + '.'\
542 """
543
544 =cut
545 """
546
547 pod = tempfile.mktemp()+'.pod'
548 pod_file = open(pod, 'w')
549 pod_file.write(help_string)
550 pod_file.close()
551
552 if option == 'man':
553 man = tempfile.mktemp()
554 pod2man = 'pod2man --center=" " --release=" " '+pod+' >'+man
555 os.system(pod2man)
556 os.system('man '+man)
557 pass
558 elif option == 'tex':
559 fname = common.prog_name+'-v'+common.prog_version_str
560 tex0 = tempfile.mktemp()+'.tex'
561 pod2tex = 'pod2latex -full -out '+tex0+' '+pod
562 os.system(pod2tex)
563 tex = fname+'.tex'
564 tex_old = open(tex0, 'r')
565 tex_new = open(tex, 'w')
566 for s in tex_old.readlines():
567 if string.find(s, '\\begin{document}') >= 0:
568 tex_new.write('\\title{'+common.prog_name+'\\\\'+
569 '(Version '+common.prog_version_str+')}\n')
570 tex_new.write('\\author{\n')
571 for auth in common.prog_authors:
572 tex_new.write(' '+auth[0]+
573 '\\thanks{'+auth[1]+'} \\\\\n')
574 tex_new.write('}\n')
575 tex_new.write('\\date{}\n')
576 elif string.find(s, '\\tableofcontents') >= 0:
577 tex_new.write('\\maketitle\n')
578 continue
579 elif string.find(s, '\\clearpage') >= 0:
580 continue
581 tex_new.write(s)
582 tex_old.close()
583 tex_new.close()
584 print 'See '+tex
585 pass
586 elif option == 'html':
587 fname = common.prog_name+'-v'+common.prog_version_str+'.html'
588 pod2html = 'pod2html --title='+common.prog_name+\
589 ' --infile='+pod+' --outfile='+fname
590 os.system(pod2html)
591 print 'See '+fname
592 pass
593 elif option == 'txt':
594 fname = common.prog_name+'-v'+common.prog_version_str+'.txt'
595 pod2text = 'pod2text '+pod+' '+fname
596 os.system(pod2text)
597 print 'See '+fname
598 pass
599
600 sys.exit(0)