- Notifications
You must be signed in to change notification settings - Fork4
This script makes tracking videogames with Notion databases more delightful by automatically adding images and metadata about the games you have played or want to play.
adriansteffan/notion-videogame-gallery
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This script makes tracking videogames with Notion databases more delightful by automatically adding images and metadata about the games you have played or want to play.
It does so by fetching data from various places around the internet (Steam,SteamGrid,IGDB,Youtube,HLTB) and using theNotion API to connect it to your database.
If you want to see the results, you can take a look ata minimalist example ormy lovely collection.
The code could still be improved in various places, but c'mon, this bot is trying his hardest to make your game collection shine, who could judge him for being a bit messy?
These steps are needed for both deployment and development.
- Clone the repository
- Rename
config.py.template
toconfig.py
and enter the following keys:- Create aSteamgrid-API-Key
- Create aIGDB Client ID and secret
- Create an application and aYoutube-API-Key
- Create an application and aNotion-API-Key
- Go to theexample page,
Duplicate
the page, and delete the example entries - Share the database you cloned with the Notion application you created and enter the database link into the
config.py
For the deployment on your Linux machine, you will need bothdocker anddocker-compose.
To build the docker image, run
docker-compose build
in the root directory.
After completing the setup, start the container with
docker-compose up -d
Stop the server with
docker-compose down
For development, you will need aPython3 installation.
To install the dependencies, run
python3 -m pip install -r requirements.txt
in the root directory.
To start the script, run
python3 main.py
in the root directory.
Once the script is running (either locally or on your server), head over to the databse that you cloned.You can load the game data by setting theData Fetched
property. UseLoad All
to set properties and page data and useLoad Images
to refetch the icon, cover, and hero in case the links die.
The game will be identified either using the games Steam-ID or its name:
- If the
SteamID
property is set, the game data will be loaded and all other fields will be updated accordingly. If possible/sensible, the images will be taken directly from Steam. - If no
SteamID
is present, the name will be used to load the game data, with all image properties being filled by SteamGrid. The title of the page will stay unaffected.
It will take a couple of seconds for your data to update.You are free to add as many custom properties to the pages as you like, as long as you do not alter the properties that were copied from the example page (you can, however, move/hide them without breaking the code).
- Adrian Steffan -adriansteffanwebsite
About
This script makes tracking videogames with Notion databases more delightful by automatically adding images and metadata about the games you have played or want to play.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.