Get your Blizzard game patch notes from the command line

Discussion in 'General Linux Discussion' started by allenskd, Mar 14, 2014.

  1. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Hey guys, a while ago I finished scripting this for fun. Just copy/paste, follow the instructions and run it :)

    https://gist.github.com/allenskd/9541102

    Usage example:

    Enjoy, let me know if you have any questions. Remember to save the file ending with .py
  2. Daerandin

    Daerandin Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,157
    Likes Received:
    258
    Trophy Points:
    83
    Location:
    Northern Norway
    Home page:
    I would like to make a suggestion regarding the very first line. /usr/bin/python might mean a different thing depending on what distro it runs on. Most distros have Python 2 named simply as python on the system, while a few other distros have adopted Python 3 as the default python. This could cause issues on some distros.

    If you instead change it to

    Code:
    #! /usr/bin/env python2
    then it specifically calls Python 2 no matter what the distro chooses to use as default Python package.
  3. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,339
    Likes Received:
    624
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    What are these patch notes for?
  4. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    I know, thanks for the suggestion. In the end I left it like the first line because /usr/bin/python whilst just a link still uses python2.7 primarily on many distributions and python 3 is left installed but not as default. Not many distributions ships Python 3 which is an assumption I made at the end. Python 3 being a few years old now is still on that stage where legacy code has to be ported over. I wouldn't think hard on it to be honest, but the suggestion is still appreciated :)

    Unrelated: The WINE-related project I mentioned a couple of weeks back will be fully Python 3 only (it will set a virtualenv automatically just to be on the safe side). No reason to go back to Python 2.x, the only way is to move forward :]
  5. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    They aren't patch notes, you grab patchnotes with the tool without needing to open the browser or battlenet client :)
  6. Daerandin

    Daerandin Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,157
    Likes Received:
    258
    Trophy Points:
    83
    Location:
    Northern Norway
    Home page:
    Just thought I would mention it in case some people encounter issues with that. Arch and all Arch based distros use Python 3 as default python package, so users of those distributions would need to change the first line in the script.

    Glad to hear your other project will by Python 3. I began with Python 3, so I should be able to help out with the coding if you'd like some help.
  7. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Oh yea I added your line Daerandin :) doesn't hurt one bit haha. That and a clarification about the pip package on other distros (python-pip)
  8. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Hey Daerandin can I contact you related to the WINE project? no compromise of course. I need to see if I can get a pair of eyes on this.
  9. Daerandin

    Daerandin Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,157
    Likes Received:
    258
    Trophy Points:
    83
    Location:
    Northern Norway
    Home page:
    Of course you can. I might not have much time to delve into the code today, but I'll make time during the weekend.

Share This Page