Giter VIP home page Giter VIP logo

gameshub's Introduction

GamesHub

GamesHub

project GitHub license GitHub stars docker Build Status

README | 中文文档

This project is inspired by SteamDB-FreeGames

Telegram discussion group: https://t.me/GamesHubDiscussion

Star History

Stargazers over time

Features

Provide a framework to develop plugins to scrap games from different websites and send notifications to other plugins

Official Plugins (Maintained by project)

✅ Gather Steam free games from SteamDB. (Not recommended)

✅ Gather free games from Keylol. (recommended)

✅ Gather free games from Reddit.

✅ Use Apprise to send free games information. (Telegram demo channel)

✅ Use ASF to redeem games

✅ Use Steam to redeem games

Requirements

Usage

Direct run

  1. Clone repository
    git clone https://github.com/lupohan44/GamesHub.git
  2. Go into GamesHub directory
    cd GamesHub
  3. Install requirements
    pip3 install -r requirements.txt
    playwright install webkit chromium firefox || python3 -m playwright install webkit chromium firefox
    # Depends on the browser(s) you want to use
    or install minimum requirements
    pip install -r requirements-no_plugin.txt
    and install requirements for each plugin you want to enable
  4. Copy config.example.json5 to config.json5, change settings in it according to the comment.
  5. Run
    python3 app.py
    Each enabled official plugin should create a folder in {WORKING_DIR}/plugins/{PLUGIN_PACKAGE_NAME} to store runtime files and configs
  6. Change plugins' config files from step 5
  7. Rerun step 5

Docker (For Linux only)

  1. Create a folder for record and config, let's say folder name is /var/GamesHub

    Please note that this folder name must be absolute path.

    export GAMES_HUB_FOLDER_NAME=/var/GamesHub
    mkdir -p "$GAMES_HUB_FOLDER_NAME"
  2. Download config.example.json5 and rename to config.json5 into the folder created in step 1, change settings in it according to the comment.

    wget -c "https://raw.githubusercontent.com/lupohan44/GamesHub/main/config.example.json5" -O "$STEAM_DB_FOLDER_NAME/config.json5" || curl -o "$STEAM_DB_FOLDER_NAME/config.json5" "https://raw.githubusercontent.com/lupohan44/GamesHub/main/config.example.json5"
  3. Run with docker

    docker pull lupohan44/games_hub:latest && docker run -v $GAMES_HUB_FOLDER_NAME:/home/wd --rm lupohan44/games_hub:latest

    All changes by script inside docker will be permanently save to this folder.
    Each enabled official plugin should create a folder in {WORKING_DIR}/plugins/{PLUGIN_PACKAGE_NAME} to store runtime files and configs

  4. Change plugins' config files from step 3

  5. Rerun step 3

Plugins structure example

/var/GamesHub (working directory)
├── config.json5
└── plugins
    ├── gameshub.official.notification.apprise
    │   └── config.json5
    ├── gameshub.official.scraper.steamdb
    │   └── config.json5
    ├── gameshub.official.scraper.keylol
    │   ├── config.json5
    │   └── cookies.txt
    └── gameshub.official.redeemer.asf
        └── config.json5

Known issue

  1. Playwright does not support CentOS. (issue)
    • Use docker

Develop plugins

  1. Think a package name for your plugin, format should be like gameshub.unofficial.{plugin_purpose}.{plugin_description}[.{your_name}]
  2. Copy one of the official plugin in plugins folder and rename it to your package name
  3. Follow the official plugin's structure and modify it to your needs

Special Thanks

  • The logo is designed by 限免喜加一 WechatQrCode

Support me

  1. ko-fi
  2. Star this repository
  3. Contribute to this project by pull request

Each of them is appreciated. Thank you.

gameshub's People

Contributors

lupohan44 avatar canstralian avatar wyrrrd avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.