Hello Hynek,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

I can't speak for DotConf, but Speech Dispatcher would surely benefit.</blockquote><div><br>That's really good news, I am glad the code will prove useful to the speechd community as well.<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When there are several lines with the same parameter name,<br>
this should be treated as an enumeration or a list. For example<br>
,,AddModule'' is used to construct a list of modules to be loaded.<br>
<br>
So I think that the only reasonable way to modify them is to read <br>
all such options first, construct the list, then modify it and write<br>
back. I don't think it makes sense to modify them separately.</blockquote><div><br>Hmmm, so can we expect to get a list of dotConfObject(s) from the programmer that they wish to write to the file? I think the process for writing to the dot.conf file must be crystal clear. <br>
<br>I see the following USE Cases:<br><ol><li>Add a new parameter</li><ol><li>Ask the programmer to submit a parameter along with a list of
values through a dotConfObject. pyDotconf searches for an existing entry
for the parameter.</li><li>If(entry_exists) return error</li><li>else add the parameter to the dot.conf file<br>
  </li></ol><li>Delete parameter entry - It deletes every instance of a specific parameter in the dotconf file</li><li>Edit an existing parameter</li><ol><li>Get the list of dotConfObject through which he/she c progan find the value of each parameter.</li>
<li>Modify this list and send back to pyDotconf. <br></li><li>pyDotconf will delete(2) all declarations of the parameter in the conf file (even if they are spread across the file), <br></li><li>add the fresh entries using add(1) parameter internally.</li>
</ol><li>The programmer will be able to specify for each parameter item whether it is commented or uncommented in the file through the dotConfObject<br></li></ol> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Like in this case:<br>
# DefaultModule is the module that will be used by default<br>
# DefaultModule "festival"<br>
<br>
We might make a rule that description comments are not<br>
allowed to begin with an option name in the configuration file.<br>
I would then change the config files in the next release of Speech<br>
Dispatcher so that this doesn't happen. Users however have<br>
older configuration files around, so this case should be handled<br>
somehow (I would say that if after stripping the comment character,<br>
the line doesn't make a proper dotconf syntax, it should be<br>
treated as a text coment).</blockquote><div>  <br></div><div>The present implementation of the parser (I think) correctly ignores the commentary for a parameter. I ran the code for AddModule and it does not pick up the commentary at all. I will look into the implications of what you have said in greater details and post back soon enough.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have a question. Are you also planning to develop some tool<br>
to set the configuration option or are you going to use the python<br>
library for use in some OLPC-specific configuration mechanism?<br>
I'd like to learn more, because it looks interesting.</blockquote><div><br>Well OLPC will have certain default speech synthesis settings for the laptop, and we would like to preserve those settings. Also we expect other developers in the community to use speechd-api and would like that the default speech-dispatcher settings for OLPC be applied to each client that makes a connection. So we will achieve that by directly modifying the speechd.conf file. Most of the programming is done in python, hence, the need for a library to modify the dot.conf file in python :).</div>
</div><br>Thank you for your inputs, I hope we are able to finalize the requirements from pyDotconf soon. Once that is done, I will make the necessary changes and release it for use.<br><br>Best,<br>Hemant<br>