forked from nm3clol/nm3clol-express-app
Update server, CSS, video player, README.md support on video player, example youtube-cookies.txt file, add sync script for my Richmond Youtube videos.
This commit is contained in:
parent
351fa55c92
commit
86148d5c4b
3
.gitattributes
vendored
3
.gitattributes
vendored
|
@ -6,3 +6,6 @@
|
|||
*.mkv filter=lfs diff=lfs merge=lfs -text
|
||||
*.epub filter=lfs diff=lfs merge=lfs -text
|
||||
*.gif filter=lfs diff=lfs merge=lfs -text
|
||||
*.xlxs filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.woff2 filter=lfs diff=lfs merge=lfs -text
|
||||
|
|
|
@ -133,7 +133,7 @@ glob.globSync('Web_Site_Archives/**/*{.htm,.html}', {
|
|||
|
||||
// Endpoints for all the site's YouTube videos.
|
||||
console.log("Scanning for archived videos to create routes");
|
||||
glob.globSync(['Russell_County/Board_of_Supervisors/YouTube_Archive/**/*.info.json', 'Virginia_Energy/YouTube_Archive/**/*.info.json'], {
|
||||
glob.globSync(['Russell_County/Board_of_Supervisors/YouTube_Archive/**/*.info.json', 'Virginia_Energy/YouTube_Archive/**/*.info.json', 'Virginia_Governor/**/*.info.json'], {
|
||||
cwd: path.join(__dirname, '..', 'public'),
|
||||
matchBase: true,
|
||||
follow: true,
|
||||
|
@ -168,15 +168,37 @@ glob.globSync(['Russell_County/Board_of_Supervisors/YouTube_Archive/**/*.info.js
|
|||
const fullFilePath = path.join(__dirname, '..', 'public', filePath);
|
||||
console.log(`Setting route for ${route}`);
|
||||
app.get(route, async (req, res) => {
|
||||
let info = require(fullFilePath);
|
||||
let subtitleVTT = fs.existsSync(subtitleFile)?fs.readFileSync(subtitleFile, 'utf8'):undefined;
|
||||
const renderData = { route, filePath, fullFilePath, req, paths, directory, videoURL, subtitleURL, subtitleVTT, info };
|
||||
res.render("video-player", { h: helpers, require, ...renderData });
|
||||
if (!req.path.endsWith('/')) {
|
||||
res.redirect(req.path + '/');
|
||||
}
|
||||
else {
|
||||
let info = require(fullFilePath);
|
||||
let subtitleVTT = fs.existsSync(subtitleFile)?fs.readFileSync(subtitleFile, 'utf8'):undefined;
|
||||
const renderData = { route, filePath, fullFilePath, req, paths, directory: path.join('public', directory), videoURL, subtitleURL, subtitleVTT, info };
|
||||
res.render("video-player", { h: helpers, require, ...renderData });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//app.get('/OCR-Encoded-PDFs/Russell-County-Web-Site_2024-02-13_19_50_Modified-With-OCR-Encoding**', rewriter.rewrite('/Web_Site_Archives/Russell_County_Web_Site-2024-02-13_19_50_Modified_With_OCR_Encoding/$1'));
|
||||
|
||||
console.log(`Setting routes for /vendor/**/*`);;
|
||||
app.get('/vendor/**/*', async (req, res) => {
|
||||
await serve(req, res, {
|
||||
public: path.join(__dirname, '..', 'static'),
|
||||
symlinks: true,
|
||||
trailingSlash: true,
|
||||
cleanUrls: false,
|
||||
renderSingle: false,
|
||||
unlisted: [
|
||||
".DS_Store",
|
||||
".git",
|
||||
"Thumbs.db",
|
||||
"README*",
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
console.log(`Setting routes for /css/*.css`);;
|
||||
app.get('/css/*.css', async (req, res) => {
|
||||
await serve(req, res, {
|
||||
|
@ -189,7 +211,7 @@ app.get('/css/*.css', async (req, res) => {
|
|||
".DS_Store",
|
||||
".git",
|
||||
"Thumbs.db",
|
||||
// "README*",
|
||||
"README*",
|
||||
],
|
||||
});
|
||||
});
|
||||
|
@ -206,7 +228,7 @@ app.get('/svg/*.svg', async (req, res) => {
|
|||
".DS_Store",
|
||||
".git",
|
||||
"Thumbs.db",
|
||||
// "README*",
|
||||
"README*",
|
||||
],
|
||||
});
|
||||
});
|
||||
|
@ -223,7 +245,7 @@ app.get('*', async (req, res) => {
|
|||
".DS_Store",
|
||||
".git",
|
||||
"Thumbs.db",
|
||||
// "README*",
|
||||
"README*",
|
||||
],
|
||||
redirects: [
|
||||
{
|
||||
|
|
|
@ -112,7 +112,7 @@ a {
|
|||
line-height: 20px;
|
||||
}
|
||||
a:hover, a:active {
|
||||
color: #0076FF;
|
||||
color: #0076ff;
|
||||
display: inline-block;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ a .pretty, a .cool {
|
|||
}
|
||||
a:hover .david, a:active .david, a:hover .cool, a:active .cool {
|
||||
display: inline;
|
||||
color: #0076FF;
|
||||
color: #0076ff;
|
||||
}
|
||||
a:hover .allen, a:active .allen {
|
||||
display: inline;
|
||||
|
@ -243,4 +243,81 @@ thead {
|
|||
|
||||
.total {
|
||||
border-top: 5pt double #222;
|
||||
}
|
||||
|
||||
.winner {
|
||||
color: #00A000;
|
||||
}
|
||||
|
||||
tr.republican, tr.democratic, tr.independent, tr.write-in {
|
||||
padding-top: 1pt;
|
||||
}
|
||||
|
||||
tr.republican .progress, tr.democratic .progress, tr.independent .progress, tr.write-in .progress {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
tr.republican .progress-bar {
|
||||
background-color: #f44336;
|
||||
color: #f44336;
|
||||
}
|
||||
|
||||
tr.democratic .progress-bar {
|
||||
background-color: #0076ff;
|
||||
color: #0076ff;
|
||||
}
|
||||
|
||||
tr.independent .progress-bar {
|
||||
background-color: #ffa500;
|
||||
color: #ffa500;
|
||||
}
|
||||
|
||||
tr.write-in .progress-bar {
|
||||
background-color: #555;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
tr.republican td:first-child, tr.democratic td:first-child, tr.independent td:first-child, tr.write-in td:first-child {
|
||||
border-left: 6pt solid;
|
||||
}
|
||||
|
||||
tr.republican td:first-child {
|
||||
border-color: #f44336;
|
||||
}
|
||||
|
||||
tr.democratic td:first-child {
|
||||
border-color: #0076ff;
|
||||
}
|
||||
|
||||
tr.independent td:first-child {
|
||||
border-color: #ffa500;
|
||||
}
|
||||
|
||||
tr.write-in td:first-child {
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
@media print{
|
||||
@page { size: portrait; }
|
||||
body { font-size: 12pt; background-color: #fff; }
|
||||
img.no-trash-svg { display: none; visibility: hidden; opacity: 0.00; }
|
||||
.page-break { page-break-after: always; }
|
||||
.navbar { position: relative; }
|
||||
img, a img, a:link img, a:visited img, a:hover img, a:active img{
|
||||
width: auto !important;
|
||||
page-break-inside: avoid !important;
|
||||
max-height: 85vh !important;
|
||||
max-width: 85vw !important;
|
||||
}
|
||||
embed {
|
||||
width: 90vw !important;
|
||||
page-break-inside: avoid !important;
|
||||
max-height: 80vh !important;
|
||||
max-width: 80vw !important;
|
||||
display: block;
|
||||
}
|
||||
.container { max-width: fit-content; }
|
||||
.nmc3clol-navbar-brand { color: #f44336; }
|
||||
.daball-navbar-brand { color: #000; }
|
||||
.pt-1500 { padding-top: 150px;}
|
||||
}
|
3
sync-my-youtube-videos.cmd
Normal file
3
sync-my-youtube-videos.cmd
Normal file
|
@ -0,0 +1,3 @@
|
|||
S:\bin\yt-dlp.exe --live-from-start --yes-playlist -N 8 -R infinite -c --no-force-overwrites --mtime --write-description --write-info-json --write-playlist-metafiles --write-comments --no-cookies-from-browser --cookies S:\srv\www\no-moss-3-carbo-landfill-library.online\youtube-cookies.txt --write-thumbnail --write-all-thumbnails --write-url-link --write-webloc-link --write-desktop-link --progress --video-multistreams --audio-multistreams --write-subs --write-auto-subs --embed-subs --embed-thumbnail --embed-metadata --embed-chapters --embed-info-json -o "S:\srv\www\no-moss-3-carbo-landfill-library.online\YouTube\%%(uploader_id)s\%%(upload_date>%%Y-%%m-%%d)s-%%(title)s\%%(id)s.%%(ext)s" "https://www.youtube.com/watch?v=WMEw18t9p1Q"
|
||||
S:\bin\yt-dlp.exe --live-from-start --yes-playlist -N 8 -R infinite -c --no-force-overwrites --mtime --write-description --write-info-json --write-playlist-metafiles --write-comments --no-cookies-from-browser --cookies S:\srv\www\no-moss-3-carbo-landfill-library.online\youtube-cookies.txt --write-thumbnail --write-all-thumbnails --write-url-link --write-webloc-link --write-desktop-link --progress --video-multistreams --audio-multistreams --write-subs --write-auto-subs --embed-subs --embed-thumbnail --embed-metadata --embed-chapters --embed-info-json -o "S:\srv\www\no-moss-3-carbo-landfill-library.online\YouTube\%%(uploader_id)s\%%(upload_date>%%Y-%%m-%%d)s-%%(title)s\%%(id)s.%%(ext)s" "https://www.youtube.com/watch?v=lZfmk1RPdbk"
|
||||
S:\bin\yt-dlp.exe --live-from-start --yes-playlist -N 8 -R infinite -c --no-force-overwrites --mtime --write-description --write-info-json --write-playlist-metafiles --write-comments --no-cookies-from-browser --cookies S:\srv\www\no-moss-3-carbo-landfill-library.online\youtube-cookies.txt --write-thumbnail --write-all-thumbnails --write-url-link --write-webloc-link --write-desktop-link --progress --video-multistreams --audio-multistreams --write-subs --write-auto-subs --embed-subs --embed-thumbnail --embed-metadata --embed-chapters --embed-info-json -o "S:\srv\www\no-moss-3-carbo-landfill-library.online\YouTube\%%(uploader_id)s\%%(upload_date>%%Y-%%m-%%d)s-%%(title)s\%%(id)s.%%(ext)s" "https://www.youtube.com/watch?v=RRGeIh_fh_M"
|
|
@ -1,28 +1,28 @@
|
|||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HQR3Z1EZQM"></script>
|
||||
<script>
|
||||
<script><!--
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-HQR3Z1EZQM');
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
// --></script>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8937572456576531" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://daball.me/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:100,200,300,400,500,600,700,800,900" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Cinzel+Decorative:100,200,300,400,500,600,700,800,900" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Alegreya+SC:100,200,300,400,500,600,700,800,900" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Covered+By+Your+Grace:100,200,300,400,500,600,700,800,900" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Sometype+Mono:100,200,300,400,500,600,700,800,900" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Noto+Serif:100,200,300,400,500,600,700,800,900" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">
|
||||
<link href="https://daball.me/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="https://daball.me/vendor/devicons/css/devicons.min.css" rel="stylesheet">
|
||||
<link href="https://daball.me/vendor/devicon/devicon.min.css" rel="stylesheet">
|
||||
<link href="https://daball.me/vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet">
|
||||
<link href="https://daball.me/layouts/blog/css/blog.min.css" rel="stylesheet">
|
||||
<link href="/css/nm3clol.css" rel="stylesheet">
|
||||
<link href="https://daball.me/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:100,200,300,400,500,600,700,800,900" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Cinzel+Decorative:100,200,300,400,500,600,700,800,900" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Alegreya+SC:100,200,300,400,500,600,700,800,900" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Covered+By+Your+Grace:100,200,300,400,500,600,700,800,900" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Sometype+Mono:100,200,300,400,500,600,700,800,900" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Noto+Serif:100,200,300,400,500,600,700,800,900" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet" />
|
||||
<link href="/vendor/fontawesome-free-6.5.2-web/css/all.min.css" rel="stylesheet" />
|
||||
<link href="https://daball.me/vendor/devicons/css/devicons.min.css" rel="stylesheet" />
|
||||
<link href="https://daball.me/vendor/devicon/devicon.min.css" rel="stylesheet" />
|
||||
<link href="https://daball.me/vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet" />
|
||||
<link href="https://daball.me/layouts/blog/css/blog.min.css" rel="stylesheet" />
|
||||
<link href="/css/nm3clol.css" rel="stylesheet" />
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
<% if (typeof videoURL !== 'undefined') {%>
|
||||
<div class="row p-4 pb-0 pe-lg-0 pt-lg-5 align-items-center rounded-3 border shadow-lg">
|
||||
<div class="col-lg-12 p-3 p-lg-5 pt-lg-3">
|
||||
<% if (h.directoryContainsReadme({directory})) {%>
|
||||
<%- h.printReadme({directory}) %>
|
||||
<% }%>
|
||||
<h1 class="title"><%= (typeof info.title !== 'undefined') ? info.fulltitle : "" %></h1>
|
||||
<video class="object-fit-fill ratio ratio-16x9" controls allowfullscreen>
|
||||
<source src="<%-encodeURI(videoURL)%>">
|
||||
|
@ -77,7 +80,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
<%- include('./includes/bottom-navbar.ejs') %>
|
||||
|
|
17
youtube-cookies.example.txt
Normal file
17
youtube-cookies.example.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Netscape HTTP Cookie File
|
||||
# This file is generated by yt-dlp. Do not edit. I think I might have once needed to create it first in Edge and copy my values from my logged in browser.
|
||||
|
||||
.youtube.com TRUE / TRUE ... GPS ...
|
||||
.youtube.com TRUE / FALSE ... PREF tz=...&f6=...&f7=...&hl=...
|
||||
.youtube.com TRUE / TRUE ... SOCS ...
|
||||
.youtube.com TRUE / TRUE ... VISITOR_INFO1_LIVE ...
|
||||
.youtube.com TRUE / TRUE ... VISITOR_PRIVACY_METADATA ...
|
||||
.youtube.com TRUE / TRUE ... YSC ...
|
||||
youtube.com FALSE / FALSE ... APISID .../...
|
||||
youtube.com FALSE / TRUE ... PREF tz=...&f6=...&f7=...
|
||||
youtube.com FALSE / TRUE ... SAPISID .../...
|
||||
youtube.com FALSE / FALSE ... SID ...
|
||||
youtube.com FALSE / FALSE ... SIDCC ...
|
||||
youtube.com FALSE / TRUE ... __Secure-1PAPISID .../...
|
||||
youtube.com FALSE / TRUE ... __Secure-3PAPISID .../...
|
||||
youtube.com FALSE / FALSE ... _gcl_au ...
|
Loading…
Reference in New Issue
Block a user