mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-12 02:36:27 +00:00
214 lines
14 KiB
HTML
214 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>wallabag - Write config files</title>
|
|
|
|
<link rel="stylesheet" href="http://doc.wallabag.org/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="http://doc.wallabag.org/css/font-awesome.min.css">
|
|
<link rel="stylesheet" href="http://doc.wallabag.org/css/highlight.tomorrow-night.css">
|
|
<link rel="stylesheet" href="http://doc.wallabag.org/css/main.css">
|
|
</head>
|
|
<body>
|
|
|
|
<header class="navbar navbar-default navbar-fixed-top">
|
|
|
|
<a class="navbar-brand" href="http://doc.wallabag.org/">
|
|
wallabag
|
|
<small class="hidden-xs hidden-sm">
|
|
Write config files
|
|
</small>
|
|
</a>
|
|
<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>
|
|
|
|
|
|
</header>
|
|
|
|
<main class="container-fluid">
|
|
<div class="row">
|
|
|
|
|
|
<nav id="sidebar" class="col-sm-3 col-lg-2" role="navigation">
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
|
|
<h4 class="text-muted">
|
|
|
|
</h4>
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/index.html">
|
|
Getting started
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/help_wallabag.html">
|
|
Help us
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4 class="text-muted">
|
|
Administrator
|
|
</h4>
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Administrator/download_and_install.html">
|
|
Download and installation
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Administrator/update.html">
|
|
Update wallabag
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Administrator/hidden_options.html">
|
|
Hidden options
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Administrator/multiusers.html">
|
|
Multi users
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4 class="text-muted">
|
|
User
|
|
</h4>
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/save_your_first_article.html">
|
|
Save your first article
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/read_an_article.html">
|
|
Read an article
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/organize_articles.html">
|
|
Organize articles
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/configure_wallabag.html">
|
|
Configure wallabag
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/search.html">
|
|
Search
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/epub_conversion.html">
|
|
ePub conversion
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/issue_with_article.html">
|
|
Issue with article
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/rss_feed.html">
|
|
RSS feed
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/import_export.html">
|
|
Import export
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/User/framabag_account_creation.html">
|
|
Framabag account creation
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4 class="text-muted">
|
|
Developer
|
|
</h4>
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<li class="test active">
|
|
<a href="http://doc.wallabag.org/en/Developer/write_config_files.html">
|
|
Write config files
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Developer/create_new_theme.html">
|
|
Create a new theme
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Developer/git_repo.html">
|
|
Git repository
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Developer/docker.html">
|
|
Docker
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Developer/vagrant.html">
|
|
Vagrant
|
|
</a>
|
|
</li>
|
|
<li class="test ">
|
|
<a href="http://doc.wallabag.org/en/Developer/v2.html">
|
|
wallabag v2 / symfony2
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
|
|
<section class="col-lg-10">
|
|
<h1 id="write-config-files">Write config files</h1>
|
|
<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>
|
|
<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>
|
|
<h2 id="automatic-config-files-generation">Automatic config files generation</h2>
|
|
<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>
|
|
<p><img src="https://lut.im/RNaO7gGe/l9vRnO1b" alt="siteconfig" /></p>
|
|
<p>You should confirm this area by trying with other articles.<br />
|
|
When you got the right area, just click on <em>Download Full-Text RSS site config</em> to download your file.</p>
|
|
<h2 id="manual-config-file-generation">Manual config file generation</h2>
|
|
<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>
|
|
<p>Once you've got the id or class, you can write for example one or another of these lines:</p>
|
|
<pre><code>body: //div[@class='myclass']
|
|
body: //div[@id='myid']</code></pre>
|
|
<p>Then, test you file. If you got the right content but you want to strip unnecessary parts, do:</p>
|
|
<pre><code>strip: //div[@class='hidden']</code></pre>
|
|
<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>
|
|
</section>
|
|
|
|
</div>
|
|
</main>
|
|
|
|
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
|
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
|
<script src="http://yandex.st/highlightjs/7.5/highlight.min.js"></script>
|
|
|
|
<script>
|
|
$(function() {
|
|
$("section>h1").wrap('<div class="page-header" />');
|
|
// Syntax highlighting
|
|
hljs.initHighlightingOnLoad();
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|