linuxgaming

This is my own Linux gaming aggregate web app I built for personal use.
git clone git://git.beardyjay.co.uk/linuxgaming
Log | Files | Refs | README

commit 81bd9ebee7ca5801a97d898ae077fe18125bf457
parent e0c9e20ecbf0ac9b98c26c1aaa58c4cd2299a475
Author: Jay Scott <jay@beardyjay.co.uk>
Date:   Fri, 20 Jul 2018 12:49:46 +0100

removing icons field in favor of name

Diffstat:
MCHANGELOG | 9++++++++-
MTODO.md | 38++++++++++++++++++++++++++++++++------
Mconfig/feed_config.yaml | 10----------
Mlinuxgaming/sources.py | 7++++++-
Rlinuxgaming/static/images/icons/blgp.png -> linuxgaming/static/images/icons/BLGP.png | 0
Rlinuxgaming/static/images/icons/gol.png -> linuxgaming/static/images/icons/GamingOnLinux.png | 0
Rlinuxgaming/static/images/icons/gog.png -> linuxgaming/static/images/icons/GoG.png | 0
Rlinuxgaming/static/images/icons/hexdsl.png -> linuxgaming/static/images/icons/HexDSL.png | 0
Rlinuxgaming/static/images/icons/lgc.png -> linuxgaming/static/images/icons/LinuxGameConsortium.png | 0
Rlinuxgaming/static/images/icons/mostlylinux.png -> linuxgaming/static/images/icons/MostlyLinux.png | 0
Rlinuxgaming/static/images/icons/nusuey.png -> linuxgaming/static/images/icons/NuSuey.png | 0
Rlinuxgaming/static/images/icons/thelinuxgamer.png -> linuxgaming/static/images/icons/TheLinuxGamer.png | 0
Rlinuxgaming/static/images/icons/xpenguin.png -> linuxgaming/static/images/icons/XPenguin.png | 0
Rlinuxgaming/static/images/icons/large_blgp.png -> linuxgaming/static/images/icons/large_BLGP.png | 0
Rlinuxgaming/static/images/icons/large_gol.png -> linuxgaming/static/images/icons/large_GamingOnLinux.png | 0
Rlinuxgaming/static/images/icons/large_gog.png -> linuxgaming/static/images/icons/large_GoG.png | 0
Rlinuxgaming/static/images/icons/large_hexdsl.png -> linuxgaming/static/images/icons/large_HexDSL.png | 0
Rlinuxgaming/static/images/icons/large_lgc.png -> linuxgaming/static/images/icons/large_LinuxGameConsortium.png | 0
Rlinuxgaming/static/images/icons/large_mostlylinux.png -> linuxgaming/static/images/icons/large_MostlyLinux.png | 0
Rlinuxgaming/static/images/icons/large_nusuey.png -> linuxgaming/static/images/icons/large_NuSuey.png | 0
Rlinuxgaming/static/images/icons/large_thelinuxgamer.png -> linuxgaming/static/images/icons/large_TheLinuxGamer.png | 0
Rlinuxgaming/static/images/icons/large_xpenguin.png -> linuxgaming/static/images/icons/large_XPenguin.png | 0
Rlinuxgaming/static/images/icons/large_reddit.png -> linuxgaming/static/images/icons/large_linux_gaming.png | 0
Rlinuxgaming/static/images/icons/reddit.png -> linuxgaming/static/images/icons/linux_gaming.png | 0
Mlinuxgaming/templates/macros/items.html | 4++--
Mlinuxgaming/templates/pages/all_sources.html | 2+-
Mlinuxgaming/templates/pages/sources.html | 4++--
Mlinuxgaming/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. Apparently you don't get a lot of characters in this box. so I'll just say that I am HexDSL (Sexy Hexy) and I make videos about gaming using Linux. I also Host the .XPenguin PodCast/VideoCast that people seem to like :) You can find more of me on twitch.tv/hexdsl/ thanks for taking the time to read this." 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, let's plays, informational videos, and more. I produce reviews of games for Linux through the Humble Store, GOG.com, Steam, PlayDEB and more. You can always find new videos on Tuesdays. Sometimes Fridays, too!" 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 small group of passionate Linux fans who wish to bring you nothing but the best in Linux gaming news. Started by liamdawe on his own in 2009 on a .info address, we later switched to using a .com domain name." 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, and deals exclusively focusing on titles available for the Linux OS. Heavily focuses on Steam titles. Pushed onto teh interwebs every Saturday and hosted by Skookiesprite, the podcast brings an entire week's worth of news, reviews, tech tips, and the best-loved DEALS! Segment straight into your brain." 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 supporting Linux Gaming through the distrubution of up-to-date content directly from the developers and PR staff. This includes gaming news and information posts, Twitter comments/postings, and/or other social media contact and submissions. Sharing current information and to deter the suggestion that, 'Linux gaming is not widely supported outside of the community'." 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 #Freedom #Linux #Privacy #FreeMarkets #Mostly_Gaming." 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 and discussions. If you have a question, please check the wiki before posting." 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://tuxdb.com" 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 of games, a 'you buy it, you own it' philosophy, and utmost care about customers." 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, url_for, 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/images/icons/BLGP.png Binary files differ. diff --git a/linuxgaming/static/images/icons/gol.png b/linuxgaming/static/images/icons/GamingOnLinux.png Binary files differ. diff --git a/linuxgaming/static/images/icons/gog.png b/linuxgaming/static/images/icons/GoG.png Binary files differ. diff --git a/linuxgaming/static/images/icons/hexdsl.png b/linuxgaming/static/images/icons/HexDSL.png Binary files differ. diff --git a/linuxgaming/static/images/icons/lgc.png b/linuxgaming/static/images/icons/LinuxGameConsortium.png Binary files differ. diff --git a/linuxgaming/static/images/icons/mostlylinux.png b/linuxgaming/static/images/icons/MostlyLinux.png Binary files differ. diff --git a/linuxgaming/static/images/icons/nusuey.png b/linuxgaming/static/images/icons/NuSuey.png Binary files differ. diff --git a/linuxgaming/static/images/icons/thelinuxgamer.png b/linuxgaming/static/images/icons/TheLinuxGamer.png Binary files differ. diff --git a/linuxgaming/static/images/icons/xpenguin.png b/linuxgaming/static/images/icons/XPenguin.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_blgp.png b/linuxgaming/static/images/icons/large_BLGP.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_gol.png b/linuxgaming/static/images/icons/large_GamingOnLinux.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_gog.png b/linuxgaming/static/images/icons/large_GoG.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_hexdsl.png b/linuxgaming/static/images/icons/large_HexDSL.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_lgc.png b/linuxgaming/static/images/icons/large_LinuxGameConsortium.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_mostlylinux.png b/linuxgaming/static/images/icons/large_MostlyLinux.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_nusuey.png b/linuxgaming/static/images/icons/large_NuSuey.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_thelinuxgamer.png b/linuxgaming/static/images/icons/large_TheLinuxGamer.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_xpenguin.png b/linuxgaming/static/images/icons/large_XPenguin.png Binary files differ. diff --git a/linuxgaming/static/images/icons/large_reddit.png b/linuxgaming/static/images/icons/large_linux_gaming.png Binary files differ. diff --git a/linuxgaming/static/images/icons/reddit.png b/linuxgaming/static/images/icons/linux_gaming.png Binary files differ. diff --git a/linuxgaming/templates/macros/items.html b/linuxgaming/templates/macros/items.html @@ -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', filename='images/icons/')}}{{ item.icon }} "> + <img alt="{{ item.name }} icon" src="{{ url_for('static', filename='images/icons/')}}{{ item.name }}.png "> </a> {% else %} - <img alt="{{ item.name }} icon" src="{{ url_for('static', filename='images/icons/')}}{{ item.icon }} "> + <img alt="{{ item.name }} icon" src="{{ url_for('static', filename='images/icons/')}}GoG.png "> {% endif %} </td> diff --git a/linuxgaming/templates/pages/all_sources.html b/linuxgaming/templates/pages/all_sources.html @@ -29,7 +29,7 @@ </div> </div> </div> - <img class="ui small image" src="{{ url_for('static', filename='images/icons/large_')}}{{ value.icon }}"> + <img class="ui small image" src="{{ url_for('static', filename='images/icons/large_')}}{{ key }}.png"> </div> <div class="content"> diff --git a/linuxgaming/templates/pages/sources.html b/linuxgaming/templates/pages/sources.html @@ -7,10 +7,10 @@ <div class="item"> <div class="image"> - <img src="{{ url_for('static', filename='images/icons/large_')}}{{ data.icon }}"> + <img src="{{ url_for('static', filename='images/icons/large_')}}{{ name }}.png"> </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",