Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
z1glr committed Jun 13, 2024
2 parents 1fb6ea9 + ef406b0 commit 75194e2
Show file tree
Hide file tree
Showing 101 changed files with 6,560 additions and 4,232 deletions.
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "enumMember",
"format": ["PascalCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "import",
"format": ["PascalCase", "snake_case", "camelCase"],
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"bracketSpacing": true,
"quoteProps": "as-needed",
"vueIndentScriptAndStyle": true,
"endOfLine": "lf"
"endOfLine": "auto"
}
1,808 changes: 0 additions & 1,808 deletions 3rdpartylicenses.json

This file was deleted.

18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@ Generate graphics with song-lyrics or for other church-service-elements and play
8. Optionally: create a shortcut to `chrome --app=http://127.0.0.1:8888` to open the client like a standalone app

## roadmap
- implement more playlist-items: Text
- companion integration (buttons for song parts -> send name to casparcg)
- client-messages: create message-log, group same
- fix "Buffer() is deprecated"
- load files from disc always at item selection to stay up to date
- create server-items at selection, delete after deselection to always stay up to date, but prevent multiple reloads (alternative: optional argument for accessing functions wether a reload should be done)
- save file through interface instead of download
- use playlist-caption
- create server-items at selection, delete after deselection to always stay up to date, but prevent multiple reloads (alternative: optional argument for accessing functions wether a reload should be done) / reload button in client
- make keyboard-navigation better
- tabindex for all elements
- keyboard-shortcuts
- update-item: reload changed media (somehow handle video / audio - or just don't care (maybe detect wether it actually changed))
- create library src-folder
- create documentation (including: Template-update-objects, psalm-file-definitions, config-file, companion-setup)
- modify client to avoid props-down-chaining (instead ts-file like `config.ts` or `logger.ts`)
- create example-files for songs and psalm
- move template-jump()-function into update() to prevent error messages in casparcg-log
- parse chords in songfile in preparation for chord-view
- casparcg: if no connection on startup possible: try periodically to reconnect
- song-file: chords itself as chords and transpose them
- support other browser than Chrome and phone / tablet resolution
- save_song(): check, wether "chords" is valid
- reload psalm and song after file-edit
- Fix style of AddPart-Draggable-Drag-n-drop Placeholder
- repair new-file abort unsaved changes
30 changes: 12 additions & 18 deletions build-scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import archiver from "archiver";
import { execSync } from "child_process";
import fs from "fs";
import path from "path";
import tar from "tar";

import type { ConfigJSON } from "../src/server/config.ts";

// check, wether the build script supports the os
if (!["win32", "linux"].includes(process.platform)) {
Expand Down Expand Up @@ -59,19 +57,7 @@ copy_build_file(process.execPath, exec_name);
// // modify the node executable
// execSync(`npx postject dist/build/${exec_name} NODE_SEA_BLOB dist/build/sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2`);

// load the config-file, censor the file-paths and store it for the relase
const config_file = JSON.parse(fs.readFileSync("config.json", "utf-8")) as ConfigJSON;
config_file.path = {
song: "Song/",
pdf: "PDF/",
psalm: "Psalm/",
playlist: "Playlist/",
bible: "Bible/Luther-Bibel.json"
};
config_file.companion.address = "172.0.0.1";
config_file.log_level = "INFO";

fs.writeFileSync(path.join(release_dir, "config.json"), JSON.stringify(config_file, undefined, "\t"));
copy_release_dir("config_default.yaml", "config.yaml");

// copy the file to the output
copy_release_file(path.join(build_dir, exec_name));
Expand Down Expand Up @@ -130,8 +116,16 @@ copy_release_file("LICENSE", "LICENSE.txt");
// copy the licenses
copy_release_dir(path.join(build_dir, "licenses"));

// pack the files in a .tar.gz-file
void tar.c({ gzip: true, file: release_dir + ".tar.gz", cwd: "dist" }, [path.relative("dist", release_dir)]);
// pack the files
const zip_stream = fs.createWriteStream(release_dir + ".zip");

const archive = archiver("zip");

archive.pipe(zip_stream);

archive.directory(release_dir, false);

void archive.finalize();

function create_launch_script(pth: string, destination: string) {
const relative_path_prefix = "../".repeat((destination.match(/\//g) ?? []).length);
Expand Down
9 changes: 0 additions & 9 deletions build-scripts/license-reporter.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ export const configuration: Partial<IReporterConfiguration> = {
output: "build-scripts/3rdpartylicenses.json",
ignore: ["dist/*"],
overrides: [
{
name: "osc"
},
{
name: "@esbuild/win32-x64"
},
Expand All @@ -30,12 +27,6 @@ export const configuration: Partial<IReporterConfiguration> = {
{
name: "natural-compare"
},
{
name: "osc",
url: "https://github.com/colinbdclark/osc.js.git",
licenseName: "MIT",
licenseText: "Copyright (c) 2011-2014 Colin Clark\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
},
{
name: "undici-types"
},
Expand Down
3 changes: 2 additions & 1 deletion build-scripts/server-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ esbuild.build({
sourcemap: true,
external: [
"pdfjs-dist",
"canvas"
"canvas",
"note-art"
]
});
4 changes: 4 additions & 0 deletions casparcg/Templates/JohnCG/Bible.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<style>
:root {
Expand Down Expand Up @@ -54,6 +56,8 @@
border-radius: 50%;

z-index: 10;

display: flex;
}

#icon > svg {
Expand Down
2 changes: 2 additions & 0 deletions casparcg/Templates/JohnCG/Countdown.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<style>
:root {
Expand Down
99 changes: 99 additions & 0 deletions casparcg/Templates/JohnCG/Text.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<style>
:root {
font-size: 0.8333vw;

overflow: hidden;

font-family: Bahnschrift;
}

body {
margin: 0px;

background-color: transparent;

user-select: none;
}

#main {
font-size: 4em;

position: absolute;

bottom: 0;
left: 0;

padding-left: 1em;
padding-bottom: 0.5em;

display: flex;

align-items: center;

transform: translate(0, 100%);

transition: transform 0.3s cubic-bezier(0.2, 0, 0.39, 0);
}

#main.slide_in {
transform: unset;

transition-timing-function: ease-in-out;
}

#text_wrapper {
overflow: hidden;

z-index: 0;

width: 0em;

transition: width 0.5s ease-in-out;

/* transform: translate(-1.5em, 0); */

background-color: white;

/* border-top-right-radius: 0.5em;
border-bottom-right-radius: 0.5em; */
border-radius: 0.5em;
}

#text_wrapper.show {
width: 100%;

transition: width 0.5s ease-out;
}

#text {
padding: 0.25em;

/* padding-left: 1.5em; */
padding-inline: 0.5em;

text-wrap: nowrap;

overflow: hidden;
}
</style>
<!-- ------------------------------------------------------------------- -->
<head>
<title>
JohnCG - Text-template
</title>
</head>
<!-- ------------------------------------------------------------------- -->
<body>
<div id="main">
<div>
<div id="text_wrapper">
<div id="text"></div>
</div>
</div>
</div>
</body>
<script src="Text.js"></script>
</html>
42 changes: 0 additions & 42 deletions config.json

This file was deleted.

25 changes: 25 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
log_level: DEBUG # log-leve - valid-values: ALL MARK TRACE DEBUG INFO WARN ERROR FATAL OFF
behaviour:
show_on_load: true # show the first slide when loading - valid-values: true false
path: # path to the different files
playlist: g:/Meine Ablage/Streaming/12_Abläufe/ # song-files
song: G:/Meine Ablage/Streaming/80_Songs/Lieder # pdf-files
psalm: G:/Meine Ablage/Streaming/80_Songs/Psalme # psalm-files
pdf: g:/Meine Ablage/Streaming/60_PDF/ # playlist-files
bible: files/Bible/Luther-Bibel.json # used bible
casparcg:
transition_length: 12.5 # transition-length in frames
connections: # individual CasparCG-connections
- host: 127.0.0.1
port: 5250
channel: 1
layers:
media: 20 # used for media-playback - Can be removed to don't show media
template: 21 # used for templates and song-/psalm-/countdown-text
path: D:/Streaming-neu/casparcg_v2.4.0 # - optional path to CasparCG-directory to auto-start at launch
client_server:
http:
port: 8888 # port for the client-interface web-server
websocket:
port: 8765 # port for the websocket-communication between client and server (needs to be changed in client/assets/main-*.js - search for 'port:"')

24 changes: 24 additions & 0 deletions config_default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
log_level: INFO # log-leve - valid-values: ALL MARK TRACE DEBUG INFO WARN ERROR FATAL OFF
behaviour:
show_on_load: true # show the first slide when loading - valid-values: true false
path: # path to the different files
playlist: Song/ # song-files
song: PDF/ # pdf-files
psalm: Psalm/ # psalm-files
pdf: Playlist/ # playlist-files
bible: Bible/Luther-Bibel.json # used bible
casparcg:
transition_length: 12.5 # transition-length in frames
connections: # individual CasparCG-connections
- host: 127.0.0.1
port: 5250
channel: 1
layers:
media: 20 # used for media-playback - Can be removed to don't show media
template: 21 # used for templates and song-/psalm-/countdown-text
# path: path/to/CasparCG # - optional path to CasparCG-directory to auto-start at launch
client_server:
http:
port: 8888 # port for the client-interface web-server
websocket:
port: 8765 # port for the websocket-communication between client and server (needs to be changed in client/assets/main-*.js - search for 'port:"')
Loading

0 comments on commit 75194e2

Please sign in to comment.