| removing icons field in favor of name - linuxgaming - Linux gaming aggregate to… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit af64cef48d4d1f48cbd274daebc72365f2b4e3db | |
| parent ff1c31ea5d72207ad5ef0fc21efe3ece78cf68b4 | |
| Author: Jay Scott <[email protected]> | |
| Date: Fri, 20 Jul 2018 12:49:46 +0100 | |
| removing icons field in favor of name | |
| Diffstat: | |
| M CHANGELOG | 9 ++++++++- | |
| M TODO.md | 38 ++++++++++++++++++++++++++---… | |
| M config/feed_config.yaml | 10 ---------- | |
| M linuxgaming/sources.py | 7 ++++++- | |
| R linuxgaming/static/images/icons/bl… | 0 | |
| R linuxgaming/static/images/icons/go… | 0 | |
| R linuxgaming/static/images/icons/go… | 0 | |
| R linuxgaming/static/images/icons/he… | 0 | |
| R linuxgaming/static/images/icons/lg… | 0 | |
| R linuxgaming/static/images/icons/mo… | 0 | |
| R linuxgaming/static/images/icons/nu… | 0 | |
| R linuxgaming/static/images/icons/th… | 0 | |
| R linuxgaming/static/images/icons/xp… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/la… | 0 | |
| R linuxgaming/static/images/icons/re… | 0 | |
| M linuxgaming/templates/macros/items… | 4 ++-- | |
| M linuxgaming/templates/pages/all_so… | 2 +- | |
| M linuxgaming/templates/pages/source… | 4 ++-- | |
| M linuxgaming/update.py | 7 +------ | |
| 28 files changed, 52 insertions(+), 29 deletions(-) | |
| --- | |
| diff --git a/CHANGELOG b/CHANGELOG | |
| @@ -1,7 +1,14 @@ | |
| +Fri 20 Jul | |
| +--- | |
| + | |
| + - removing the icon field to save DB space. | |
| + - using icon/images based on source name. | |
| + | |
| + | |
| Thur 19 Jul | |
| --- | |
| +--- | |
| - added new pages | |
| - all sources | |
| diff --git a/TODO.md b/TODO.md | |
| @@ -31,20 +31,46 @@ example is shite. | |
| Steam might be the best one to do first to populate the data. | |
| +"name": "gog", | |
| +"icon": "gog.png", | |
| +"type": "game", | |
| +"title": search_result['title'], | |
| +"publisher": search_result['publisher'], | |
| +"category": search_result['category'], | |
| +"url": "https://www.gog.com" + search_result['url'], | |
| +"date": dateutil.parser.parse(release_date) | |
| + | |
| title: | |
| +type: "game" | |
| release_date: | |
| publisher: | |
| catagory: | |
| -image: | |
| -description: | |
| gog: | |
| - url: | |
| -hb: | |
| + avaliable_date: | |
| url: | |
| steam: | |
| + avaliable_date: | |
| url: | |
| -itch: | |
| - url: | |
| + | |
| +## Steam API logic | |
| + | |
| +Get all games | |
| +For each game | |
| + get game information | |
| + if linux platform | |
| + save | |
| + next | |
| + | |
| +get all linux games in DB for steam | |
| +Get all games | |
| +For each game | |
| + already in the DB list | |
| + continue | |
| + get game information | |
| + if linux platform | |
| + save | |
| + next | |
| + | |
| ## Add API | |
| diff --git a/config/feed_config.yaml b/config/feed_config.yaml | |
| @@ -1,5 +1,4 @@ | |
| HexDSL: | |
| - icon: "hexdsl.png" | |
| about: "Linux Gaming Rambles, shows and streams presented by HexDSL. Apparen… | |
| website: "https://www.youtube.com/user/hexdsl/" | |
| youtube: | |
| @@ -10,7 +9,6 @@ HexDSL: | |
| twitch_id: "40594186" | |
| TheLinuxGamer: | |
| - icon: "thelinuxgamer.png" | |
| about: "Weekly content revolving around Linux gaming. Reviews, tutorials, le… | |
| website: "https://www.youtube.com/user/tuxreviews" | |
| youtube: | |
| @@ -18,7 +16,6 @@ TheLinuxGamer: | |
| channel_id: "UCv1Kcz-CuGM6mxzL3B1_Eiw" | |
| GamingOnLinux: | |
| - icon: "gol.png" | |
| about: "A little bit of information on who GamingOnLinux are, we are just a … | |
| website: "https://www.gamingonlinux.com/" | |
| rss: | |
| @@ -30,7 +27,6 @@ GamingOnLinux: | |
| twitch_id: "50905707" | |
| BLGP: | |
| - icon: "blgp.png" | |
| about: "The Best Linux Games Podcast features only the best news, reviews, a… | |
| website: "http://www.bestlinuxgames.com/" | |
| rss: | |
| @@ -42,7 +38,6 @@ BLGP: | |
| twitch_id: "167387411" | |
| LinuxGameConsortium: | |
| - icon: "lgc.png" | |
| about: "Since we maintain the foundation of the Linux community. Yet support… | |
| website: "https://linuxgameconsortium.com" | |
| rss: | |
| @@ -51,7 +46,6 @@ LinuxGameConsortium: | |
| url: "https://linuxgameconsortium.com/feed/" | |
| XPenguin: | |
| - icon: "xpenguin.png" | |
| about: "A weekly Linux gaming podcast hosted by HexDSL and HamishTPB." | |
| website: "http://xpenguin.club/" | |
| rss: | |
| @@ -60,7 +54,6 @@ XPenguin: | |
| url: "http://xpenguin.club/rss.xml" | |
| MostlyLinux: | |
| - icon: "mostlylinux.png" | |
| about: "Gaming with a touch of Linux and a libertarianish ethos. We are #Fre… | |
| website: "http://mostlylinux.libsyn.com" | |
| rss: | |
| @@ -69,7 +62,6 @@ MostlyLinux: | |
| url: "http://mostlylinux.libsyn.com/rss" | |
| linux_gaming: | |
| - icon: "reddit.png" | |
| about: "/r/Linux_Gaming is for informative and interesting gaming content an… | |
| website: "https://www.reddit.com/r/linux_gaming/" | |
| rss: | |
| @@ -78,7 +70,6 @@ linux_gaming: | |
| url: "https://www.reddit.com/r/linux_gaming/new/.rss?limit=300" | |
| NuSuey: | |
| - icon: "nusuey.png" | |
| about: "Linux enthusiast, geek, casual streamer, the guy who made http://tux… | |
| website: "https://www.twitch.tv/nusuey/" | |
| twitch: | |
| @@ -86,7 +77,6 @@ NuSuey: | |
| twitch_id: "7863182" | |
| GoG: | |
| - icon: "gog.png" | |
| about: "GOG.com is a digital distribution platform with a curated selection … | |
| website: "https://www.gog.com/" | |
| gog: | |
| diff --git a/linuxgaming/sources.py b/linuxgaming/sources.py | |
| @@ -7,6 +7,7 @@ from flask import (Blueprint, flash, redirect, render_template,… | |
| current_app) | |
| from . import database | |
| from . import util | |
| +import pprint | |
| BP = Blueprint('sources', __name__, url_prefix='/sources') | |
| @@ -32,7 +33,11 @@ def sources(path): | |
| current_app.logger.info('Manual sources probe %s', path) | |
| return redirect(url_for('home')) | |
| + pprint.pprint(source_data) | |
| source_items = database.find_all({"name": path}) | |
| return render_template( | |
| - 'pages/sources.html', data=source_data, entries=source_items) | |
| + 'pages/sources.html', | |
| + data=source_data, | |
| + entries=source_items, | |
| + name=path) | |
| diff --git a/linuxgaming/static/images/icons/blgp.png b/linuxgaming/static/imag… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/gol.png b/linuxgaming/static/image… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/gog.png b/linuxgaming/static/image… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/hexdsl.png b/linuxgaming/static/im… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/lgc.png b/linuxgaming/static/image… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/mostlylinux.png b/linuxgaming/stat… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/nusuey.png b/linuxgaming/static/im… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/thelinuxgamer.png b/linuxgaming/st… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/xpenguin.png b/linuxgaming/static/… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_blgp.png b/linuxgaming/stati… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_gol.png b/linuxgaming/static… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_gog.png b/linuxgaming/static… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_hexdsl.png b/linuxgaming/sta… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_lgc.png b/linuxgaming/static… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_mostlylinux.png b/linuxgamin… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_nusuey.png b/linuxgaming/sta… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_thelinuxgamer.png b/linuxgam… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_xpenguin.png b/linuxgaming/s… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/large_reddit.png b/linuxgaming/sta… | |
| Binary files differ. | |
| diff --git a/linuxgaming/static/images/icons/reddit.png b/linuxgaming/static/im… | |
| Binary files differ. | |
| diff --git a/linuxgaming/templates/macros/items.html b/linuxgaming/templates/ma… | |
| @@ -28,10 +28,10 @@ | |
| <td> | |
| {% if not "gog" in item.name %} | |
| <a href="/sources/{{ item.name }}"> | |
| - <img alt="{{ item.name }} icon" src="{{ url_for('static', filena… | |
| + <img alt="{{ item.name }} icon" src="{{ url_for('static', filena… | |
| </a> | |
| {% else %} | |
| - <img alt="{{ item.name }} icon" src="{{ url_for('static', filename… | |
| + <img alt="{{ item.name }} icon" src="{{ url_for('static', filename… | |
| {% endif %} | |
| </td> | |
| diff --git a/linuxgaming/templates/pages/all_sources.html b/linuxgaming/templat… | |
| @@ -29,7 +29,7 @@ | |
| </div> | |
| </div> | |
| </div> | |
| - <img class="ui small image" src="{{ url_for('static', filename='images… | |
| + <img class="ui small image" src="{{ url_for('static', filename='images… | |
| </div> | |
| <div class="content"> | |
| diff --git a/linuxgaming/templates/pages/sources.html b/linuxgaming/templates/p… | |
| @@ -7,10 +7,10 @@ | |
| <div class="item"> | |
| <div class="image"> | |
| - <img src="{{ url_for('static', filename='images/icons/large_')}}{{ data.… | |
| + <img src="{{ url_for('static', filename='images/icons/large_')}}{{ name … | |
| </div> | |
| <div class="middle aligned content"> | |
| - <a class="header">{{ data.name }}</a> | |
| + <a class="header">{{ name }}</a> | |
| <div class="description"> | |
| <p>{{ data.about }}</p> | |
| </div> | |
| diff --git a/linuxgaming/update.py b/linuxgaming/update.py | |
| @@ -54,7 +54,6 @@ def rss_update(): | |
| # construct db item | |
| data = { | |
| "name": section, | |
| - "icon": feed_config[section]['icon'], | |
| "title": trimmed_title, | |
| "description": description, | |
| "url": feed.link, | |
| @@ -103,7 +102,6 @@ def twitch_update(): | |
| trimmed_title = search_results['title'][0:150] | |
| data = { | |
| "name": section, | |
| - "icon": feed_config[section]['icon'], | |
| "title": trimmed_title, | |
| "description": search_results['description'], | |
| "url": search_results['url'], | |
| @@ -148,8 +146,6 @@ def youtube_update(): | |
| data = { | |
| "name": | |
| section, | |
| - "icon": | |
| - feed_config[section]['icon'], | |
| "title": | |
| trimmed_title, | |
| "description": | |
| @@ -206,8 +202,7 @@ def gog_update(): | |
| search_result['salesVisibility']['from']).isoformat() | |
| data = { | |
| - "name": "gog", | |
| - "icon": "gog.png", | |
| + "name": "GoG", | |
| "type": "game", | |
| "title": search_result['title'], | |
| "image": "https:" + search_result['image'] + ".png", |