factorio-dl: use the build argument when guessing versions
factorio-dl: also require a token for expansion build
factorio-dl: use the remote filename instead of hardcoding them
This is a breaking change. I noticed that the factorio team did change
the naming scheme in 2024.
factorio-dl: add support for -b expansion
factorio-dl: loop until we get a password; enhance help text
factorio-dl: remove redundant code (version number grabbing from API)
factorio-dl: add -b: support alpha, demo and headless
README.md: "just works"(TM) on macOS and Linux
factorio-dl: now detects the current platform
With this change, we can set defaults to values that make sense. Users are still
advised to use all switches deemed necessary for unattended services to avoid
breakage in the future though (in crontab(5) for example).
factorio-dl: use a better jq(1) syntax
We now use jq(1) itself to filter out null values.
factorio-dl: remove unnecessary tests
factorio-dl: always check that FACTORIO_TARGET is valid, before trying to download it
factorio-dl: sort -V, not sort -n
Not POSIX, but on FreeBSD, OpenBSD, macOS, GNU and probably WSL.
factorio-dl: check for the dependencies
README.md: update according to the recent 0.2.0 changes
factorio-dl: always use the token + drop support for FACTORIODL_CONFIG
New logic:
We want a token
1. Look for token + username in player-data.json
2. If not available, resort to LOGIN+PASSWORD to get a token from
https://auth.factorio.com (see
https://artentus.github.io/FactorioApiDoc/auth-api/)
3. If still not available, abort
With this token, we can safely remove any use we had of cookies
With this new logic, jq(1) becomes a mandatory dependency
Rework the help text
factorio-dl: improve the help text