Jump to content

stratagems.ini


Recommended Posts

I knew that even such simple and totally neutral change could face doubts and hesitation.

 

Having a file header is not necessary a bad thing. But you want me to go against one of the most basic thing in the application development/programming word, that is "ignore comments when parsing a file". In addition, you want to base the whole search algorithm on this. What you programmers sense tells you?

The comment field is intended to contain information that will not be parsed by a standard parse of the file. Normally that information is intended to be read by humans, but there is plenty of programming precedent for using it to embed information intended to be read by other applications. (At least some ways of getting perl and HTML to coexist work this way.) So my programmer's sense is fine, thanks.

 

But if you don't want to use the comment field to embed config-detection, just require a dummy INI variable, e.g. parse the file as user-editable config data only if it contains

parse_this_file_for_user_input = 1

Also, I would need to write "algorithm" to scan every mod directory for specific file extension, parse it and extract specific data.

That is trivial. In WEIDU it's just

 

ACTION_BASH_FOR "mymod" ".*\.ini" BEGIN
ACTION_IF FILE_CONTAINS "%BASH_FOR_FILESPEC%" "parse_this_file_for_user_input *= *1" BEGIN
<parse the file as user input>
END
END
But if you want in addition to require that the file fits one (or a few) specific naming conventions as well, that's fine. The important thing is that the file needs to *explicitly signal* that it is intended to be read by the autoinstall tool. Your current proposal does not take false positives nearly seriously enough; I'll elaborate on your other thread as it's more general than this particular conversation. Edited by DavidW
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...