You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Go project aims to automate the completion of video game information in a Notion database. It simplifies the task of collecting and updating details of video games, including titles, franchises, genres, platforms, and release dates, by connecting to the Notion database.
4
5
@@ -9,108 +10,139 @@ This Go project aims to automate the completion of video game information in a N
9
10
- Automated Search: Performs online searches to retrieve up-to-date information about video games.
10
11
- Database Updates: Updates video game entries in Notion with the latest details, such as titles, franchises, genres, platforms, and release dates.
- [Running on Local Machine](#running-on-local-machine)
19
+
- [Running with Docker](#running-with-docker)
20
+
5.[Dependencies](#dependencies)
21
+
6.[Contributing](#contributing)
22
+
7.[License](#license)
23
+
24
+
## Prerequisites
25
+
- Go v1.21.1+ (if running on local machine)
26
+
- Make (if running on local machine)
27
+
-[Docker](https://www.docker.com/products/docker-desktop/) (if running on docker)
14
28
- Access to a Notion database and a Notion integration key (see Configuration section for details)
15
29
- Access to IGDB API by a client id and client secret (see Configuration section for details)
16
30
17
31
## Installation
32
+
> This section is mandatory only if you want to download the source & run the code on your local machine. Either, you can directly go to the [Configuration section]()
>**If you start from scratch**: Duplicate the [Notion template](https://plant-pantry-77c.notion.site/Automated-video-games-library-c833cb560feb4b82935a310e508d34c2?pvs=4) and go to step 4
34
-
>
35
-
>**If you already have a Notion database**: Continue to step 3
36
-
37
-
3. Create a Notion database (or configure an already existing one) with the following properties:
38
-
- Title:
39
-
- Name: Title
40
-
- Type: Title
41
-
- Platforms:
42
-
- Name: Platforms
43
-
- Type: Multi-select
44
-
- Genres:
45
-
- Name: Genres
46
-
- Type: Multi-select
47
-
- Franchises:
48
-
- Name: Franchises
49
-
- Type: Multi-select
50
-
- Release date:
51
-
- Name: Release date
52
-
- Type: Date
53
-
- Time to complete (Main Story)
54
-
- Name: Time to complete (Main Story)
55
-
- Type: Text
56
-
- Time to complete (Main + Sides)
57
-
- Name: Time to complete (Main + Sides)
58
-
- Type: Text
59
-
- Time to complete (Completionist)
60
-
- Name: Time to complete (Completionist)
61
-
- Type: Text
62
-
63
-
3. Create a private Notion integration on your account by following the [getting started page](https://developers.notion.com/docs/create-a-notion-integration#create-your-integration-in-notion) before the "Setting up the demo locally" step.
64
-
65
-
4. Put your integration API secret as value of the `NOTION_API_SECRET`in your `.env` file.
66
-
67
-
5. Go on your Notion databse, click on the "..." button and on the "copy link" option. As mentionned in [environment variables section](https://developers.notion.com/docs/create-a-notion-integration#environment-variables), Get the ID of your database and put it as value of the `NOTION_PAGE_ID`in your `.env` file.
42
+
### Install Dependencies
43
+
```bash
44
+
$ go mod download
45
+
```
46
+
47
+
## Configuration
48
+
This section will help you to get all the mandatory variables from third party apps and create the base application configuration.
49
+
50
+
### 1. Create environment configuration file:
51
+
Create a `.env` file to save your configuration informations:
52
+
```shell
53
+
$ cp ./.env.example .env
54
+
```
55
+
56
+
#### 2. Create a Notion database
57
+
>**If you start from scratch**: Duplicate the [Notion template](https://plant-pantry-77c.notion.site/Automated-video-games-library-c833cb560feb4b82935a310e508d34c2?pvs=4) and go to step 2
58
+
59
+
>**If you already have a Notion database**: Continue to step 1
60
+
61
+
1. Create a Notion database (or configure an already existing one) with the following properties:
62
+
- Title: (**type: Title**)
63
+
- Platforms: (**type: Multi-select**)
64
+
- Genres: (**type: Multi-select**)
65
+
- Franchises: (**type: Multi-select**)
66
+
- Release date: (**type: Date**)
67
+
- Time to complete (Main Story): (**type: Text**)
68
+
- Time to complete (Main + Sides): (**type: Text**)
69
+
- Time to complete (Completionist): (**type: Text**)
70
+
71
+
2. Create a private Notion integration on your account by following the [getting started page](https://developers.notion.com/docs/create-a-notion-integration#create-your-integration-in-notion) before the "Setting up the demo locally" step.
72
+
3. Put your integration API secret as value of the `NOTION_API_SECRET` in your `.env` file.
73
+
4. Go on your Notion databse, click on the "..." button and on the "copy link" option. As mentionned in [environment variables section](https://developers.notion.com/docs/create-a-notion-integration#environment-variables), Get the ID of your database and put it as value of the `NOTION_PAGE_ID` in your `.env` file.
68
74
69
75
> ***At this point you should have a Notion database, with all mandatory properties. You should have created a private Notion integration connected with you database. You should have a `.env` file in your cloned project directory who have two values filled: `NOTION_API_SECRET` and `NOTION_PAGE_ID`***
70
76
71
-
6. Create a Twitch Developer application (needed to use IGDB API) by following the "Account Creation" of [getting started page](https://api-docs.igdb.com/#getting-started). This will give you steps to get your `IGDB_CLIENT_ID` & `IGDB_SECRET`. Afterward fill `IGDB_CLIENT_ID` & `IGDB_SECRET` in your `.env` file. ***If you need more detailed explanations, follow the 'More details about IGDB configuration' section below***.
77
+
5. Create a Twitch Developer application (needed to use IGDB API) by following the "Account Creation" of [getting started page](https://api-docs.igdb.com/#getting-started). This will give you steps to get your `IGDB_CLIENT_ID` & `IGDB_SECRET`. Afterward fill `IGDB_CLIENT_ID` & `IGDB_SECRET` in your `.env` file. ***If you need more detailed explanations, follow the 'More details about IGDB configuration' section below***.
72
78
73
79
🎉 **Congrats, configuration done!** 🎉
74
80
75
81
### More details about IGDB configuration
76
82
Once you are on the Twitch developers portal:
77
83
1. On the left menu go in the "Applications" section
78
84
2. Then click on the "Register your application" purple button
79
-
3. In the registration form:
80
-
1. Name field: you fill whatever you want.
81
-
2. Second field (about OAuth things): `http://localhost`.
82
-
3. Click on create button
85
+
3. In the registration form:
86
+
1. Name field: you fill whatever you want.
87
+
2. Second field (about OAuth things): `http://localhost`.
88
+
3. Click on create button
83
89
4. Once created it takes you to the applications listing, then click on "Manage" button for your newly created app.
84
90
5. Under the captcha, you have a field "client identifier" (or something like that). This value is your `IGDB_CLIENT_ID`
85
91
6. Click on the "New secret" button. It gives you the `IGDB_SECRET`
86
92
87
-
## Usage
88
-
Install & configure the application following the steps above.
89
-
90
-
1. Run the application:
91
-
```sh
92
-
docker-compose up
93
-
```
94
-
2. In you Notion database create a new entry with a title matching the pattern `{{YOUR_DESIRED_GAME_NAME}}`
95
-
96
-
The application will connect to your Notion database, IGDB API and search for video game information.
97
-
Video game details, including titles, franchises, genres, platforms, and release dates, will be updated in your Notion database.
98
-
99
-
## Any question ?
100
-
The answer might be [there](https://www.reddit.com/r/Notion/comments/17dw8js/created_integration_to_automatically_fill_in/?utm_source=share&utm_medium=web2x&context=3)
93
+
## Running the Project
94
+
95
+
### Running on Local Machine
96
+
97
+
1. Compile the project:
98
+
```bash
99
+
$ make build
100
+
```
101
+
2. Run the generated binary:
102
+
```bash
103
+
$ ./bin/app
104
+
```
105
+
106
+
By running the app this way you will get into a nicer and clearer TUI (terminal user interface) than the more conventional way to run. You can navigate through it by using your keyboard. It will also help you to have a better understanding of whats going on. Here is a sneak peak of this TUI:
0 commit comments