Closed Legrems closed 2 years ago
the advantage of awk is still 1 less software to install. There is no need to keep installing more and more packages to do something the os is already capable of doing by default. Less complexity is always better than more.
I don't understand that "fear" to install such a small lib on a system knowing that we install Factorio and everything that goes with it. Using this makes the code more readable and more resistant to changes that the dev. may do in the API.
its not a "fear" its a principle, why install more and more software to do tasks that the currently installed software can already handle just fine.
It would be like installing a distributed calculation program to handle 1+1 which the os's calculator can already do ( extreme example but valid example )
theres also the issue of slowly creeping into Dependency hell for nothing
"Creeing into dependency hell for nothing" Ok, then don't install factorio-init (which by the way don't work atm, so nice dependancy) to "just" install a server because it's still one more dependances than just downloading and launching the game.
Just before definetly closing this, i'm curious to know your opinion on this @Bisa.
Thank's in advance !
Thnx for the suggested fix @Legrems - I did however opt to use already existing tools, at some point in the future I may look at using the api, but much like @tmzasz I try to stick to as few "extras" as I can (when I remember to and when I do not whirr off into some random "this is so cool" spree ;) )
The awk method is not robust to any changes made to the latest releases API.
The advantage of jq (which is by the way super light and you should consider using this for parsing json) is that you rely on key from the json instead of arbitrary number of ":".
Any server capable of running factorio is also capable of having jq installed, since it has no runtime dependencies.