contentbrowser / src / templates / documentation.html

Full commit
{% extends "layout.html" %}
{% block title %}Documentation{% endblock %}
{% block body %}
  <h1 class="backhome"><a href=/><img src="/static/home.png" alt="Home" /></a></h1>
  <h2 class="title">Documentation</h2>
  <div class="content">
    <p>When you hit the homepage of the service, there are 3 possibilities:</p>
      <li>pasting an URI to read the content and only the content</li>
      <li>searching for a term in your browsing archives (you need to browse a few URIs before it becomes useful, obviously)</li>
      <li>droping the bookmarklet in your topbar to instantly access this service when you reach an article with hard to read content</li>
    <p>When you're reading an article, you can always reach the original page via links on the header and the footer. The link at the top allows you to go back to the welcome page.</p>

    <p>There are a few themes available, see <code>src/static/themes/</code> and you can easily create your own, just drop your custom <acronym>CSS</acronym> in this folder and modify the <code>CSS_THEME</code> setting (see below).</p>
    <p>The easiest way to proceed is to copy an existing theme in order to know class names and so on. Do not hesitate to share your theme via pull-request!</p>

    <p><code>LOCAL_HOST</code> and <code>LOCAL_PORT</code> define the host and port to launch your service. Pro-tip: hack your <code>/etc/hosts</code> file to setup your own domain.</p>
    <p><code>FORCE_REFRESH</code> setting is mainly for development usage, when you fill the database with wrong data it'll erase it if you hit the same <acronym>URI</acronym> and refill it with fresh data.</p>
    <p><code>CSS_THEME</code> is a string with the name of the <acronym>CSS</acronym> file (without <code>.css</code>) you put in your theme folder (<code>src/static/themes/</code>).</p>
    <p><code>REDIS_HOST</code> and <code>REDIS_PORT</code> are useful if you don't run the default configuration.</p>
    <p><code>WHOOSH_INDEX</code> is the name of the folder to store Whoosh's index.</p>
    <p><code>USE_DEBUGGER</code> and <code>USE_RELOADER</code> are mainly for debugging purpose, set those to <code>True</code> if you're familiar with Werkzeug.</p>
    <p>Do not modify the <code>PROXY_URL</code> setting unless you know what you're doing!</p>

    <p><code>print("Hello developers!")</code></p>
    <p>The code has been splited in a few files:</p>
      <li><code></code> is creating the <acronym>WSGI</acronym> app, not really interesting</li>
      <li><code></code> contains Werkzeug URIs and views</li>
      <li><code></code> deals with persistence in both Redis and Whoosh, the parsing of the <acronym>HTML</acronym> is done in that class too</li>
      <li><code></code> contains useful functions used as Jinja's filters or helpers.</li>
      <li><code></code> defines custom settings to run the application.</li>
      <li><code>/static/</code> contains <acronym>CSS</acronym> files (with themes) and images.</li>
    <p>Once you know the code dispatching, let's talk about data's dispatching! When you submit a <acronym>URI</acronym>:</p>
      <li>the web page will be retrieved by <a href="">requests</a> and parsed with <a href="">readability</a></li>
      <li>the content of the web page is modified to create local links for each link in that content in order to be able to browse from content to content</li>
      <li>the content is stored in both <a href="">Redis</a> and <a href="">Whoosh</a>, the first one is used to cache it across requests, the second to index content and allow search across browsing history</li>
    <p>That's it for now, please submit enhancement's issues if you need more information here to participate, the code should be well documented so dig in :-).</p>
{% endblock %}