diff options
| -rw-r--r-- | emacsconf-publish.el | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 70906b9..1c8bace 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -878,35 +878,32 @@ This includes the intro note, the schedule, and talk resources." "*" "\\\\*" (replace-regexp-in-string "\"" """ (elt sub 3))))) (start (concat (format-seconds "%02h:%02m:%02s" (/ (floor msecs) 1000)) - "." (format "%03d" (mod (floor msecs) 1000))))) - (if (eq format 'html) - (if (and (elt sub 4) (not (string= (elt sub 4) ""))) - (format "</p><p><a href=\"#%s\" class=\"subtitle\" data-start=\"%s\" data-video=\"%s\">[%s]</a> <span class=\"subtitle\" data-start=\"%s\" title=\"%s\" data-video=\"%s\">%s</span>" - video-id - start - video-id - start - start - start - video-id - text) - (format "<span class=\"subtitle\" data-start=\"%s\" title=\"%s\" data-video=\"%s\">%s</span>" - start - start - video-id - text)) - (if (and (elt sub 4) (not (string= (elt sub 4) ""))) - (format "\n<div class=\"transcript-heading\">[[!template new=\"1\" text=\"\"\"%s\"\"\" start=\"%s\" video=\"%s\" id=\"subtitle\"%s]]</div>" - (replace-regexp-in-string "\\." "\\\\." (string-trim (replace-regexp-in-string "^NOTE[ \n]" "" (elt sub 4)))) - start - video-id - (emacsconf-surround " lang=\"" lang "\"" "")) - (format - "[[!template text=\"\"\"%s\"\"\" start=\"%s\" video=\"%s\" id=\"subtitle\"%s]]" - text - start - video-id - (emacsconf-surround " lang=\"" lang "\"" "")))))) + "." (format "%03d" (mod (floor msecs) 1000)))) + last-speaker) + (prog1 + (if (eq format 'html) + (emacsconf-publish-format-transcript-cue-as-html sub last-speaker video-id) + (if (and (elt sub 4) + (not + (string= (subed-record-remove-directives (elt sub 4)) ""))) + (format "\n<div class=\"transcript-heading\">[[!template new=\"1\" text=\"\"\"%s\"\"\" start=\"%s\" video=\"%s\" id=\"subtitle\"%s]]</div>[[!template new=\"1\" text=\"\"\"%s\"\"\" start=\"%s\" video=\"%s\" id=\"subtitle\"%s]]" + (replace-regexp-in-string + "\"" """ + (replace-regexp-in-string "\\." "\\\\." (string-trim (replace-regexp-in-string "^NOTE[ \n]" "" (subed-record-remove-directives (elt sub 4)))))) + start + video-id + (emacsconf-surround " lang=\"" lang "\"" "") + (replace-regexp-in-string "\"" """ (elt sub 3)) + start + video-id + (emacsconf-surround " lang=\"" lang "\"" "")) + (format + "[[!template text=\"\"\"%s\"\"\" start=\"%s\" video=\"%s\" id=\"subtitle\"%s]]" + (replace-regexp-in-string "\"" """ text) + start + video-id + (emacsconf-surround " lang=\"" lang "\"" "")))) + (setq last-speaker (subed-speaker sub))))) subtitles "\n"))) (defun emacsconf-publish-format-transcript (talk &optional video-id lang title format) |
