Add Composer autoloading
This commit is contained in:
+23
-7
@@ -1,9 +1,25 @@
|
||||
app/cache/*
|
||||
epg/*
|
||||
logs/*
|
||||
posters/*
|
||||
logos/*
|
||||
backups/*
|
||||
.env
|
||||
|
||||
!.gitkeep
|
||||
# Cache
|
||||
app/cache/*
|
||||
!app/cache/.gitkeep
|
||||
|
||||
# EPG-Dateien
|
||||
epg/*
|
||||
!epg/.gitkeep
|
||||
|
||||
# Logdateien
|
||||
logs/*
|
||||
!logs/.gitkeep
|
||||
|
||||
# Senderlogos
|
||||
logos/*
|
||||
!logos/.gitkeep
|
||||
|
||||
# Poster
|
||||
posters/*
|
||||
!posters/.gitkeep
|
||||
|
||||
# Backups
|
||||
backups/*
|
||||
!backups/.gitkeep
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## v0.2.0 - Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- Configuration system
|
||||
- `config.json`
|
||||
- `channels.json`
|
||||
- Automatic channel synchronization
|
||||
- Channel visibility and ordering
|
||||
|
||||
## v0.1.0
|
||||
|
||||
### Added
|
||||
|
||||
- Initial Docker setup
|
||||
- PHP/Apache web container
|
||||
- XMLTV test file
|
||||
- Basic TVGuide web interface
|
||||
- Template structure
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM php:8.4-apache
|
||||
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
@@ -0,0 +1,7 @@
|
||||
Copyright (c) 2026 Herwig Birke
|
||||
|
||||
All rights reserved.
|
||||
|
||||
This project is currently private. No permission is granted to copy,
|
||||
modify, distribute, or use this software outside the author's environment
|
||||
without explicit written permission.
|
||||
@@ -0,0 +1,21 @@
|
||||
# TVGuide
|
||||
|
||||
Self-hosted electronic TV guide based on XMLTV data.
|
||||
|
||||
## Goals
|
||||
|
||||
- Self-hosted web TV guide
|
||||
- Docker-first setup
|
||||
- XMLTV import
|
||||
- Configurable channels
|
||||
- Favorites
|
||||
- Search
|
||||
- Modern responsive UI
|
||||
- Optional poster metadata via TMDb later
|
||||
|
||||
## Project path
|
||||
|
||||
Default installation path:
|
||||
|
||||
```text
|
||||
/opt/tvguide-docker
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
require_once '/var/www/src/Config.php';
|
||||
require_once '/var/www/src/XmlTv.php';
|
||||
require_once '/var/www/src/View.php';
|
||||
require_once '/var/www/vendor/autoload.php';
|
||||
|
||||
use TVGuide\Config;
|
||||
use TVGuide\XmlTv;
|
||||
use TVGuide\View;
|
||||
|
||||
$config = new Config(
|
||||
'/var/www/config/config.json',
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace TVGuide;
|
||||
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
|
||||
class Config
|
||||
{
|
||||
private array $config = [];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace TVGuide;
|
||||
|
||||
class View
|
||||
{
|
||||
public static function render(string $template, array $data = []): void
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($programmes as $p): ?>
|
||||
<?php View::render('programme', ['p' => $p]); ?>
|
||||
<?php \TVGuide\View::render('programme', ['p' => $p]); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ($channels as $channelId => $channel): ?>
|
||||
<?php View::render('channel', [
|
||||
<?php \TVGuide\View::render('channel', [
|
||||
'channelId' => $channelId,
|
||||
'channel' => $channel,
|
||||
'programmes' => $programmes[$channelId] ?? []
|
||||
]); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "herwigbirke/tvguide",
|
||||
"description": "Self-hosted electronic TV guide based on XMLTV data.",
|
||||
"type": "project",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"TVGuide\\": "app/src/"
|
||||
}
|
||||
},
|
||||
"require": {}
|
||||
}
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
tvguide:
|
||||
image: php:8.4-apache
|
||||
build: .
|
||||
container_name: tvguide
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@@ -11,6 +11,7 @@ services:
|
||||
- ./app/templates:/var/www/templates
|
||||
- ./app/config:/var/www/config
|
||||
- ./app/cache:/var/www/cache
|
||||
- ./vendor:/var/www/vendor
|
||||
- ./epg:/var/www/epg
|
||||
- ./logos:/var/www/html/logos
|
||||
- ./posters:/var/www/html/posters
|
||||
|
||||
Reference in New Issue
Block a user