added trick about configuring the timezone of PI3
[www.git] / www / news / news.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="https://wpitchoune.net/style.css">
5 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
6 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
7 <script src="https://wpitchoune.net/nav.js"></script>
8 <title>News</title>
9 </head>
10         <body>
11 <div id='header'>
12 <h1>News</h1>
13 </div><div id='content'>
14                         <article>
15                                 <header>
16                                         <h1><a href='https://wpitchoune.net/news/asciidoctor_to_rss.html'>Asciidoctor to RSS</a></h1>
17 <div class='date'>2016-11-07</div>
18                                 </header>
19 <div id="preamble">
20 <div class="sectionbody">
21 <div class="paragraph">
22 <p>In order to ease the edition of this website and
23 the management of the server, I want it to be purely
24 static and generated from <a href="http://asciidoctor.org">Asciidoctor</a> documents.</p>
25 </div>
26 <div class="paragraph">
27 <p>The <em>news</em> part of the website is also written as Asciidoctor
28 documents, <code>asciidoctor_to_rss</code> is converting them into static
29 HTML pages and generates a RSS 2.0 file.</p>
30 </div>
31 </div>
32 </div>
33 <div class="sect1">
34 <h2 id="_installation_of_asciidoctor_to_rss">Installation of asciidoctor_to_rss</h2>
35 <div class="sectionbody">
36 <div class="paragraph">
37 <p>It is required to install:</p>
38 </div>
39 <div class="ulist">
40 <ul>
41 <li>
42 <p><a href="http://maven.apache.org/download.cgi">Apache Maven</a> (3.3.9)</p>
43 </li>
44 <li>
45 <p><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Java</a> (Sun JDK &gt;=1.8)</p>
46 </li>
47 </ul>
48 </div>
49 <div class="paragraph">
50 <p>The sources can be retrieved from GIT:</p>
51 </div>
52 <div class="listingblock">
53 <div class="content">
54 <pre>git clone git clone https://git.wpitchoune.net/asciidoctor_to_rss.git</pre>
55 </div>
56 </div>
57 <div class="paragraph">
58 <p>Compilation:</p>
59 </div>
60 <div class="listingblock">
61 <div class="content">
62 <pre>cd asciidoctor_to_rss
63 mvn clean install</pre>
64 </div>
65 </div>
66 </div>
67 </div>
68 <div class="sect1">
69 <h2 id="_howto_write_news">Howto write news</h2>
70 <div class="sectionbody">
71 <div class="paragraph">
72 <p>Each <em>news</em> must be written in an <a href="http://asciidoctor.org">Asciidoctor</a> document
73 and all documents must be dropped into a directory.</p>
74 </div>
75 <div class="paragraph">
76 <p>There is not any restriction concerning the syntax because
77 the utility is based on the Java bridge of Asciidoctor.
78 I have added an attribute <code>date</code> which allows the utility
79 to know the publication date of the news.</p>
80 </div>
81 <div class="paragraph">
82 <p>Here is an example of <em>news</em>:</p>
83 </div>
84 <div class="listingblock">
85 <div class="content">
86 <pre class="highlight"><code class="language-asciidoc" data-lang="asciidoc">= Asciidoctor to RSS
87 Jean-Philippe Orsini &lt;jeanfi@gmail.com&gt;
88 :date: 2016-11-07
89 :icons: font
90
91 In order to ease the edition of this website and
92 the management of the server, I want it to be purely
93 static and generated from http://asciidoctor.org[Asciidoctor] documents.
94
95 The _news_ part of the website is also written as Asciidoctor
96 documents, `asciidoctor_to_rss` is converting them into static
97 HTML pages and generates a RSS 2.0 file.
98
99 == Installation of asciidoctor_to_rss
100
101 It is required to install:
102
103 * http://maven.apache.org/download.cgi[Apache Maven] (3.3.9)
104
105 * http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java] (Sun JDK &gt;=1.8)</code></pre>
106 </div>
107 </div>
108 <div class="paragraph">
109 <p>You can see few examples at
110 <a href="https://wpitchoune.net/gitweb/?p=www.git;a=tree;f=src/news;hb=HEAD" class="bare">https://wpitchoune.net/gitweb/?p=www.git;a=tree;f=src/news;hb=HEAD</a>.
111 The source document of this <em>news</em> is at
112 <a href="https://wpitchoune.net/gitweb/?p=www.git;a=blob;f=src/news/asciidoctor_to_rss.adoc;hb=HEAD" class="bare">https://wpitchoune.net/gitweb/?p=www.git;a=blob;f=src/news/asciidoctor_to_rss.adoc;hb=HEAD</a>.</p>
113 </div>
114 </div>
115 </div>
116 <div class="sect1">
117 <h2 id="_configuration">Configuration</h2>
118 <div class="sectionbody">
119 <div class="paragraph">
120 <p>The configuration file of <code>asciidoctor_to_rss</code> is text file containing key/value pairs.</p>
121 </div>
122 <div class="paragraph">
123 <p>See an example at
124 <a href="https://wpitchoune.net/gitweb/?p=www.git;a=blob;f=src/asciidoctorrss.props;hb=HEAD" class="bare">https://wpitchoune.net/gitweb/?p=www.git;a=blob;f=src/asciidoctorrss.props;hb=HEAD</a> .</p>
125 </div>
126 <div class="listingblock">
127 <div class="content">
128 <pre class="highlight"><code class="language-text" data-lang="text">feed.title=News
129 feed.description=News of the wpitchoune.net website.
130 feed.link=https://wpitchoune.net/news/feed.xml
131 feed.baseurl=https://wpitchoune.net/news
132
133 html.header.file=src/header.html</code></pre>
134 </div>
135 </div>
136 <div class="paragraph">
137 <p><code>feed.title</code>: the title used for the feed, in the RSS 2.0 and <code>news.html</code> files.</p>
138 </div>
139 <div class="paragraph">
140 <p><code>feed.description</code>: the description used in the RSS 2.0 file.</p>
141 </div>
142 <div class="paragraph">
143 <p><code>feed.link</code>: URI of the RSS 2.0 file.</p>
144 </div>
145 <div class="paragraph">
146 <p><code>feed.baseurl</code>: base URI where the HTML news files will be located.</p>
147 </div>
148 <div class="paragraph">
149 <p><code>html.header.file</code>: the content of the denoted file will be added in the <code>head</code> block of
150 the generated HTML documents.</p>
151 </div>
152 </div>
153 </div>
154 <div class="sect1">
155 <h2 id="_run_the_utility">Run the utility</h2>
156 <div class="sectionbody">
157 <div class="paragraph">
158 <p>The command line usage is:</p>
159 </div>
160 <div class="listingblock">
161 <div class="content">
162 <pre>asciidoctor_to_rss.sh &lt;IN_DIR&gt; &lt;OUT_DIR&gt; &lt;CFG_FILE&gt;</pre>
163 </div>
164 </div>
165 <div class="paragraph">
166 <p><code>IN_DIR</code>: the directory containing the news as Asciidoctor documents.</p>
167 </div>
168 <div class="paragraph">
169 <p><code>OUT_DIR</code>: the output directory which contains all generated files.</p>
170 </div>
171 <div class="paragraph">
172 <p><code>CFG_FILE</code>: the path to the configuration file.</p>
173 </div>
174 <div class="paragraph">
175 <p>The <code>OUT_DIR</code> will contain:</p>
176 </div>
177 <div class="ulist">
178 <ul>
179 <li>
180 <p>one HTML file for each Asciidoctor document,</p>
181 </li>
182 <li>
183 <p>the <a href="https://wpitchoune.net/news/news.html"><code>news.html</code></a> file,</p>
184 </li>
185 <li>
186 <p>and the <a href="https://wpitchoune.net/news/news.html"><code>feed.xml</code></a> file which is a feed
187 compatible with RSS v2.0.</p>
188 </li>
189 </ul>
190 </div>
191 </div>
192 </div>                  </article>
193                         <article>
194                                 <header>
195                                         <h1><a href='https://wpitchoune.net/news/added_rss_feed.html'>RSS Feed</a></h1>
196 <div class='date'>2016-04-07</div>
197                                 </header>
198 <div class="paragraph">
199 <p>It is now possible to follow news and announces of the
200 website with the following RSS feed:
201 <a href="https://wpitchoune.net/news/feed.xml" class="bare">https://wpitchoune.net/news/feed.xml</a></p>
202 </div>
203 <div class="paragraph">
204 <p>Under the bridge it is automaticaly generated
205 with a very simple program from Asciidoctor
206 documents. You can get the sources
207 from the GIT repository: <a href="https://git.wpitchoune.net/asciidoctor_to_rss.git" class="bare">https://git.wpitchoune.net/asciidoctor_to_rss.git</a> .</p>
208 </div>                  </article>
209                         <article>
210                                 <header>
211                                         <h1><a href='https://wpitchoune.net/news/call_contribution.html'>Call for contributions for the translation of psensor</a></h1>
212 <div class='date'>2016-14-06</div>
213                                 </header>
214 <div class="paragraph">
215 <p>The version 1.2.0 of psensor is going to be released in the coming
216 weeks. This release will include many changes which impact the
217 translations. If you want to contribute to the translation of psensor
218 it is now the good timeframe. See the
219 <a href="https://wpitchoune.net/psensor/contribute.html">instructions</a>.</p>
220 </div>                  </article>
221                         <article>
222                                 <header>
223                                         <h1><a href='https://wpitchoune.net/news/new_website.html'>New website</a></h1>
224 <div class='date'>2016-14-06</div>
225                                 </header>
226 <div class="paragraph">
227 <p>After being bored with Wordpress for years, the <a href="http://wpitchoune.net">wpitchoune.net</a>
228 website is changing. It is now based on <a href="http://asciidoctor.org">Asciidoctor</a> and
229 a simple shell script to generate it.</p>
230 </div>
231 <div class="paragraph">
232 <p>With the help of <a href="http://atom.io">Atom</a> and a couple of addons dedicated to
233 Asciidoctor, it is easy and quick to write content. I am happy to no
234 more have to worry about the painful admistration of Wordpress,
235 upgrading it, taking care of security, spamming of comments and bot
236 account creation, and backup of databases.</p>
237 </div>
238 <div class="paragraph">
239 <p>If you want to know how the website is built, everything is on
240 a GIT repository: <a href="http://git.wpitchoune.net/gitweb/?p=www.git" class="bare">http://git.wpitchoune.net/gitweb/?p=www.git</a>.
241 It is simple, really simple&#8230;&#8203; but enough for my needs.</p>
242 </div>                  </article>
243 </div>
244 <footer>
245         <ul>
246                 <li><i class="fa fa-rss" aria-hidden="true"></i>
247                         Feed: <a href="https://wpitchoune.net/news/feed.xml">RSS 2.0</a>
248                 </li>
249
250                 <li><i class="fa fa-envelope" aria-hidden="true"></i>
251                     Email: <a href="mailto:jeanfi@gmail.com">jeanfi@gmail.com</a>
252                 </li>
253
254                 <li><i class="fa fa-git-square" aria-hidden="true"></i>
255                     Source repository: <a href="https://git.wpitchoune.net/gitweb">gitweb</a>
256                 </li>
257         </ul>
258 </footer>
259         </body>
260 </html>