I made another daily downloader (with some cool features!)

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
https://github.com/gausie/kolmafia-downloader

I had been using Elronnd'smafia-auto-updater but found it would often get stuck and seemed too complicated for me to fix myself.

Features/Anti-Features

  • Extremely simple and should be very stable.
  • It will popup with a changelog of the changes since you last updated mafia! That dialog should work on Linux/Mac/Windows, but I know that the whole script probably won't work on Windows just yet.
  • It uses nodejs (boo) specifically version 11 (boo!!!!)
It works for me and I really like it. I'd like to make it work for everyone, but for now feel free to use it if you can and/or submit PRs!
 

MCroft

Developer
Staff member
This is an extremely late report. Short upshot: I made it work on MacOS.

I tried this on MacOS 11 Big Sur, so it's very specific to that platform.

Steps I took:
  1. Install a JavaScript interpreter
    This is required. There is a hidden interpreter inside Framework.JavaScriptCore at /System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Helpers/jsc, but it isn't good enough. I used NodeJS v14.16.1 from here: https://nodejs.org/en/download/ /usr/local/bin must be in your path. It probably already is.
  2. Install modules with npm
    I don't know if this is required, but it didn't grab them automatically.
    I found these by running the script and installing the module it listed when it said "can't find module <X>"
    Bash:
    $ npm install node-fetch
    $ npm install dialog
    $ npm install node-svn-ultimate
  3. create the working directory
    The script is currently unix-centric, so it assumes you will have a hidden directory called .kolmafia
    Bash:
    $ cd ~
    $ mkdir .kolmafia
    $ cd .kolmafia/
    $ mkdir program
  4. Download the code
  5. Execute the command
    Bash:
    $ node index.js
At that point, it ran!

Notes:
  1. I would like a way to specify the platform-specific location of the jarfile.
  2. The jar was named 20888, not KoLmafia-20888.jar
  3. The dialog did not pop up at all, so that part of the code wasn't used.
All in all, good! If anyone wants to use it, it worked for me.
 

infarct

New member
https://github.com/gausie/kolmafia-downloader

I had been using Elronnd'smafia-auto-updater but found it would often get stuck and seemed too complicated for me to fix myself.

Features/Anti-Features

  • Extremely simple and should be very stable.
  • It will popup with a changelog of the changes since you last updated mafia! That dialog should work on Linux/Mac/Windows, but I know that the whole script probably won't work on Windows just yet.
  • It uses nodejs (boo) specifically version 11 (boo!!!!)
It works for me and I really like it. I'd like to make it work for everyone, but for now feel free to use it if you can and/or submit PRs!
From the department of stupid questions:

How do I make it work on Windows?
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
From the department of stupid questions:

How do I make it work on Windows?
I appreciate MCroft writing up his experiences but I'm not supporting this anymore! Perhaps in the future we'll ship KoLmafia with a launcher or something.
 

MCroft

Developer
Staff member
From the department of stupid questions:

How do I make it work on Windows?
If it's easy, then just like I did, but with Windows versions.
1: Install NodeJS from here: https://nodejs.org/en/download/
2: install those nodejs modules with npm, same as I did.
3: run it. If it works, great! If not, fix the parts where it tries to use unix-specific directories.

But that's all the help I can give. There are other threads around with Windows daily download scripts that are actually supported, so if this doesn't work, try matt's script (for example).
 

MCroft

Developer
Staff member
I appreciate MCroft writing up his experiences but I'm not supporting this anymore! Perhaps in the future we'll ship KoLmafia with a launcher or something.
I didn't think it was supported, but it seemed like it should be documented. For the next person. Thanks for providing it.
 
Top