summaryrefslogtreecommitdiff
path: root/README
blob: cfa64b4d8bb26eed2ac9a9734c9d2a13a6786d77 (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
slidonoscopy is a software to create individual HTML based slideshows based on
local data (text, images, videos...) and (optionally) remote Ical calendars.

Dependencies:
=============

slidonoscopy is written in node.js and requires some additional
modules:

	* express 
	* walk 
	* watch-tree
	* ical
	* consolidate
	* a templating engine compatible with consolidate (default: swig)

Currently a few patches to node-ical and watch-tree are required. node-ical has
to be updated to parse recurring rules. watch-tree needs a patch to support
node 0.6. Additionally we use the experimental express 3.x. Simply installing
all dependencies with npm should do the trick.

Usage:
======

Edit config.js to reflect the location of your slideshows und metadata/event
files. Slideshows are to be created under $dir with one directory per
slideshow.

$dir---slideshow1 -- events.js
   |            |___ slide1.jpg
   |		|___ slide2.jpg
   |		|___ video.mkv
   |		|___ desc.js
   |		|___ template.html
   |
   |___slideshow2 -- events.js
   |		|___ slide.jpg
   |		|___ template.html
   |
   |___slideshow3 -- events.js
   		|___ template.html

Templates are written in the templating language of your choice. The defaults
use swig. Read them to gather which variables are substituted for content. 
Just execute
	$ node main.js
to run slidenoscopy. The server will listen on port 8080 and will serve all
slideshows under slides/$name. Retrieving anything else will display a list of
all available slideshows.

Configuration:
==============

The configuration file consists of the following keys:

exports.modelBackend = 'fs';
exports.Config = {
        rootDir: 'slideshows' ,
        templateEngine: 'swig',
        listTemplate: 'index.html',
        templateFile: 'template.html',
        descriptionFile: 'desc.js',
        eventFile: 'events.js',
        ignoreDotFiles: 'false',
        port: 8080
};

'rootDir' sets the root directory from which all slideshows are created.
'templateEngine' selects the templating engine to use. It has to be compatible
with consolidate.js and all slideshows have to use the same templating language.
'listTemplate' is the template (relative to rootDir) used to create the listing
of all slideshows
'templateFile' is the actual template file used for a single slideshow
'descriptionFile' is the JSON file containing the slide descriptions
'eventFile' contains the URL to the Ical calendar or a list of events and dates
'ignoreDotFiles' selects if 'hidden' (dot files) should be considererd when
creating slideshows
'port' sets the TCP port used for serving the slideshows

Events:
=======

Events are substituted into the template either from a file or a remote ical
calendar. Using an ical calendar is recommended as it allows defining recurring
events.
For using a remote calendar the events.js file should contain the following fields:

{ "type": "ical",
	"url": "https://sublab.org:5232/calendars/events",
	"before": 0,
	"after":  11160
}

The time offsets (seconds) are used to fetch past and future events from the
calendar.

Slides:
=======

Slides are created from each file in a subdirectory in the root directory
defined in config.js (as described above). Slides consist of a media file
(movies or images) and optionally a corresponding description. All media files
should have the same size (at least with the default themes) to ensure a smooth
transition between slides.
Descriptions are defined in desc.js as follows:

[
	{
		"file": "IMGP4596.jpg",
		"head": "Kicker",
		"text": "unser toller Profikicker"
	},
	{
		"file": "IMG.jpg",
		"head": "foobar",
		"text": "barfoo"
	}
]