Closed fonic closed 2 years ago
By the way: the datfile is script-generated from a CSV file. Thus, if there's a need to change the format (e.g. to put double quotes around the rule text), I can still do that at this point.
Hi @fonic !
By the way: the datfile is script-generated from a CSV file. Thus, if there's a need to change the format (e.g. to put double quotes around the rule text), I can still do that at this point.
In that case, I suggest including the CSV file in the repo, along with a script to generate the datfile from it, as part of the cmake build sys. “If it's not source, it's not software.” — https://www.gnu.org/philosophy/categories.html . WDYT? Thanks!
Well, it's certainly possible to do that. I ported my Bash script to POSIX to eliminate Bash as a dependency (but there still might be portability issues, e.g. sed behaves quite different on some platforms like macOS).
Are you sure it's worth the effort?
Here's the script and csv file if you want to review (script has extension '.txt' to allow upload): froas-csv-to-dat.sh.txt froas-final.csv
What is the maximum allowed line length, by the way? Test script check-fortune-file.sh mentions 78 characters, but actually tests for 80 characters (egrep -q ".{81}" "$i"
).
What is the maximum allowed line length, by the way? Test script check-fortune-file.sh mentions 78 characters, but actually tests for 80 characters (
egrep -q ".{81}" "$i"
).
it is no longer used. see https://github.com/shlomif/fortune-mod/commit/85d55821426f2fdc8fc706da59827cb3876e634f
@fonic : I added them in https://github.com/shlomif/fortune-mod/commit/aa2b6b49946390a5c98020f2dc67ff08cff9be72 . Thanks!
@fonic : I added them in aa2b6b4 . Thanks!
Alright, cool! You're welcome.
Just to be sure, in case you missed my comments on that:
Hi @fonic !
@fonic : I added them in aa2b6b4 . Thanks!
Alright, cool! You're welcome.
Just to be sure, in case you missed my comments on that:
* I'm not 100% sure about portability of the generator script
No worries: I'll translate it to perl or similar if it turns out to be an issue.
* The generator script generates datfiles with lines of 78 chars max. ('cause that's what I got from the now obsolete check script)
since 78 is less than 80, it is acceptable.
Merged in a different way. Thanks!
since 78 is less than 80, it is acceptable.
If you want to, just change LINE_MAXLEN=78
in the generator script to LINE_MAXLEN=80
and lines will be wrapped accordingly.
On Tue, 28 Dec 2021 11:34:16 -0800 fonic @.***> wrote:
since 78 is less than 80, it is acceptable.
If you want to, just change
LINE_MAXLEN=78
in the generator script toLINE_MAXLEN=80
and lines will be wrapped accordingly.
Thanks! I realised that was the case.
--
Shlomi Fish https://www.shlomifish.org/ Original Riddles - https://www.shlomifish.org/puzzles/
Trust in God, but tie your camel. — https://en.wikipedia.org/wiki/God_helps_those_who_help_themselves
Please reply to list if it's a mailing list post - https://shlom.in/reply .
This pull request updates the already present Ferengi Rules of Acquisition as discussed in issue #59.
The new revised set of rules is primarily based on these sources:
Notes:
I put a lot of effort into this - much more than I wanted to :) I hope people like it!