WeiDUorg / weidu

WeiDU is a program used to develop, distribute and install modifications for games based on the Infinity Engine.
http://www.weidu.org
GNU General Public License v2.0
87 stars 19 forks source link

(Feature request) `--list-readme` #218

Closed plut closed 9 months ago

plut commented 2 years ago

Feature request: --list-readme, returns (on stdout) the path to the readme file used for selected language.

Use case: I'm writing yet another WeiDU front-end and this would be much shorter (and more reliable) than writing a TP2 parser in another language. (I'm quite sure of this because I did write such a minimal TP2 parser and it is ugly).

FredrikLindgren commented 9 months ago

The problems I see with this request is that README takes a list of strings, all of which should be filepaths, and all of which may contain TP2 variables. The variables in play are usually just the %LANGUAGE% one, but any of the automatic variables are viable, and for all I know, someone out there has a particular readme for MacOS or something. What I'm saying is that it is not quite as simple as printing a string to stdout.

I'm open to discussing this further, either in this issue or in another one, but for now, I'll close this issue.

ALIENQuake commented 7 months ago

@FredrikLindgren The "printing a string to stdout" will be enough. All automatic WeiDU variables can be replaced via proper values by the tp2 parser. PI doing this for the %LANGUAGE% variable, I can also do this for %WEIDU_ARCH% and %WEIDU_OS%.

This functionality is very much needed. However not as an additional switch on the command line but as an additional entry in the earlier request for --list-modinfo.