[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: doc-extract modification



This is a follow-up to DJs offer to assist me doc-extract to the needs of 
command line options.

First off, what is the goal?

1) Currently, the sort key of a documenting comment also doubles as heading 
of the comment. This should be decoupled. 

2) Currently, the heading must not contain space characters. It would be 
nice to allow multi word headings. This should be easy once goal 1) is 
achieved.

3) Currently, the script inserts a new node for every file it scans. This 
does not play nice with comments scattered over several files.


Ad 1): How about an optional third parameter, "heading", added to the 
initial line of the comment. The perl script should make sure, there is only 
one heading for each sort key. It might do so by providing an initially 
empty heading variable for every unique key. If it detects a heading and the 
corresponding heading variable is still empty, it copies the heading string 
to the variable. If the heading is already set, the script should issue a 
warning. 
If in the end, there is no heading for a sort key, the fall back should be 
the current behavior (Take the key as a heading). 
Does this sound reasonable?


Ad 2): This could be fixed, if the heading is required to be enclosed in 
curly brackets, quotation marks, or whatever the perl syntax can easily deal 
with.


Ad 3): I think, this could be fixed by moving the sort statements outside 
the loop over all files. Currently, the order of events seems to me:

	for all source files do
             skip specific files
             open file 
      	     do some scanning and parsing
               sort according to keys
	     append to *.texi files
             close source file
          done

proposed:
    	
	for all source files do
             skip specific files
             open file 
      	     do some scanning and parsing
             close source file
          done
	sort according to keys
	append to *.texi files

Again, does this look plausible?

---<(kaimartin)>---
-- 
Kai-Martin Knaak
Ãffentlicher PGP-SchlÃssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user