working on lite variant of nudus-*

This commit is contained in:
Martin Rotter 2023-12-01 09:19:10 +01:00
parent 79c81fb5ac
commit cc660229af
11 changed files with 218 additions and 196 deletions

13
.gitignore vendored
View file

@ -1,32 +1,23 @@
# Compiled Object files.
*.slo *.slo
*.lo *.lo
*.o *.o
*.obj *.obj
# Compiled Dynamic libraries.
*.so *.so
*.dylib *.dylib
*.dll *.dll
# Compiled Static libraries.
*.lai *.lai
*.la *.la
*.a *.a
*.lib *.lib
# Executables.
*.exe *.exe
*.out *.out
*.app *.app
# Other files.
*.autosave *.autosave
*.user* *.user*
localization/*qm localization/*qm
*.TMP *.TMP
resources/skins/*/*.map resources/skins/*/*.map
aqtinstall.log
# Build directory. .sass-cache
build-dir/ build-dir/
docs/build docs/build

View file

@ -0,0 +1,17 @@
Media Player
============
RSS Guard offers some abilities everyone would expect from typical podcast client. It offers built-in media player on some platforms:
* All[^1] [non-`lite`](../variants) builds offer `libmpv`-based media player which supports almost all features offered by `libmpv`, including keyboar d/mouse navigation, on-screen controller and custom configuration files loading. At this point. Also, `yt-dlp` is deployed on some[^2] platforms which allows comfortable Youtube videos playback.
* All [`lite`](../variants) include more basic media player based on `QtMultimedia` backend. This backend is usually itself based on `ffmpeg` so it can play fairly wide range of media formats.
[^1]: At this point, precompiled binaries for Mac OS X do not have this backend enabled and rely on `QtMultimedia` backend instead.
[^2]: `yt-dlp` is contained in binaries for Windows. For other operating systems, I recommend to install `yt-dlp` or `youtube-dl` system-wide and add it to your `PATH` environment variable. Also, custom path to the tool can be tweaked in `mpv.conf`.
## Usage
This feature is available for each hyperlink URL. You can either right-click any link in embedded article/web browser or you can use `Articles -> Play in media player` menu item.
## Configuration
See `Settings -> Media player` configuration section in RSS Guard. User data [placeholder](userdata) is supported.
## `libmpv` Backend
Note that this backend does support full `mpv` configuration mechanism. You can set path to custom configuration folder in settings (see above). If you select empty folder, then RSS Guard automatically copies sample configuration files into it.

6
docs/source/variants.md Normal file
View file

@ -0,0 +1,6 @@
Variants
========
RSS Guard is distributed in two flavours:
* Full package with `QtWebEngine`-based bundled article viewer: This variant displays articles with their full formatting and layout in embedded Chromium-based web browser. This variant of RSS Guard should be okay for everyone. Also, installation packages are relatively big. Also, this RSS Guard flavor offers more powerful [media player](features/mediaplayer).
* Lite package with simple text-based article viewer: This variant displays article in a much simpler and much more lightweight web viewer component. All packages of this variant have `lite` keyword in their names. This flavor of RSS Guard does NOT have a JavaScript support and is meant for people who value their privacy. Also, it offers more limited media player.

View file

@ -83,6 +83,8 @@
<file>skins/nudus-base/html_enclosure_image.html</file> <file>skins/nudus-base/html_enclosure_image.html</file>
<file>skins/nudus-base/html_single_message.html</file> <file>skins/nudus-base/html_single_message.html</file>
<file>skins/nudus-base/html_wrapper.html</file> <file>skins/nudus-base/html_wrapper.html</file>
<file>skins/nudus-base/lite_html_enclosure_every.html</file>
<file>skins/nudus-base/lite_html_single_message.html</file>
<file>skins/nudus-dark/html_wrapper.html</file> <file>skins/nudus-dark/html_wrapper.html</file>
<file>skins/nudus-dark/html_style.css</file> <file>skins/nudus-dark/html_style.css</file>
@ -92,6 +94,7 @@
<file>skins/nudus-light/html_style.css</file> <file>skins/nudus-light/html_style.css</file>
<file>skins/nudus-light/metadata.xml</file> <file>skins/nudus-light/metadata.xml</file>
<file>skins/nudus-light/qt_style.qss</file> <file>skins/nudus-light/qt_style.qss</file>
<file>skins/nudus-light/lite_html_style.css</file>
<file>initial_feeds/feeds-en_US.opml</file> <file>initial_feeds/feeds-en_US.opml</file>

View file

@ -0,0 +1 @@
&nbsp;<a href="%1"><span>%2</span><span style="text-transform: uppercase;">%3</span></a>

View file

@ -0,0 +1,15 @@
<div dir="%9" id="%8">
<div>
<div>%7</div>
<span>%2</span>
<h1>%1<span>%6<span>&nbsp;&nbsp;<a href="%3">URL</a></span></h1>
<span>%5</span>
</div>
<hr>
<div>
%4
</div>
</div>

View file

@ -0,0 +1,28 @@
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
margin: 0;
padding: 0;
}
body {
background-color: $col_back;
color: $col_front;
}
a {
color: $col_link;
}

View file

@ -1,15 +1,13 @@
@charset "UTF-8"; @charset "UTF-8";
* { * {
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit; }
}
body, h1, h2, h3, h4, h5, h6, body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr, p, blockquote, pre, hr,
dl, dd, ol, ul, figure { dl, dd, ol, ul, figure {
margin: 0; margin: 0;
padding: 0; padding: 0; }
}
body { body {
background-color: #FBFBFB; background-color: #FBFBFB;
@ -19,148 +17,115 @@ body {
-webkit-font-feature-settings: "kern" 1; -webkit-font-feature-settings: "kern" 1;
font-feature-settings: "kern" 1; font-feature-settings: "kern" 1;
font-kerning: normal; font-kerning: normal;
min-height: 100vh; min-height: 100vh; }
}
::selection { ::selection {
background-color: #5D88D2; background-color: #5D88D2;
text-shadow: none; text-shadow: none; }
}
h1, h2, h3, h4, h5, h6, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, p, blockquote, pre,
ul, ol, dl, figure, ul, ol, dl, figure,
details { details {
margin-bottom: 10px; margin-bottom: 10px; }
}
hr { hr {
background-color: #CFCFCF; background-color: #CFCFCF;
border: none; border: none;
display: block; display: block;
height: 2px; height: 2px;
margin: 10px 0; margin: 10px 0; }
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-weight: 600 !important; font-weight: 600 !important; }
}
h1 { h1 {
font-size: 1.25rem !important; font-size: 1.25rem !important; }
}
h2 { h2 {
font-size: 1.20rem !important; font-size: 1.20rem !important; }
}
h3 { h3 {
font-size: 1.15rem !important; font-size: 1.15rem !important; }
}
h4 { h4 {
font-size: 1.1rem !important; font-size: 1.1rem !important; }
}
h5 { h5 {
font-size: 1rem !important; font-size: 1rem !important; }
}
h6 { h6 {
font-size: .95rem !important; font-size: .95rem !important; }
}
b { b {
font-weight: bold !important; font-weight: bold !important; }
}
i { i {
font-style: italic !important; font-style: italic !important; }
}
strong { strong {
font-weight: 800 !important; font-weight: 800 !important; }
}
em { em {
font-style: oblique !important; font-style: oblique !important; }
}
mark { mark {
background-color: #FFECCC; background-color: #FFECCC; }
}
sub, sub,
sup { sup {
font-size: .8rem !important; font-size: .8rem !important; }
}
small { small {
font-size: .9rem !important; font-size: .9rem !important; }
}
abbr { abbr {
cursor: help; cursor: help;
font-style: italic !important; font-style: italic !important;
font-weight: 100 !important; font-weight: 100 !important; }
}
q { q {
font-style: italic !important; font-style: italic !important; }
} q::before {
q::before { content: '“'; }
content: '“'; q::after {
} content: '”'; }
q::after {
content: '”';
}
time { time {
font-weight: 450 !important; font-weight: 450 !important; }
}
var { var {
font-style: oblique !important; font-style: oblique !important;
font-weight: 500 !important; font-weight: 500 !important; }
}
a { a {
color: #5D88D2; color: #5D88D2; }
} a:hover {
a:hover { text-decoration: none; }
text-decoration: none; a:focus {
} box-shadow: none;
a:focus { outline: none; }
box-shadow: none;
outline: none;
}
cite { cite {
font-style: italic !important; font-style: italic !important;
font-weight: bold !important; font-weight: bold !important; }
}
figure { figure {
max-width: 100%; max-width: 100%; }
}
figure > img { figure > img {
display: block; display: block; }
}
figcaption { figcaption {
font-size: .8rem !important; font-size: .8rem !important; }
}
blockquote { blockquote {
border-left: 0.3em solid #CFCFCF; border-left: 0.3em solid #CFCFCF;
margin-left: 0; margin-left: 0;
padding: 0 10px; padding: 0 10px; }
} blockquote,
blockquote, blockquote p {
blockquote p { color: #343434; }
color: #343434;
}
pre, pre,
code { code {
@ -168,14 +133,12 @@ code {
border-radius: 0.1em; border-radius: 0.1em;
color: #343434; color: #343434;
font-family: monospace; font-family: monospace;
font-size: .95rem !important; font-size: .95rem !important; }
}
code { code {
background-color: #F1F1F1; background-color: #F1F1F1;
padding: 0 .25em; padding: 0 .25em;
word-break: break-word; word-break: break-word; }
}
pre { pre {
background-color: #F1F1F1; background-color: #F1F1F1;
@ -183,16 +146,14 @@ pre {
padding: 7px 13px; padding: 7px 13px;
tab-size: 2; tab-size: 2;
white-space: pre !important; white-space: pre !important;
width: unset !important; width: unset !important; }
} pre > code {
pre > code { background-color: unset;
background-color: unset; border: none;
border: none; color: unset;
color: unset; padding-right: 0;
padding-right: 0; padding-left: 0;
padding-left: 0; tab-size: 2; }
tab-size: 2;
}
kbd { kbd {
background: #F1F1F1; background: #F1F1F1;
@ -201,8 +162,7 @@ kbd {
border-radius: 0.1em; border-radius: 0.1em;
box-shadow: 0 2px 4px #ececec, inset 0 1px #FBFBFB; box-shadow: 0 2px 4px #ececec, inset 0 1px #FBFBFB;
font-size: .9rem !important; font-size: .9rem !important;
padding: .1em .4em .2em .4em; padding: .1em .4em .2em .4em; }
}
select { select {
background-color: #F1F1F1; background-color: #F1F1F1;
@ -210,138 +170,105 @@ select {
border-radius: 0.1em; border-radius: 0.1em;
color: #000000; color: #000000;
padding: .04em .25em; padding: .04em .25em;
width: 100%; width: 100%; }
} select:focus {
select:focus { box-shadow: none;
box-shadow: none; outline: none;
outline: none; background-color: #FBFBFB; }
background-color: #FBFBFB; select > option {
} background-color: #FBFBFB; }
select > option {
background-color: #FBFBFB;
}
table { table {
border-collapse: collapse; border-collapse: collapse;
width: 100% !important; width: 100% !important; }
}
li { li {
display: list-item; display: list-item; }
}
ul, ul,
ol { ol {
padding-left: 1.5em; padding-left: 1.5em; }
}
ul { ul {
list-style-type: disc; list-style-type: disc; }
} ul li ul {
ul li ul { list-style-type: square; }
list-style-type: square;
}
ol { ol {
list-style-type: decimal; list-style-type: decimal; }
} ol li ol {
ol li ol { list-style-type: lower-roman; }
list-style-type: lower-roman;
}
img { img {
height: auto; height: auto; }
}
details { details {
border: 1px solid #F1F1F1; border: 1px solid #F1F1F1;
border-radius: 0.1em; border-radius: 0.1em;
padding: .5em .5em 0; padding: .5em .5em 0; }
} details > summary {
details > summary { background-color: #F1F1F1;
background-color: #F1F1F1; border-radius: 0.09em;
border-radius: 0.09em; cursor: pointer;
cursor: pointer; margin: -.5em -.5em 0;
margin: -.5em -.5em 0; padding-left: .5em; }
padding-left: .5em; details > summary:focus {
} box-shadow: none;
details > summary:focus { outline: none; }
box-shadow: none; details *:last-child {
outline: none; margin-bottom: 0; }
}
details *:last-child {
margin-bottom: 0;
}
details[open] { details[open] {
border-color: #DEDEDE; border-color: #DEDEDE;
padding: .5em; padding: .5em; }
} details[open] > summary {
details[open] > summary { border-bottom: 1px solid #DEDEDE;
border-bottom: 1px solid #DEDEDE; border-radius: 0.09em 0.09em 0 0;
border-radius: 0.09em 0.09em 0 0; margin-bottom: .5em; }
margin-bottom: .5em;
}
iframe { iframe {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
width: auto; width: auto; }
}
a:focus, a:focus,
select:focus, select:focus,
summary:focus { summary:focus {
background-color: #DEDEDE; background-color: #DEDEDE;
text-shadow: 0 -1px #FBFBFB; text-shadow: 0 -1px #FBFBFB; }
}
:target { :target {
outline: 1px solid #5D88D2; outline: 1px solid #5D88D2; }
}
.rssguard-mwrapper { .rssguard-mwrapper {
padding: 10px !important; padding: 10px !important; }
} .rssguard-mwrapper .rssguard-mhead .msmall,
.rssguard-mwrapper .rssguard-mhead .msmall, .rssguard-mwrapper .rssguard-mhead .mlinks {
.rssguard-mwrapper .rssguard-mhead .mlinks { opacity: .8; }
opacity: .8; .rssguard-mwrapper .rssguard-mhead > h1 {
} margin: 0; }
.rssguard-mwrapper .rssguard-mhead > h1 { .rssguard-mwrapper .rssguard-mhead .msmall {
margin: 0; font-size: .9em; }
} .rssguard-mwrapper .rssguard-mhead .mlinks .menc {
.rssguard-mwrapper .rssguard-mhead .msmall { word-break: break-word; }
font-size: .9em; .rssguard-mwrapper .rssguard-mhead .mlinks .mwrapurl {
} display: inline-flex; }
.rssguard-mwrapper .rssguard-mhead .mlinks .menc { .rssguard-mwrapper .rssguard-mhead .mlinks .mwrapurl a[href=""], .rssguard-mwrapper .rssguard-mhead .mlinks .mwrapurl a[href=""] + span {
word-break: break-word; display: none; }
}
.rssguard-mwrapper .rssguard-mhead .mlinks .mwrapurl {
display: inline-flex;
}
.rssguard-mwrapper .rssguard-mhead .mlinks .mwrapurl a[href=""], .rssguard-mwrapper .rssguard-mhead .mlinks .mwrapurl a[href=""] + span {
display: none;
}
.rssguard-mwrapper .rssguard-mbody img {
max-width: 450px !important;
max-height: unset !important;
}
@media only screen and (max-width: 800px) {
.rssguard-mwrapper .rssguard-mbody img { .rssguard-mwrapper .rssguard-mbody img {
max-width: 100% !important; max-width: 450px !important;
} max-height: unset !important; }
} @media only screen and (max-width: 800px) {
.rssguard-mwrapper .rssguard-mbody img {
max-width: 100% !important; } }
.rssguard-mbody { .rssguard-mbody {
word-break: break-word; word-break: break-word; }
}
table { table {
word-break: normal; word-break: normal; }
}
::selection { ::selection {
color: #F1F1F1; color: #F1F1F1; }
}
/*# sourceMappingURL=html_style.css.map */ /*# sourceMappingURL=html_style.css.map */

