From 3c4aa25af0cd6f56db85d503ab552d39b81b5c17 Mon Sep 17 00:00:00 2001
From: horus
Date: Mon, 31 Oct 2022 12:24:35 +0100
Subject: renamed to things
---
.gitmodules | 10 ++---
app.php | 2 +-
functions.php | 10 ++---
public/index.php | 34 ++++++++--------
views/index.html | 2 +-
views/snippets/navbar.html | 2 +-
views/things.html | 55 ++++++++++++++++++++++++++
views/things/bpm | 1 +
views/things/faces | 1 +
views/things/ghrss/composer.json | 5 +++
views/things/ghrss/composer.lock | 84 ++++++++++++++++++++++++++++++++++++++++
views/things/ghrss/feed.php | 47 ++++++++++++++++++++++
views/things/ghrss/ghrss.db.php | 14 +++++++
views/things/ghrss/index.html | 32 +++++++++++++++
views/things/pizza | 1 +
views/things/untrack | 1 +
views/things/zeitumstellung | 1 +
views/tools.html | 55 --------------------------
views/tools/bpm | 1 -
views/tools/faces | 1 -
views/tools/ghrss/composer.json | 5 ---
views/tools/ghrss/composer.lock | 84 ----------------------------------------
views/tools/ghrss/feed.php | 47 ----------------------
views/tools/ghrss/ghrss.db.php | 14 -------
views/tools/ghrss/index.html | 32 ---------------
views/tools/pizza | 1 -
views/tools/untrack | 1 -
views/tools/zeitumstellung | 1 -
28 files changed, 273 insertions(+), 271 deletions(-)
create mode 100644 views/things.html
create mode 160000 views/things/bpm
create mode 160000 views/things/faces
create mode 100644 views/things/ghrss/composer.json
create mode 100644 views/things/ghrss/composer.lock
create mode 100644 views/things/ghrss/feed.php
create mode 100644 views/things/ghrss/ghrss.db.php
create mode 100644 views/things/ghrss/index.html
create mode 160000 views/things/pizza
create mode 160000 views/things/untrack
create mode 160000 views/things/zeitumstellung
delete mode 100644 views/tools.html
delete mode 160000 views/tools/bpm
delete mode 160000 views/tools/faces
delete mode 100644 views/tools/ghrss/composer.json
delete mode 100644 views/tools/ghrss/composer.lock
delete mode 100644 views/tools/ghrss/feed.php
delete mode 100644 views/tools/ghrss/ghrss.db.php
delete mode 100644 views/tools/ghrss/index.html
delete mode 160000 views/tools/pizza
delete mode 160000 views/tools/untrack
delete mode 160000 views/tools/zeitumstellung
diff --git a/.gitmodules b/.gitmodules
index b102eaf..2d7365d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,15 +1,15 @@
[submodule "views/tools/faces"]
- path = views/tools/faces
+ path = views/things/faces
url = git@git.iamfabulous.de:faces
[submodule "views/tools/pizza"]
- path = views/tools/pizza
+ path = views/things/pizza
url = git@git.iamfabulous.de:pizza
[submodule "views/tools/untrack"]
- path = views/tools/untrack
+ path = views/things/untrack
url = git@git.iamfabulous.de:untrack
[submodule "views/tools/zeitumstellung"]
- path = views/tools/zeitumstellung
+ path = views/things/zeitumstellung
url = git@git.iamfabulous.de:zeitumstellung
[submodule "views/tools/bpm"]
- path = views/tools/bpm
+ path = views/things/bpm
url = git@git.iamfabulous.de:bpm
diff --git a/app.php b/app.php
index ea81dfe..16ce17c 100644
--- a/app.php
+++ b/app.php
@@ -19,7 +19,7 @@ $function = new \Twig\TwigFunction('maincss', function() {
$twig->addFunction($function);
$function = new \Twig\TwigFunction('dump_dances', function() {
- echo readfile(__DIR__ . '/views/tools/bpm/dances.json');
+ echo readfile(__DIR__ . '/views/things/bpm/dances.json');
});
$twig->addFunction($function);
diff --git a/functions.php b/functions.php
index 8a31111..7dc32ed 100644
--- a/functions.php
+++ b/functions.php
@@ -1,14 +1,14 @@
query("SELECT name FROM language ORDER BY name;");
return $result->fetchAll();
}
diff --git a/public/index.php b/public/index.php
index c62faf5..afae00a 100644
--- a/public/index.php
+++ b/public/index.php
@@ -15,37 +15,39 @@ case("/about/"):
case("/projects/"):
echo $twig->render('projects.html');
break;
-case("/tool"):
- header("Location: https://" . $_SERVER["HTTP_HOST"] . "/tools/");
+case("/thing/"):
+case("/tool/"):
+case("/tools/"):
+ header("Location: https://" . $_SERVER["HTTP_HOST"] . "/things/");
exit;
break;
-case("/tools/"):
- echo $twig->render('tools.html');
+case("/things/"):
+ echo $twig->render('things.html');
break;
-case("/tools/faces/"):
- echo $twig->render('tools/faces/index.html', [ "faces" => get_faces() ]);
+case("/things/faces/"):
+ echo $twig->render('things/faces/index.html', [ "faces" => get_faces() ]);
break;
-case("/tools/pizza/"):
- echo $twig->render('tools/pizza/index.html');
+case("/things/pizza/"):
+ echo $twig->render('things/pizza/index.html');
break;
-case("/tools/untrack/"):
+case("/things/untrack/"):
$_url = "";
if ( isset($_REQUEST['url']) ) {
$_url = htmlspecialchars($_REQUEST['url']);
}
- echo $twig->render('tools/untrack/index.html', [ "url" => $_url ]);
+ echo $twig->render('things/untrack/index.html', [ "url" => $_url ]);
break;
-case("/tools/tanz/"):
- echo $twig->render('tools/bpm/index.html', [ "dances" => get_dances() ]);
+case("/things/tanz/"):
+ echo $twig->render('things/bpm/index.html', [ "dances" => get_dances() ]);
break;
case("/feeds/"):
echo $twig->render('feeds.html');
break;
-case("/tools/zeitumstellung/"):
- echo $twig->render('tools/zeitumstellung/index.html', [ "tc" => new Zeitumstellung() ]);
+case("/things/zeitumstellung/"):
+ echo $twig->render('things/zeitumstellung/index.html', [ "tc" => new Zeitumstellung() ]);
break;
-case("/tools/ghrss/"):
- echo $twig->render('tools/ghrss/index.html', [ "data" => get_ghrss_feeds() ]);
+case("/things/ghrss/"):
+ echo $twig->render('things/ghrss/index.html', [ "data" => get_ghrss_feeds() ]);
break;
default:
if ( str_ends_with($url, "/") ) {
diff --git a/views/index.html b/views/index.html
index 719e472..2288172 100644
--- a/views/index.html
+++ b/views/index.html
@@ -63,7 +63,7 @@
while crazy; do
- eval("my life… tools")
+ eval("my life… things")
endwhile
diff --git a/views/snippets/navbar.html b/views/snippets/navbar.html
index 9a63ad9..36524d7 100644
--- a/views/snippets/navbar.html
+++ b/views/snippets/navbar.html
@@ -16,7 +16,7 @@
/projects
- /tools
+ /things
/about me
diff --git a/views/things.html b/views/things.html
new file mode 100644
index 0000000..1c34d40
--- /dev/null
+++ b/views/things.html
@@ -0,0 +1,55 @@
+{% extends "snippets/layout.html" %}
+
+{% block title "things | Maximilian Möhring" %}
+
+{% block css %}
+.feed-flavor {
+ margin-top: 4rem;
+}
+{% endblock %}
+{% block main %}
+
+
+
+
+
Some funny, simple tools
+ Stupi.. serious things I needed to exist
+
+
+
+
+
+
iCal- / RSS-Feeds
+
+
+
+
+
+
+
+{% endblock %}
diff --git a/views/things/bpm b/views/things/bpm
new file mode 160000
index 0000000..e0acc0b
--- /dev/null
+++ b/views/things/bpm
@@ -0,0 +1 @@
+Subproject commit e0acc0b7877a48f8add10515ac89643b2ec96293
diff --git a/views/things/faces b/views/things/faces
new file mode 160000
index 0000000..b629f6b
--- /dev/null
+++ b/views/things/faces
@@ -0,0 +1 @@
+Subproject commit b629f6b83bc1fa43788e9b09d96bcf9cff92b2c7
diff --git a/views/things/ghrss/composer.json b/views/things/ghrss/composer.json
new file mode 100644
index 0000000..ba92705
--- /dev/null
+++ b/views/things/ghrss/composer.json
@@ -0,0 +1,5 @@
+{
+ "require": {
+ "tronice/php-rss-writer": "^1.6"
+ }
+}
diff --git a/views/things/ghrss/composer.lock b/views/things/ghrss/composer.lock
new file mode 100644
index 0000000..1fc94a1
--- /dev/null
+++ b/views/things/ghrss/composer.lock
@@ -0,0 +1,84 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "4114942d462b753781b80a9c5cdfb1f0",
+ "packages": [
+ {
+ "name": "tronice/php-rss-writer",
+ "version": "1.6.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/TRONICE/php-rss-writer.git",
+ "reference": "a5ef3db462b70f896778faff508fd88b71c051df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/TRONICE/php-rss-writer/zipball/a5ef3db462b70f896778faff508fd88b71c051df",
+ "reference": "a5ef3db462b70f896778faff508fd88b71c051df",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "johnpupu/xoopsunit": ">=1.2",
+ "mockery/mockery": ">=0.9 <1.0",
+ "phpunit/phpunit": ">=4.8.36 <6.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Suin\\RSSWriter": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "suin",
+ "email": "suinyeze@gmail.com",
+ "role": "Author"
+ },
+ {
+ "name": "John Chen",
+ "email": "john@tronice.com",
+ "homepage": "https://www.tronice.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Firch Tsai",
+ "email": "firch@tronice.com",
+ "homepage": "https://www.tronice.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "Yet another simple RSS writer library for PHP 5.4 or later.",
+ "homepage": "https://github.com/TRONICE/php-rss-writer",
+ "keywords": [
+ "feed",
+ "generator",
+ "php",
+ "rss",
+ "writer"
+ ],
+ "support": {
+ "source": "https://github.com/TRONICE/php-rss-writer/tree/1.6.3"
+ },
+ "time": "2020-05-17T17:20:36+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.0.0"
+}
diff --git a/views/things/ghrss/feed.php b/views/things/ghrss/feed.php
new file mode 100644
index 0000000..a11db87
--- /dev/null
+++ b/views/things/ghrss/feed.php
@@ -0,0 +1,47 @@
+prepare("SELECT * FROM entry_view WHERE language = ? ORDER BY created_at DESC LIMIT 20;");
+ $stmt->execute([$_REQUEST["l"]]);
+} else {
+ $stmt = $db->prepare("SELECT * FROM entry_view WHERE created_at >= NOW() - INTERVAL 2 DAY ORDER BY created_at DESC;");
+ $stmt->execute([$_REQUEST["l"]]);
+}
+$result = $stmt->fetchAll();
+
+$feed = new Feed();
+
+$channel = new Channel();
+$channel
+ ->title("GHRSS")
+ ->description("Trending Repos from Github")
+ ->url( "https://www.maximilianmoehring.com/things/ghrss/" )
+ ->pubDate(strtotime(date("r", time())))
+ ->lastBuildDate(strtotime(date("r", time())))
+ ->ttl(5)
+ ->appendTo($feed);
+
+foreach($result as $item) {
+ $item_out = new Item();
+
+ $item_out
+ ->title($item["title"])
+ ->description( "" . $item["synopsis"] . "
" . $item["language"] . " / " . $item["update_period"] . " / " . $item["stars"] . " Stars
" )
+ ->url($item["url"])
+ ->pubDate(strtotime(date($item["created_at"])))
+ ->author($item["owner"])
+ ->appendTo($channel);
+}
+
+echo $feed;
+
diff --git a/views/things/ghrss/ghrss.db.php b/views/things/ghrss/ghrss.db.php
new file mode 100644
index 0000000..d96f881
--- /dev/null
+++ b/views/things/ghrss/ghrss.db.php
@@ -0,0 +1,14 @@
+
+
+
+
Trending Repos from Github as RSS-Feed
+
Choose your language, get the result of github.com/trending as RSS-Feed
+
+
+
+
+
+
+{% endblock %}
diff --git a/views/things/pizza b/views/things/pizza
new file mode 160000
index 0000000..94a3255
--- /dev/null
+++ b/views/things/pizza
@@ -0,0 +1 @@
+Subproject commit 94a325594c8a9e124ea75f2885e82786fb2172bc
diff --git a/views/things/untrack b/views/things/untrack
new file mode 160000
index 0000000..b0acc3b
--- /dev/null
+++ b/views/things/untrack
@@ -0,0 +1 @@
+Subproject commit b0acc3b919f85211bf1824c5481cafa27d8a29e6
diff --git a/views/things/zeitumstellung b/views/things/zeitumstellung
new file mode 160000
index 0000000..3828fca
--- /dev/null
+++ b/views/things/zeitumstellung
@@ -0,0 +1 @@
+Subproject commit 3828fcac7c7cb75e88ca0ce10fa451ad22fc387f
diff --git a/views/tools.html b/views/tools.html
deleted file mode 100644
index d522d67..0000000
--- a/views/tools.html
+++ /dev/null
@@ -1,55 +0,0 @@
-{% extends "snippets/layout.html" %}
-
-{% block title "tools | Maximilian Möhring" %}
-
-{% block css %}
-.feed-flavor {
- margin-top: 4rem;
-}
-{% endblock %}
-{% block main %}
-
-
-
-
-
Some funny, simple tools
- Stupi.. serious things I needed to exist
-
-
-
-
-
-
iCal- / RSS-Feeds
-
-
-
-
-
-
-
-{% endblock %}
diff --git a/views/tools/bpm b/views/tools/bpm
deleted file mode 160000
index e0acc0b..0000000
--- a/views/tools/bpm
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e0acc0b7877a48f8add10515ac89643b2ec96293
diff --git a/views/tools/faces b/views/tools/faces
deleted file mode 160000
index b629f6b..0000000
--- a/views/tools/faces
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b629f6b83bc1fa43788e9b09d96bcf9cff92b2c7
diff --git a/views/tools/ghrss/composer.json b/views/tools/ghrss/composer.json
deleted file mode 100644
index ba92705..0000000
--- a/views/tools/ghrss/composer.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "require": {
- "tronice/php-rss-writer": "^1.6"
- }
-}
diff --git a/views/tools/ghrss/composer.lock b/views/tools/ghrss/composer.lock
deleted file mode 100644
index 1fc94a1..0000000
--- a/views/tools/ghrss/composer.lock
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
- "This file is @generated automatically"
- ],
- "content-hash": "4114942d462b753781b80a9c5cdfb1f0",
- "packages": [
- {
- "name": "tronice/php-rss-writer",
- "version": "1.6.3",
- "source": {
- "type": "git",
- "url": "https://github.com/TRONICE/php-rss-writer.git",
- "reference": "a5ef3db462b70f896778faff508fd88b71c051df"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/TRONICE/php-rss-writer/zipball/a5ef3db462b70f896778faff508fd88b71c051df",
- "reference": "a5ef3db462b70f896778faff508fd88b71c051df",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4.0"
- },
- "require-dev": {
- "johnpupu/xoopsunit": ">=1.2",
- "mockery/mockery": ">=0.9 <1.0",
- "phpunit/phpunit": ">=4.8.36 <6.0"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "Suin\\RSSWriter": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "suin",
- "email": "suinyeze@gmail.com",
- "role": "Author"
- },
- {
- "name": "John Chen",
- "email": "john@tronice.com",
- "homepage": "https://www.tronice.com",
- "role": "Developer"
- },
- {
- "name": "Firch Tsai",
- "email": "firch@tronice.com",
- "homepage": "https://www.tronice.com",
- "role": "Developer"
- }
- ],
- "description": "Yet another simple RSS writer library for PHP 5.4 or later.",
- "homepage": "https://github.com/TRONICE/php-rss-writer",
- "keywords": [
- "feed",
- "generator",
- "php",
- "rss",
- "writer"
- ],
- "support": {
- "source": "https://github.com/TRONICE/php-rss-writer/tree/1.6.3"
- },
- "time": "2020-05-17T17:20:36+00:00"
- }
- ],
- "packages-dev": [],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": [],
- "platform-dev": [],
- "plugin-api-version": "2.0.0"
-}
diff --git a/views/tools/ghrss/feed.php b/views/tools/ghrss/feed.php
deleted file mode 100644
index 7276200..0000000
--- a/views/tools/ghrss/feed.php
+++ /dev/null
@@ -1,47 +0,0 @@
-prepare("SELECT * FROM entry_view WHERE language = ? ORDER BY created_at DESC LIMIT 20;");
- $stmt->execute([$_REQUEST["l"]]);
-} else {
- $stmt = $db->prepare("SELECT * FROM entry_view WHERE created_at >= NOW() - INTERVAL 2 DAY ORDER BY created_at DESC;");
- $stmt->execute([$_REQUEST["l"]]);
-}
-$result = $stmt->fetchAll();
-
-$feed = new Feed();
-
-$channel = new Channel();
-$channel
- ->title("GHRSS")
- ->description("Trending Repos from Github")
- ->url( "https://www.maximilianmoehring.com/tools/ghrss/" )
- ->pubDate(strtotime(date("r", time())))
- ->lastBuildDate(strtotime(date("r", time())))
- ->ttl(5)
- ->appendTo($feed);
-
-foreach($result as $item) {
- $item_out = new Item();
-
- $item_out
- ->title($item["title"])
- ->description( "" . $item["synopsis"] . "
" . $item["language"] . " / " . $item["update_period"] . " / " . $item["stars"] . " Stars
" )
- ->url($item["url"])
- ->pubDate(strtotime(date($item["created_at"])))
- ->author($item["owner"])
- ->appendTo($channel);
-}
-
-echo $feed;
-
diff --git a/views/tools/ghrss/ghrss.db.php b/views/tools/ghrss/ghrss.db.php
deleted file mode 100644
index d96f881..0000000
--- a/views/tools/ghrss/ghrss.db.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
Trending Repos from Github as RSS-Feed
-
Choose your language, get the result of github.com/trending as RSS-Feed
-
-
-
-
-
-
-{% endblock %}
diff --git a/views/tools/pizza b/views/tools/pizza
deleted file mode 160000
index 94a3255..0000000
--- a/views/tools/pizza
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 94a325594c8a9e124ea75f2885e82786fb2172bc
diff --git a/views/tools/untrack b/views/tools/untrack
deleted file mode 160000
index b0acc3b..0000000
--- a/views/tools/untrack
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b0acc3b919f85211bf1824c5481cafa27d8a29e6
diff --git a/views/tools/zeitumstellung b/views/tools/zeitumstellung
deleted file mode 160000
index 3828fca..0000000
--- a/views/tools/zeitumstellung
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3828fcac7c7cb75e88ca0ce10fa451ad22fc387f
--
cgit v1.2.3