PAMM List Generator

Discussion in 'Mod Discussions' started by LavaSnake, February 28, 2014.

  1. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    The current version of our modlist.json generator is windows only. Would someone be able to make a new one that is either cross-platform or just supports Linux and mac? Maybe a python script would be the best option.

    Here's the current version: https://github.com/pamods/list-generator
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Cool... didn't think to check pamods for the source.

    I know Ruby well and could probably figure out Python. Node might also make sense given that mod developers already use JS.
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Just make sure it doesn't require any complex setup. The nice thing about this version is that you can just add it to the custom actions menu of your git client and go.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Looks like all of them have json and zlib built in.

    I usually use gems with Ruby, not sure if they're better or the libraries are recent additions to stdlib.

    Most of the complexity would be setting up the language for people who don't have it. Ruby would be the fastest for me to develop. JS has same-language going for it, and would be the same setup as Grunt, but I may be biased on that last point.
  5. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    I'd really prefer a native executable, and I know @DeathByDenim has experience making those. But that's just me.
  6. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    I think we could just compile it for mono to make it crossplatform.
  7. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    That would be great!
  8. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    If I get awake on a decent hour I will take a look
    LavaSnake likes this.
  9. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Code:
    ~/pamods/pamods.github.io$ sudo mono ListGenerator.exe
    Trying to generate new modlist.json...
    ListGen Complete...
    
    :)
    Raevn and cptconundrum like this.
  10. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Sweet! Could you add instructions on how to use it to the PAMM repo's readme?
  11. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Just tested with latest ubuntu 13.10
    Install mono (full needs .net 2.0 mono libs):
    sudo apt-get install mono-complete
    Start Listgen:
    sudo mono ListGenerator.exe

    Guess it will work on mac also if you install mono.
  12. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    ok, sweet. Does anyone have a mac to test this on?
  13. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Code:
    $ mono ListGenerator.exe
    $ git status -s
     M modlist.json
    
    Raevn likes this.
  14. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Thanks! I'll go ahead and add that to the readme.
  15. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Thanks guys, this is all taken care of now and cross-platform instructions have been added to the readme file.
  16. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    modlist.json has it's line endings changed on OS X, which looks like a total file replacement in the line diff.

    When I remove a mod file in usermods, EcoEffv2 and EcoEffv3 have their data (but not their identifiers) swapped in modlist2.json
  17. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Also seems to be doubling the entry for autofactory; at first I thought it was just not added by mistake. URL is different in copy.
  18. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    The line endings was preserved previously on OSX ? I don't remember changing anything about that, but I could have missed something.

    For the EcoEffv2 and EcoEffv3 data swapped, I don't know how that could happens. It seems I pushed the modlist2.json with this error initially, I'll try to investigate tonight.

    For the double autofactory, it's because trialq tried to have his mod update in both modlist and modlist2, while using the new "github url" capabilities, but it's not possible. The entry with github url should be removed, or the zip deleted from user_mods (which mean not available in modlist).
  19. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Whenever I did git diff in the past, I only saw my changes, this time I saw everything changed, and a little more investigation showed it to be line endings. modlist2.json was fine, but it appears to be unix format:

    Code:
    $ file modlist.json
    modlist.json: UTF-8 Unicode English text, with CRLF line terminators
    $ file modlist2.json
    modlist2.json: UTF-8 Unicode English text
    
    Actually... git blame says you changed pretty much every line in 7f96a075 Perhaps it was a different format before?
  20. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Oh damn, git "blame" is the proper term ... I have my idea on what happened on modlist.json. I have a messed up global configuration (autocrlf false) for other needs, and I am usually careful with that, but it seems not this time ... gonna fix it asap

Share This Page