regenerated
[www.git] / www / news / asciidoctor_to_rss.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>Asciidoctor to RSS</title>
9 </head>
10 <body>
11 <div id='header'>
12 <h1>Asciidoctor to RSS</h1>
13 </div><div id='content'>
14 <div class='date'>2016-11-07</div><div id="preamble">
15 <div class="sectionbody">
16 <div class="paragraph">
17 <p>In order to have a website based only on Asciidoctor
18 documents, I have written a small utility which
19 converts a set of Asciidoctor documents to HTML pages and
20 generates a RSS 2.0 feed.</p>
21 </div>
22 </div>
23 </div>
24 <div class="sect1">
25 <h2 id="_installation_of_asciidoctor_to_rss">Installation of asciidoctor_to_rss</h2>
26 <div class="sectionbody">
27 <div class="paragraph">
28 <p>It is required to install:</p>
29 </div>
30 <div class="ulist">
31 <ul>
32 <li>
33 <p>maven</p>
34 </li>
35 <li>
36 <p>java (&gt;1.7)</p>
37 </li>
38 </ul>
39 </div>
40 <div class="paragraph">
41 <p>The sources can be retrieved from GIT:</p>
42 </div>
43 <div class="listingblock">
44 <div class="content">
45 <pre>git clone git clone https://git.wpitchoune.net/asciidoctor_to_rss.git</pre>
46 </div>
47 </div>
48 <div class="paragraph">
49 <p>Compilation:</p>
50 </div>
51 <div class="listingblock">
52 <div class="content">
53 <pre>cd asciidoctor_to_rss
54 mvn clean install</pre>
55 </div>
56 </div>
57 </div>
58 </div>
59 <div class="sect1">
60 <h2 id="_howto_write_news">Howto write news</h2>
61 <div class="sectionbody">
62 <div class="paragraph">
63 <p>Each news has to be written in a separate Asciidoctor document
64 and all documents must be dropped into a directory.</p>
65 </div>
66 <div class="paragraph">
67 <p>There is not any restriction concerning the syntax because
68 the utility is based on the java bridge of Asciidoctor.
69 I have added an attribute 'date' which allows the utility
70 to know the publication date of the news.</p>
71 </div>
72 <div class="paragraph">
73 <p>You can see some examples at <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> .
74 The source document of this news is at <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>
75 </div>
76 </div>
77 </div>
78 <div class="sect1">
79 <h2 id="_configuration">Configuration</h2>
80 <div class="sectionbody">
81 <div class="paragraph">
82 <p>The configuration of the utility can be done in text file.</p>
83 </div>
84 <div class="paragraph">
85 <p>See an example at <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>
86 </div>
87 </div>
88 </div>
89 <div class="sect1">
90 <h2 id="_run_the_utility">Run the utility</h2>
91 <div class="sectionbody">
92 <div class="paragraph">
93 <p>The command line usage is:</p>
94 </div>
95 <div class="listingblock">
96 <div class="content">
97 <pre>asciidoctor_to_rss.sh &lt;IN_DIR&gt; &lt;OUT_DIR&gt; &lt;CFG_FILE&gt;</pre>
98 </div>
99 </div>
100 <div class="paragraph">
101 <p><code>IN_DIR</code>: the directory containing the news as Asciidoctor documents.</p>
102 </div>
103 <div class="paragraph">
104 <p><code>OUT_DIR</code>: the output directory which contains all generated files</p>
105 </div>
106 <div class="paragraph">
107 <p><code>CFG_FILE</code>: the path to the configuration file</p>
108 </div>
109 <div class="paragraph">
110 <p>The <code>OUT_DIR</code> will contain:</p>
111 </div>
112 <div class="ulist">
113 <ul>
114 <li>
115 <p>one HTML file for each Asciidoctor document</p>
116 </li>
117 <li>
118 <p>the <code>news.html</code> file</p>
119 </li>
120 <li>
121 <p>the <code>feed.xml</code> file which is a feed compatible with RSS v2.0.</p>
122 </li>
123 </ul>
124 </div>
125 </div>
126 </div></div></body>
127 </html>