View file

@ -0,0 +1,25 @@
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
margin: 0;
padding: 0; }
body {
background-color: #FBFBFB;
color: #000000; }
a {
color: #0f80f1; }

View file

@ -0,0 +1,7 @@
@charset "utf-8";
$col_back: #FBFBFB !default;
$col_front: #000000 !default;
$col_link: #0f80f1 !default;
@import "../nudus-base/lite_html_style_base";

View file

@ -38,6 +38,7 @@ TextBrowserViewer::TextBrowserViewer(QWidget* parent)
setDocument(m_document.data()); setDocument(m_document.data());
// Apply master CSS. // Apply master CSS.
/*
QColor a_color = qApp->skins()->colorForModel(SkinEnums::PaletteColors::FgInteresting).value<QColor>(); QColor a_color = qApp->skins()->colorForModel(SkinEnums::PaletteColors::FgInteresting).value<QColor>();
if (!a_color.isValid()) { if (!a_color.isValid()) {
@ -45,6 +46,7 @@ TextBrowserViewer::TextBrowserViewer(QWidget* parent)
} }
m_document.data()->setDefaultStyleSheet(QSL("a { color: %1; }").arg(a_color.name())); m_document.data()->setDefaultStyleSheet(QSL("a { color: %1; }").arg(a_color.name()));
*/
/* /*
m_document->setDefaultStyleSheet("p {" m_document->setDefaultStyleSheet("p {"