Final changes before full v1 release

- Updated deps
- Create title if a post is missing one

Reviewed-on: #27
This commit is contained in:
Daniel J. Summers 2024-11-22 01:57:49 +00:00
parent d06249aecd
commit a0b2d2986a
6 changed files with 26 additions and 24 deletions

View File

@ -14,7 +14,7 @@ use BitBadger\PDODocument\{AutoId, Configuration};
use FeedReaderCentral\Data; use FeedReaderCentral\Data;
/** The current Feed Reader Central version */ /** The current Feed Reader Central version */
const FRC_VERSION = '1.0.0-beta4'; const FRC_VERSION = '1.0.0';
/** /**
* Drop .0 or .0.0 from the end of the version to format it for display * Drop .0 or .0.0 from the end of the version to format it for display

View File

@ -1,6 +1,5 @@
{ {
"name": "bit-badger/feed-reader-central", "name": "bit-badger/feed-reader-central",
"minimum-stability": "beta",
"require": { "require": {
"php": ">=8.2", "php": ">=8.2",
"bit-badger/pdo-document": "^1", "bit-badger/pdo-document": "^1",

39
src/composer.lock generated
View File

@ -4,22 +4,22 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "2966efd32e555ad8b63351673e75b5a5", "content-hash": "1a4a7e8bbe5b45085bdfcb5a61a4f874",
"packages": [ "packages": [
{ {
"name": "bit-badger/inspired-by-fsharp", "name": "bit-badger/inspired-by-fsharp",
"version": "v1.0.0-beta2", "version": "v1.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp", "url": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp",
"reference": "fad428a4e40b606987499b17bb2d5b7d4b04502d" "reference": "3cc780956daa410c74667bc9c03fffa19de74e91"
}, },
"require": { "require": {
"php": "^8.2" "php": "8.2 - 8.3"
}, },
"require-dev": { "require-dev": {
"phpoption/phpoption": "^1", "pestphp/pest": "^3.5",
"phpunit/phpunit": "^11" "phpoption/phpoption": "^1"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -49,24 +49,25 @@
"rss": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp.rss", "rss": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp.rss",
"source": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp" "source": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp"
}, },
"time": "2024-07-29T17:58:33+00:00" "time": "2024-11-21T01:27:18+00:00"
}, },
{ {
"name": "bit-badger/pdo-document", "name": "bit-badger/pdo-document",
"version": "v1.0.0-beta9", "version": "v1.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.bitbadger.solutions/bit-badger/pdo-document", "url": "https://git.bitbadger.solutions/bit-badger/pdo-document",
"reference": "9e0e663811d9dbbdb94a2c04ce8b874e91a7c85b" "reference": "3b2d2ced98cf463b058d394542e944a03fa3e680"
}, },
"require": { "require": {
"bit-badger/inspired-by-fsharp": "^1", "bit-badger/inspired-by-fsharp": "^1",
"ext-pdo": "*", "ext-pdo": "*",
"netresearch/jsonmapper": "^4", "netresearch/jsonmapper": "^4",
"php": ">=8.2" "php": "8.2 - 8.3"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^11", "pestphp/pest": "^3.2",
"phpstan/phpstan": "^1.12",
"square/pjson": "^0.5.0" "square/pjson": "^0.5.0"
}, },
"type": "library", "type": "library",
@ -103,20 +104,20 @@
"rss": "https://git.bitbadger.solutions/bit-badger/pdo-document.rss", "rss": "https://git.bitbadger.solutions/bit-badger/pdo-document.rss",
"source": "https://git.bitbadger.solutions/bit-badger/pdo-document" "source": "https://git.bitbadger.solutions/bit-badger/pdo-document"
}, },
"time": "2024-07-29T20:57:51+00:00" "time": "2024-11-21T03:26:58+00:00"
}, },
{ {
"name": "netresearch/jsonmapper", "name": "netresearch/jsonmapper",
"version": "v4.4.1", "version": "v4.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/cweiske/jsonmapper.git", "url": "https://github.com/cweiske/jsonmapper.git",
"reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5",
"reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -152,14 +153,14 @@
"support": { "support": {
"email": "cweiske@cweiske.de", "email": "cweiske@cweiske.de",
"issues": "https://github.com/cweiske/jsonmapper/issues", "issues": "https://github.com/cweiske/jsonmapper/issues",
"source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0"
}, },
"time": "2024-01-31T06:18:54+00:00" "time": "2024-09-08T10:13:13+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
"aliases": [], "aliases": [],
"minimum-stability": "beta", "minimum-stability": "stable",
"stability-flags": [], "stability-flags": [],
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,

View File

@ -152,7 +152,8 @@ class ItemList
echo '<article>'; echo '<article>';
if ($this->dbList->hasItems()) { if ($this->dbList->hasItems()) {
$this->dbList->iter(function (ItemWithFeed $item) use ($return) { $this->dbList->iter(function (ItemWithFeed $item) use ($return) {
echo '<p>' . hx_get("/item?id=$item->id$return", strip_tags($item->title)) . '<br><small>'; $title = trim($item->title) === '' ? '<em>no title</em>' : strip_tags($item->title);
echo '<p>' . hx_get("/item?id=$item->id$return", $title) . '<br><small>';
if ($this->showIndicators) { if ($this->showIndicators) {
if (!$item->isRead()) echo '<strong>Unread</strong> &nbsp; '; if (!$item->isRead()) echo '<strong>Unread</strong> &nbsp; ';
if ($item->isBookmarked()) echo '<strong>Bookmarked</strong> &nbsp; '; if ($item->isBookmarked()) echo '<strong>Bookmarked</strong> &nbsp; ';

File diff suppressed because one or more lines are too long

View File

@ -58,12 +58,13 @@ try {
$published = date_time($item->published_on); $published = date_time($item->published_on);
$updated = isset($item->updated_on) ? date_time($item->updated_on) : null; $updated = isset($item->updated_on) ? date_time($item->updated_on) : null;
$title = trim($item->title) === '' ? '<em>no title</em>' : strip_tags($item->title);
page_head(htmlentities("$item->title | {$item->feed->title}")); ?> page_head(htmlentities("$item->title | {$item->feed->title}")); ?>
<h1 class=item_heading> <h1 class=item_heading>
<span class=bookmark hx-get="/bookmark?id=<?=$_GET['id']?>" hx-trigger=load hx-target=this hx-swap=outerHTML <span class=bookmark hx-get="/bookmark?id=<?=$_GET['id']?>" hx-trigger=load hx-target=this hx-swap=outerHTML
hx-push-url=false></span> hx-push-url=false></span>
<a href="<?=$item->item_link?>" target=_blank rel=noopener><?=strip_tags($item->title)?></a><br> <a href="<?=$item->item_link?>" target=_blank rel=noopener><?=$title?></a><br>
</h1> </h1>
<div class=item_published> <div class=item_published>
From <strong><?=htmlentities($item->feed->title)?></strong><br> From <strong><?=htmlentities($item->feed->title)?></strong><br>