unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob ababb44dec92e439dd7daa7c9866419e43fc2484 1875 bytes (raw)
name: website/apps/videos/types.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
;;; GNU Guix web site
;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Initially written by sirgazil who waves all
;;; copyright interest on this file.

(define-module (apps videos types)
  #:use-module (srfi srfi-9)
  #:export (video
            video?
            video-description
            video-last-updated
            video-poster
            video-title
            video-url))


;;;
;;; Data types.
;;;

;;; Video (record type)
;;; ---------------------
;;;
;;; A video object represents something viewable in an HTML video
;;; element and accessible from the videos list on the website.
;;;
;;; Objects of this type can be created with the "video" procedure as
;;; well (see Helper procedures below).
;;;
;;; Fields:
;;;
;;; title (string)
;;;   The full name of the video. For example:
;;;   "Everyday use of GNU Guix, Part One".
;;;
;;; description (SXML)
;;;   A short description. For example:
;;;   '(p "Shows you how to install packages and how to manage
;;;   software package generations.").
;;;
;;; url (string)
;;;   A URL to the video file.
;;;
;;; poster (string)
;;;   A URL to a representative preview image for the video.
;;;
;;; last-updated (date)
;;;   Optional SRFI-19 upload date of the video file's most recent
;;;   version, or #f.  This should be specified for videos that
;;;   possibly become outdated over time such as documentation videos.
;;;
(define-record-type <video>
  (make-video title description url poster last-updated)
  video?
  (title video-title)
  (description video-description)
  (url video-url)
  (poster video-poster)
  (last-updated video-last-updated))

;;; Helper procedures.

(define* (video #:key (title "") (description "")
                (url "") (poster "") (last-updated #f))
  "Return a <video> object with the given attributes."
  (make-video title description url poster last-updated))

debug log:

solving ababb44 ...
found ababb44 in https://yhetil.org/guix-devel/20191022120504.7cyoc5x2exylpzrg@pelzflorian.localdomain/

applying [1/1] https://yhetil.org/guix-devel/20191022120504.7cyoc5x2exylpzrg@pelzflorian.localdomain/
diff --git a/website/apps/videos/types.scm b/website/apps/videos/types.scm
new file mode 100644
index 0000000..ababb44

Checking patch website/apps/videos/types.scm...
Applied patch website/apps/videos/types.scm cleanly.

index at:
100644 ababb44dec92e439dd7daa7c9866419e43fc2484	website/apps/videos/types.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).