Videocapture
Table of Contents
- To the Repository
- 0. Main Page
- 1. About the project
- 2. Manuals
- 3. Namespaces
- 4. Configuration
- 5. Tests
- 6. Project definition
- 7. Roadmap
- 7.1. INPROGRESS Code cleanup fix
- 7.2. TODO Active Directory Integration feature
- 7.3. TODO Therapeuten- und Patientennummern speichern feature
- 7.4. TODO Video Daemon auf dem Client feature
- 7.5. TODO Serverdienst feature
- 7.6. TODO Lizenz fix
- 7.7. TODO Networking feature
- 7.8. DONE Support für 2 Kameras feature
- 7.9. TODO Tool für Supervisor-Nachrichten feature
1 About the project
1.1 TODO Overview
1.2 TODO Status
ALPHA quality documentation, in active development.
3 Namespaces
4 Configuration
The main configuration is stored in the file config.org.
5 Tests
6 Project definition
6.1 Dependencies
6.1.1 Runtime
6.1.1.1 Clojure
[org.clojure/clojure "1.10.0"]
6.1.1.2 ClojureFX
[clojurefx "0.5.1" :exclusions [org.clojure/tools.reader]]
6.1.1.3 GStreamer Java
[org.freedesktop.gstreamer/gst1-java-core "0.9.3"]
6.1.1.4 Java Native Access
[net.java.dev.jna/jna "5.2.0"]
6.1.1.5 JZlib
Used by SSHJ.
[com.jcraft/jzlib "1.1.3"]
6.1.1.6 JCIFS NG
[eu.agno3.jcifs/jcifs-ng "2.1.2"]
6.1.1.7 SSHJ
[com.hierynomus/sshj "0.27.0"]
6.1.1.8 Encryption
;;[org.bouncycastle/bcprov-jdk15on "1.61"] ;;[org.bouncycastle/bcpg-jdk15on "1.61"]
6.1.1.9 Postal E-Mail library
[com.draines/postal "2.0.3"]
6.1.1.10 Clojure.Java-Time
[clojure.java-time "0.3.2"]
6.1.1.11 Mount
[mount "0.1.15"]
6.1.1.12 Mount-Up
[tolitius/mount-up "0.1.2"]
6.1.1.13 Timbre Logging Library
[com.taoensso/timbre "4.10.0" :exclusions [org.clojure/tools.reader]]
6.1.1.14 SLF4J Timbre
[org.slf4j/slf4j-api "1.7.25"] [com.fzakaria/slf4j-timbre "0.3.12"]
6.1.1.15 core.async
[org.clojure/core.async "0.4.490" :exclusions [org.ow2.asm/asm-all]]
6.1.1.16 JavaFX
[org.openjfx/javafx-base "11.0.2" :scope "provided"] [org.openjfx/javafx-controls "11.0.2" :scope "provided"] [org.openjfx/javafx-fxml "11.0.2" :scope "provided"] [org.openjfx/javafx-media "11.0.2" :scope "provided"]
6.1.1.17 FontAwesomeFX
[de.jensd/fontawesomefx-commons "9.1.2"]
6.1.1.18 ControlsFX
[org.controlsfx/controlsfx "9.0.0"]
6.2 Tasks
6.2.1 tangle
The tangle
task extracts the code from the unified project files in a way that it is
readable by the language compiler. You'll need a running Emacs server for this.
(deftask tangle [] (with-pass-thru _ (let [files (filter #(str/ends-with? % ".org") (map #(str "src/" %) (.list (io/file "src")))) files (reduce conj ["README.org" "config.org"] files) command (reduce conj ["emacs" "--script" "literate.el" "tangle"] files)] (println (apply sh/sh command)))))
6.2.2 weave
The weave
task extracts the documentation from the unified project files and compiles
them into easily-readable html documents. You'll need a running Emacs server for this.
(deftask weave [] (with-pass-thru _ (let [files (filter #(str/ends-with? % ".org") (map #(str "src/" %) (.list (io/file "src")))) files (reduce conj files (filter #(str/ends-with? % ".org") (map #(str "doc/" %) (.list (io/file "doc"))))) files (reduce conj ["README.org" "config.org"] files) command (reduce conj ["emacs" "--script" "literate.el" "weave"] files)] (println command) (println (apply sh/sh command)))))
6.2.3 run
As the name says, the run
task runs the program in production mode.
(deftask run [] (comp (repl) (tangle) (javac) (with-pass-thru _ (require 'videocapture.core) ((resolve 'videocapture.core/-main)))))
6.2.4 test
The test
task runs the automated test suite.
(deftask test "Run the videocapture automated tests." [] (comp (watch) (notify) (tangle) (javac) (boot-test/test)))
6.2.5 uberjar
The uberjar
task creates a self-contained, executable videocapture.jar
file ready
for distribution.
(deftask uberjar [] (comp (tangle) (javac) (aot :namespace #{'videocapture.core}) (uber) (jar) (target)))
6.2.6 appimage
#!/usr/bin/env bash rm -rf AppDir videocapture.AppImage input mkdir -p AppDir/usr/share/applications mkdir -p AppDir/usr/bin mkdir -p input/pack cd input curl -L https://gluonhq.com/download/javafx-11-0-2-jmods-linux/ -o javafx-jmod.zip unzip javafx-jmod.zip cp ../target/videocapture.jar pack cd .. jpackager create-image --module-path input/javafx-jmods-* --add-modules java.base,java.sql,javafx.controls,javafx.fxml,javafx.media --output AppDir/usr/share/applications --input input/pack --main-jar videocapture.jar --name videocapture curl -L https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage -o AppDir/usr/bin/AppImageUpdate curl -L https://github.com/AppImage/AppImageUpdate/releases/download/continuous/appimageupdatetool-x86_64.AppImage -o AppDir/usr/bin/appimageupdatetool chmod +x AppDir/usr/bin/AppImageUpdate chmod +x AppDir/usr/bin/appimageupdatetool cp AppimageLauncher AppDir/usr/bin chmod +x AppDir/usr/bin/AppimageLauncher cd AppDir/usr/bin ln -s ../share/applications/videocapture/videocapture videocapture cd ../../.. #ln -s videocapture.svg .DirIcon export ARCH=x86_64 export UPDATE_INFORMATION="zsync|http://otrs.psy.unibe.ch/videocapture/Videocapture-x86_64.AppImage.zsync" export SIGN=1 linuxdeploy --appdir AppDir --desktop-file=videocapture.desktop --icon-file=videocapture.svg --executable=/usr/bin/ffmpeg --output=appimage rm -rf AppDir input
(deftask appimage [] (sh/sh "bash" "appimage.bash"))
6.2.7 getdown
This program uses Getdown to keep itself up to date on client machines.
The getdown
task generates a new release suitable to upload onto the
update server.
(deftask getdown [] (Files/deleteIfExists (fpath "release")) (Files/createDirectory (fpath "release") nil) (boot (uberjar)) (sh/sh "jar" "-cf" "uresource.jar" "config.edn" "microwave.wav") (Files/move (fpath "uresource.jar") (fpath "release/uresource.jar") nil) (Files/copy (fpath "getdown/getdown.txt") (fpath "release/getdown.txt") nil) (Files/copy (fpath "target/videocapture.jar") (fpath "release/videocapture.jar") nil) (com.threerings.getdown.tools.Digester/main (into-array ["release"])))
6.2.8 getdown-stub
For initial distribution, a stub directory has to be created. Upon first launch, this will ensure the download of the application.
(deftask getdown-stub [] (Files/deleteIfExists (fpath "deploy")) (Files/createDirectory (fpath "deploy") nil) (sh/sh "wget" "http://repo2.maven.org/maven2/com/threerings/getdown/getdown/1.8.2/getdown-1.8.2.jar") (Files/move (fpath "getdown-1.8.2.jar") (fpath "getdown.jar") nil) (Files/copy (fpath "getdown/getdown.txt") (fpath "deploy/getdown.txt") nil) (Files/copy (fpath "getdown/install.bash") (fpath "deploy/install.bash") nil) (Files/copy (fpath "videocapture.desktop") (fpath "deploy/videocapture.desktop") nil) (Files/copy (fpath "settings.edn") (fpath "deploy/settings.edn") nil))
6.3 Building this project
This project is written in a literate programming format and requires
Emacs & Org-mode to generate usable source code. Assuming both tools
are installed, the easiest way to generate a working project is via
command line (make sure emacs
is on your path or else edit its path
in tangle.sh
):
mkdir videocapture cd videocapture fossil clone https://lyrion.ch/opensource/repositories/videocapture videocapture.fossil fossil open videocapture.fossil ./tangle-all.sh
Tangling is the process of extracting & combining source blocks from
.org
files into an actual working project/source tree. Once tangling
is complete, you can use boot
as usual.
6.3.1 Testing
The build.boot
comes with a predefined test task; simply run boot test
to run the test suite.
6.3.2 Working with the REPL
Editing code blocks or files in Org-mode, then re-loading & testing
changes is quite trivial. Simply launch a REPL (via lein
or Emacs)
as usual. Everytime you've made changes to an .org
file, re-tangle
it from Emacs (C-c C-v t
) or tangle.sh
, then reload the namespace
in the REPL via (require 'videocapture... :reload)
or similar.
6.4 Accessing library version during runtime
The autogenerated namespace videocapture.version
contains a single
symbol version
holding the version string defined above:
(use '[videocapture.version]) (prn version) ; "1.0.11"
6.5 Release history
Version | Released | Description | Lein coordinates | Tagged Github URL |
---|---|---|---|---|
0.1.0 | pending | 1st public release | [{{fqname}} "0.1.0"] |
6.6 Contributors
Name | Role | Website |
---|---|---|
Daniel Ziltener | initiator & principal developer |
6.7 License
Copyright © 2018 Daniel Ziltener
This project is open source and licensed under the license-name.
7 Roadmap
7.1 INPROGRESS Code cleanup fix
Code fertig ins neue Format übertragen.
7.1.1 DONE New GUI State format
7.1.2 TODO videocapture.core
cleanup and refactoring
7.2 TODO Active Directory Integration feature
7.2.1 DONE Login und Benutzerordner-Verschlüsselung
7.2.2 TODO Neudokumentation der automatischen Nutzerordner-Verschlüsselung
7.2.3 TODO Assoziation Benutzername zu THerapeutennummer
7.3 TODO Therapeuten- und Patientennummern speichern feature
Time estimate: 1 workday Globale Datei, die diese Daten basierend auf dem AD-Benutzernamen speichert.
7.4 TODO Video Daemon auf dem Client feature
7.4.1 TODO Video verschlüsseln und im Briefkastenordner ablegen
7.5 TODO Serverdienst feature
7.5.1 TODO Abholen und entschlüsseln der Videos von den Clients
7.5.2 TODO Ablegen der Videos in Ordnerstruktur
7.5.3 TODO Verwaltung der Liste mit den Therapeuten- und Patientennummern
- Aktuellhalten der Liste auf den Clients
7.6 TODO Lizenz fix
7.7 TODO Networking feature
7.8 DONE Support für 2 Kameras feature
- State "WAITING" from "TODO"
7.9 TODO Tool für Supervisor-Nachrichten feature
- Was für ein Gerät?