-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
2,930 additions
and
1,408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ client | |
license-generator.ts | ||
license-reporter.config.ts | ||
build-scripts/*.js | ||
pandoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
node_modules | ||
node_modules_windows | ||
node_modules_linux | ||
server_log.log | ||
logs | ||
miktex | ||
out | ||
dist | ||
pandoc/* | ||
|
||
casparcg/Templates/JohnCG/*.js | ||
build-scripts/build.js | ||
build-scripts/3rdpartylicenses.json | ||
out | ||
dist | ||
*.map | ||
*.map | ||
install-tl.log | ||
|
||
!pandoc/install.py | ||
!pandoc/texlive.profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
# johnCG - character-generator for lyrics | ||
Generate lyric-graphics and play them out through CasparCG. | ||
# JohnCG - character-generator for song-lyrics and other church-service-elements | ||
Generate graphics with song-lyrics or for other church-service-elements and play them out through CasparCG. | ||
|
||
## Requirements | ||
- CasparCG | ||
- CasparCG-capable hardware | ||
- SongBeamer for creation of song-files | ||
- Linux: `pandoc` and `LaTeX`-packages (basic, langgerman, latex, latexrecommended, latexextra, fontsextra, fontsrecommended) | ||
|
||
## Installation | ||
(WiP) | ||
## Getting started | ||
1. Download CasparCG and set it up according to its [GitHub-site](https://github.com/CasparCG/server). | ||
2. Download the latest JohnCG-version from [releases](https://github.com/johannesbuehl/johncg/releases) and unzip it. | ||
3. Move the content of `casparcg/Templates` and `casparcg/Media` inside of CasparCGs Template and Media directories. | ||
4. Edit `config.json` if necessary | ||
5. Start CasparCG | ||
6. Start JohnCG through `JohnCG_[VERSION]_linux.bat` or `JohnCG_[VERSION]_linux.sh` | ||
7. Open [`127.0.0.1:8888`](127.0.0.1:8888) (or the port you specified in `settings.json`) | ||
8. Optionally: create a shortcut to `chrome --app=http://127.0.0.1:8888` to open the client like a standalone app | ||
|
||
## roadmap | ||
- implement other playlist-items than song (Missing: Diashow / Multi-Image, Text, Custom AMCP-command) | ||
- client: information about connection (active / reconnecting / ...) | ||
- implement more playlist-items: Text | ||
- companion integration (buttons for song parts -> send name to casparcg) | ||
- check client -> server slide_number out of range | ||
- client: check response-texts, if they are still correct | ||
- write installation instruction (including Bahnschrift-Font installation) | ||
- client communication with osc over websocket? | ||
- add support for NodeCG | ||
- implement all countdown modes | ||
- countdown: save in server wether it is finished | ||
- client-messages: create message-log, group same | ||
- fix "Buffer() is deprecated" | ||
- catch casparcg not running | ||
- create playlist-summarys or lyrics-sheets through pandoc | ||
- 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 | ||
- on item-update refresh render and client | ||
- change default-item-colors | ||
- use playlist-caption | ||
- render PDF with same size as casparcg | ||
- 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)) | ||
- change font-color of countdown | ||
- create library src-folder | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,10 @@ export const configuration: Partial<IReporterConfiguration> = { | |
}, | ||
{ | ||
name: "undici-types" | ||
}, | ||
{ | ||
name: "canvas", | ||
licenseText: "(The MIT License)\n\nCopyright (c) 2010 LearnBoost, and contributors <[email protected]>\n\nCopyright (c) 2014 Automattic, Inc and contributors <[email protected]>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const esbuild = require("esbuild"); | ||
|
||
esbuild.build({ | ||
entryPoints: ["./build-scripts/pandoc-installer.ts"], | ||
outfile: "./dist/build/pandoc/pandoc-installer.js", | ||
tsconfig: "./build-scripts/tsconfig.json", | ||
platform: "node", | ||
minify: true, | ||
bundle: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import tmp from "tmp"; | ||
import fs from "fs"; | ||
import path from "path"; | ||
import StreamZip from "node-stream-zip"; | ||
import child_process from "child_process"; | ||
import readline from "node:readline/promises"; | ||
import { stdin, stdout } from "process"; | ||
|
||
void (async () => { | ||
let license_message: string; | ||
|
||
if (process.platform === "win32") { | ||
license_message = "You are about to download eisvogel, pandoc and texlive, which licenses differ from the one of JohnCG. Their respetive licenses can be found at https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/LICENSE, https://raw.githubusercontent.com/jgm/pandoc/main/COPYRIGHT and https://www.tug.org/texlive/LICENSE.TL . By proceeding you acknowledge those."; | ||
} else { | ||
license_message = "You are about to download eisvogel which license differs from the one of JohnCG. It can be found at https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/LICENSE . By proceeding you acknowledge it."; | ||
} | ||
|
||
const rl = readline.createInterface({ input: stdin, output: stdout }); | ||
|
||
const response = rl.question(license_message + " Proceed? (y/[n]) "); | ||
|
||
if ((await response).toLowerCase() !== "y") { | ||
process.exit(0); | ||
} | ||
|
||
const urls: Record<string, Record<string, string>> = { | ||
win32: { | ||
pandoc: "https://github.com/jgm/pandoc/releases/download/3.1.13/pandoc-3.1.13-windows-x86_64.zip", | ||
texlive: "https://de.mirrors.cicku.me/ctan/systems/texlive/tlnet/install-tl.zip", | ||
eisvogel: "https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest/download/Eisvogel.zip" | ||
}, | ||
linux: { | ||
eisvogel: "https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest/download/Eisvogel.zip" | ||
} | ||
}; | ||
|
||
if (!Object.keys(urls).includes(process.platform)) { | ||
return; | ||
} | ||
|
||
const download_dir = tmp.dirSync(); | ||
|
||
// download the files | ||
await Promise.all(Object.values(urls[process.platform]).map(async (url) => { | ||
const response = await fetch(url); | ||
|
||
const data = await response.arrayBuffer(); | ||
|
||
const zip_file = path.join(download_dir.name, path.basename(url)); | ||
|
||
fs.writeFileSync(zip_file, Buffer.from(data)); | ||
|
||
const zip = new StreamZip.async({ file: zip_file }); | ||
const unpacked_files_dir = zip_file.match(/(.*)\.zip$/)[1]; | ||
fs.mkdirSync(unpacked_files_dir); | ||
|
||
await zip.extract(null, unpacked_files_dir); | ||
|
||
await zip.close(); | ||
})); | ||
|
||
fs.copyFileSync(path.join(download_dir.name, "Eisvogel", "eisvogel.latex"), "eisvogel.latex"); | ||
|
||
if (process.platform === "win32") { | ||
fs.copyFileSync(path.join(download_dir.name, path.basename(urls.win32.pandoc).match(/(.*)\.zip$/)[1], "pandoc-3.1.13", "pandoc.exe"), "pandoc.exe"); | ||
|
||
// get the path with its changed filename | ||
const dir = fs.readdirSync(path.join(download_dir.name, "install-tl")).filter((ele) => ele.match(/^install-tl-\d{8}$/))[0]; | ||
|
||
child_process.execSync(`${path.join(download_dir.name, "install-tl", dir, "install-tl-windows.bat")} -portable -no-gui --profile texlive.profile`, { stdio: "inherit" }); | ||
} | ||
|
||
fs.rmSync(download_dir.name, { recursive: true, force: true }); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
overflow: hidden; | ||
|
||
font-family: Ebrima; | ||
font-family: Bahnschrift; | ||
} | ||
|
||
body { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,6 @@ | |
|
||
font-size: 1em; | ||
|
||
color: white; | ||
|
||
text-wrap: nowrap; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"metadata": { | ||
"indent": true, | ||
"caption": "Example Psalm", | ||
"id": "Book ID", | ||
"book": "Book of Examples" | ||
}, | ||
"text": [ | ||
[ | ||
[ | ||
"First line of the first part", | ||
"Another line" | ||
], | ||
[ | ||
"First line of the seond part which is indented,", | ||
"which can be toggled in the metada-field of the file" | ||
], | ||
[ | ||
"and another one" | ||
] | ||
],[ | ||
[ | ||
"Second page", | ||
"indentation on the second page just continues" | ||
] | ||
] | ||
] | ||
} |
Oops, something went wrong.