]>
Commit | Line | Data |
---|---|---|
7f8f8271 TC |
1 | <!DOCTYPE html> |
2 | <html lang="en"> | |
3 | <head> | |
4 | <meta charset="utf-8"> | |
5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
6 | ||
7 | <title>wallabag - Write config files</title> | |
8 | ||
9 | <link rel="stylesheet" href="http://doc.wallabag.org/css/bootstrap.min.css"> | |
10 | <link rel="stylesheet" href="http://doc.wallabag.org/css/font-awesome.min.css"> | |
11 | <link rel="stylesheet" href="http://doc.wallabag.org/css/highlight.tomorrow-night.css"> | |
12 | <link rel="stylesheet" href="http://doc.wallabag.org/css/main.css"> | |
13 | </head> | |
14 | <body> | |
15 | ||
16 | <header class="navbar navbar-default navbar-fixed-top"> | |
17 | ||
18 | <a class="navbar-brand" href="http://doc.wallabag.org/"> | |
19 | wallabag | |
20 | <small class="hidden-xs hidden-sm"> | |
21 | Write config files | |
22 | </small> | |
23 | </a> | |
24 | <a href="http://doc.wallabag.org/en">EN</a> - <a href="http://doc.wallabag.org/fr">FR</a> - <a href="http://doc.wallabag.org/de">DE</a> - <a href="http://doc.wallabag.org/ru">RU</a> | |
25 | ||
26 | ||
27 | </header> | |
28 | ||
29 | <main class="container-fluid"> | |
30 | <div class="row"> | |
31 | ||
32 | ||
33 | <nav id="sidebar" class="col-sm-3 col-lg-2" role="navigation"> | |
34 | ||
35 | <ul class="nav nav-pills nav-stacked"> | |
36 | ||
37 | <h4 class="text-muted"> | |
38 | ||
39 | </h4> | |
40 | ||
41 | <ul class="nav nav-pills nav-stacked"> | |
42 | <li class="test "> | |
43 | <a href="http://doc.wallabag.org/en/index.html"> | |
44 | Getting started | |
45 | </a> | |
46 | </li> | |
47 | <li class="test "> | |
48 | <a href="http://doc.wallabag.org/en/help_wallabag.html"> | |
49 | Help us | |
50 | </a> | |
51 | </li> | |
52 | </ul> | |
53 | ||
54 | <h4 class="text-muted"> | |
55 | Administrator | |
56 | </h4> | |
57 | ||
58 | <ul class="nav nav-pills nav-stacked"> | |
59 | <li class="test "> | |
60 | <a href="http://doc.wallabag.org/en/Administrator/download_and_install.html"> | |
61 | Download and installation | |
62 | </a> | |
63 | </li> | |
64 | <li class="test "> | |
65 | <a href="http://doc.wallabag.org/en/Administrator/update.html"> | |
66 | Update wallabag | |
67 | </a> | |
68 | </li> | |
69 | <li class="test "> | |
70 | <a href="http://doc.wallabag.org/en/Administrator/hidden_options.html"> | |
71 | Hidden options | |
72 | </a> | |
73 | </li> | |
74 | <li class="test "> | |
75 | <a href="http://doc.wallabag.org/en/Administrator/multiusers.html"> | |
76 | Multi users | |
77 | </a> | |
78 | </li> | |
79 | </ul> | |
80 | ||
81 | <h4 class="text-muted"> | |
82 | User | |
83 | </h4> | |
84 | ||
85 | <ul class="nav nav-pills nav-stacked"> | |
86 | <li class="test "> | |
87 | <a href="http://doc.wallabag.org/en/User/save_your_first_article.html"> | |
88 | Save your first article | |
89 | </a> | |
90 | </li> | |
91 | <li class="test "> | |
92 | <a href="http://doc.wallabag.org/en/User/read_an_article.html"> | |
93 | Read an article | |
94 | </a> | |
95 | </li> | |
96 | <li class="test "> | |
97 | <a href="http://doc.wallabag.org/en/User/organize_articles.html"> | |
98 | Organize articles | |
99 | </a> | |
100 | </li> | |
101 | <li class="test "> | |
102 | <a href="http://doc.wallabag.org/en/User/configure_wallabag.html"> | |
103 | Configure wallabag | |
104 | </a> | |
105 | </li> | |
106 | <li class="test "> | |
107 | <a href="http://doc.wallabag.org/en/User/search.html"> | |
108 | Search | |
109 | </a> | |
110 | </li> | |
111 | <li class="test "> | |
112 | <a href="http://doc.wallabag.org/en/User/epub_conversion.html"> | |
113 | ePub conversion | |
114 | </a> | |
115 | </li> | |
116 | <li class="test "> | |
117 | <a href="http://doc.wallabag.org/en/User/issue_with_article.html"> | |
118 | Issue with article | |
119 | </a> | |
120 | </li> | |
121 | <li class="test "> | |
122 | <a href="http://doc.wallabag.org/en/User/rss_feed.html"> | |
123 | RSS feed | |
124 | </a> | |
125 | </li> | |
126 | <li class="test "> | |
127 | <a href="http://doc.wallabag.org/en/User/import_export.html"> | |
128 | Import export | |
129 | </a> | |
130 | </li> | |
131 | <li class="test "> | |
132 | <a href="http://doc.wallabag.org/en/User/framabag_account_creation.html"> | |
133 | Framabag account creation | |
134 | </a> | |
135 | </li> | |
136 | </ul> | |
137 | ||
138 | <h4 class="text-muted"> | |
139 | Developer | |
140 | </h4> | |
141 | ||
142 | <ul class="nav nav-pills nav-stacked"> | |
143 | <li class="test active"> | |
144 | <a href="http://doc.wallabag.org/en/Developer/write_config_files.html"> | |
145 | Write config files | |
146 | </a> | |
147 | </li> | |
148 | <li class="test "> | |
149 | <a href="http://doc.wallabag.org/en/Developer/create_new_theme.html"> | |
150 | Create a new theme | |
151 | </a> | |
152 | </li> | |
153 | <li class="test "> | |
154 | <a href="http://doc.wallabag.org/en/Developer/git_repo.html"> | |
155 | Git repository | |
156 | </a> | |
157 | </li> | |
158 | <li class="test "> | |
159 | <a href="http://doc.wallabag.org/en/Developer/docker.html"> | |
160 | Docker | |
161 | </a> | |
162 | </li> | |
163 | <li class="test "> | |
164 | <a href="http://doc.wallabag.org/en/Developer/vagrant.html"> | |
165 | Vagrant | |
166 | </a> | |
167 | </li> | |
168 | <li class="test "> | |
169 | <a href="http://doc.wallabag.org/en/Developer/v2.html"> | |
170 | wallabag v2 / symfony2 | |
171 | </a> | |
172 | </li> | |
173 | </ul> | |
174 | </ul> | |
175 | ||
176 | </nav> | |
177 | ||
178 | ||
179 | <section class="col-lg-10"> | |
180 | <h1 id="write-config-files">Write config files</h1> | |
181 | <p>wallabag can use specific site config files to parse website articles. These files are stored in the <a href="https://github.com/wallabag/wallabag/tree/master/inc/3rdparty/site_config/standard"><code>inc/3rdparty/site_config/standard</code></a> folder.</p> | |
182 | <p>The format used for these files is <a href="http://www.w3.org/TR/xpath20/">XPath</a>. Look at some examples in the folder.</p> | |
183 | <h2 id="automatic-config-files-generation">Automatic config files generation</h2> | |
184 | <p>Fivefilters has created a <a href="http://siteconfig.fivefilters.org/">very useful tool</a> to create config files. You just type in the adress of the article to work on with, and you select the area containing the content you want.</p> | |
185 | <p><img src="https://lut.im/RNaO7gGe/l9vRnO1b" alt="siteconfig" /></p> | |
186 | <p>You should confirm this area by trying with other articles.<br /> | |
187 | When you got the right area, just click on <em>Download Full-Text RSS site config</em> to download your file.</p> | |
188 | <h2 id="manual-config-file-generation">Manual config file generation</h2> | |
189 | <p>If Fivefilters tool doesn't work correctly, take a look at the source (Ctrl + U on Firefox and Chromium). Search for your content and get the <code>class</code> or the <code>id</code> attribute of the area containing what you want.</p> | |
190 | <p>Once you've got the id or class, you can write for example one or another of these lines:</p> | |
191 | <pre><code>body: //div[@class='myclass'] | |
192 | body: //div[@id='myid']</code></pre> | |
193 | <p>Then, test you file. If you got the right content but you want to strip unnecessary parts, do:</p> | |
194 | <pre><code>strip: //div[@class='hidden']</code></pre> | |
195 | <p>You can look at other options for siteconfig files <a href="http://help.fivefilters.org/customer/portal/articles/223153-site-patterns">here</a>.</p> | |
196 | </section> | |
197 | ||
198 | </div> | |
199 | </main> | |
200 | ||
201 | <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
202 | <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> | |
203 | <script src="http://yandex.st/highlightjs/7.5/highlight.min.js"></script> | |
204 | ||
205 | <script> | |
206 | $(function() { | |
207 | $("section>h1").wrap('<div class="page-header" />'); | |
208 | // Syntax highlighting | |
209 | hljs.initHighlightingOnLoad(); | |
210 | }); | |
211 | </script> | |
212 | ||
213 | </body> | |
214 | </html> |