Commit d32517e8 authored by Mario Botsch's avatar Mario Botsch
Browse files

Merge branch 'master' into mario

parents 7a90c01c ea98cae7
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
......@@ -10,6 +11,7 @@ import Data.IORef ()
import Data.List
import Data.String ()
import qualified Data.Text as Text
import Data.Time (diffUTCTime)
import Data.Version
import Development.Shake
import GHC.IO.Encoding
......@@ -268,8 +270,19 @@ run = do
--
"**/*-recording.mp4" %> \out -> do
let src = replaceSuffix "-recording.mp4" "-recording.webm" out
need [src]
command [] "ffmpeg" ["-nostdin", "-v", "fatal", "-y", "-i", src, "-vcodec", "copy", "-acodec", "aac", out]
let runFfmpeg =
command [] "ffmpeg" ["-nostdin", "-v", "fatal", "-y", "-i", src, "-vcodec", "copy", "-acodec", "aac", out]
webmExists <- liftIO $ Dir.doesFileExist src
when (webmExists) $ do
need [src]
mp4Exists <- liftIO $ Dir.doesFileExist out
if not mp4Exists
then runFfmpeg
else do
let modTime = liftIO . Dir.getModificationTime
mp4Mod <- modTime out
webmMod <- modTime src
when (diffUTCTime webmMod mp4Mod > 0.0) runFfmpeg
--
"**/*.tex.svg" %> \out -> do
let src = dropExtension out
......
This diff is collapsed.
......@@ -15,11 +15,12 @@
@import "fonts";
@import "boxes";
@import "code";
@import "quizzes";
@import "new-media";
@import "columns";
}
@import "quizzes";
// Global styles
body {
background: #fff;
......
......@@ -189,7 +189,9 @@ annotationSuffix = "-annot.json"
timesSuffix = "-times.json"
recordingSuffix = "-recording.webm"
recordingSuffix1 = "-recording.webm"
recordingSuffix2 = "-recording.mp4"
recordingTargetSuffix = "-recording.mp4"
......@@ -199,6 +201,7 @@ sourceRegexes :: [String] =
"-deck-index.yaml\\'",
"-quest.yaml\\'",
"-recording.webm\\'",
"-recording.mp4\\'",
"-times.json\\'",
"-annot.json\\'",
"\\`(^_).*\\.scss\\'"
......@@ -250,7 +253,10 @@ scanTargets meta = do
_questions = sort $ calcTargets questSuffix questHTMLSuffix srcs,
_annotations = sort $ calcTargets annotationSuffix annotationSuffix srcs,
_times = sort $ calcTargets timesSuffix timesSuffix srcs,
_recordings = sort $ calcTargets recordingSuffix recordingTargetSuffix srcs,
_recordings =
List.nub $ sort $
calcTargets recordingSuffix1 recordingTargetSuffix srcs
<> calcTargets recordingSuffix2 recordingTargetSuffix srcs,
_css = sort $ calcTargets ".scss" ".css" srcs
}
where
......
......@@ -252,11 +252,11 @@ deckerShakeOptions ctx = do
shakeThreads = cores,
-- , shakeStaunch = True
shakeColor = True,
shakeChange = ChangeModtime,
shakeChange = ChangeModtime
-- , shakeChange = ChangeModtimeAndDigest
shakeLint = Just LintBasic,
-- shakeLint = Just LintBasic,
-- , shakeLint = Just LintFSATrace
shakeReport = [".decker/shake-report.html"]
-- shakeReport = [".decker/shake-report.html"]
}
actionContextKey :: TypeRep
......
......@@ -21,10 +21,10 @@ extra-deps:
- pandoc-types-1.22
- regex-posix-clib-2.7
- rfc5051-0.2
- shake-0.19.1
- skylighting-0.10.2
- skylighting-core-0.10.2
- texmath-0.12.1
resolver: lts-17.0
- shake-0.19.1
resolver: lts-17.2
ghc-options:
"$locals": -fhide-source-paths -Wno-missing-home-modules
......@@ -63,4 +63,4 @@ Foreach ($i in ( "css\all.css", "webfonts")) {
# Copy video.js
New-Item -Path "$support\videojs" -Force -ItemType "directory"
Copy-Item "$third\video.js\*" "$support\video.js" -Force
\ No newline at end of file
Copy-Item -Recurse "$third\video.js\*" "$support\videojs" -Force
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment