]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
make htmlpages
authornodiscc <nodiscc@gmail.com>
Sun, 18 Jun 2017 04:32:30 +0000 (06:32 +0200)
committernodiscc <nodiscc@gmail.com>
Sun, 18 Jun 2017 04:32:30 +0000 (06:32 +0200)
50 files changed:
doc/html/3rd-party-libraries/index.html
doc/html/Backup,-restore,-import-and-export/index.html
doc/html/Bookmarklet/index.html
doc/html/Browsing-and-searching/index.html
doc/html/Coding-guidelines/index.html
doc/html/Community-&-Related-software/index.html
doc/html/Continuous-integration-tools/index.html
doc/html/Copy-an-existing-installation-over-SSH-and-serve-it-locally/index.html [deleted file]
doc/html/Create-and-serve-multiple-Shaarlis-(farm)/index.html [deleted file]
doc/html/Development-guidelines/index.html
doc/html/Directory-structure/index.html
doc/html/Docker-101/index.html
doc/html/Docker-resources/index.html
doc/html/Download-CSS-styles-from-an-OPML-list/index.html [deleted file]
doc/html/Download-and-Installation/index.html
doc/html/FAQ/index.html
doc/html/Features/index.html
doc/html/Firefox-share/index.html
doc/html/GnuPG-signature/index.html
doc/html/Plugin-System/index.html
doc/html/Plugins/index.html
doc/html/REST-API/index.html
doc/html/RSS-feeds/index.html
doc/html/Release-Shaarli/index.html
doc/html/Reverse-proxy-configuration/index.html
doc/html/Security/index.html
doc/html/Server-configuration/index.html
doc/html/Server-requirements/index.html
doc/html/Server-security/index.html
doc/html/Shaarli-configuration/index.html
doc/html/Shaarli-images/index.html
doc/html/Static-analysis/index.html
doc/html/Theming/index.html
doc/html/Troubleshooting/index.html
doc/html/Unit-tests/index.html
doc/html/Upgrade-and-migration/index.html
doc/html/Various-hacks/index.html [moved from doc/html/Datastore-hacks/index.html with 88% similarity]
doc/html/Versioning-and-Branches/index.html
doc/html/index.html
doc/html/mkdocs/search_index.json
doc/html/search.html
doc/html/sitemap.xml
doc/md/Browsing-and-searching.md
doc/md/Community-&-Related-software.md
doc/md/Continuous-integration-tools.md
doc/md/Development-guidelines.md
doc/md/Firefox-share.md
doc/md/GnuPG-signature.md
doc/md/Theming.md
doc/md/Upgrade-and-migration.md

index c54c45f5513d91aa37554d3088225b6187b68317..0d62007de671cbd83718d1c37c2fcef1aa2d2fda 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index ceb8017065a0d3bba4e59d27e3450fe924878674..33ec912406430b0845e6d19c8f8796c9ec0588b4 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/" class="btn btn-neutral float-right" title="Copy an existing installation over SSH and serve it locally">Next <span class="icon icon-circle-arrow-right"></span></a>
+        <a href="../Various-hacks/" class="btn btn-neutral float-right" title="Various hacks">Next <span class="icon icon-circle-arrow-right"></span></a>
       
       
         <a href="../REST-API/" class="btn btn-neutral" title="REST API"><span class="icon icon-circle-arrow-left"></span> Previous</a>
         <span><a href="../REST-API/" style="color: #fcfcfc;">&laquo; Previous</a></span>
       
       
-        <span style="margin-left: 15px"><a href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/" style="color: #fcfcfc">Next &raquo;</a></span>
+        <span style="margin-left: 15px"><a href="../Various-hacks/" style="color: #fcfcfc">Next &raquo;</a></span>
       
     </span>
 </div>
index e7a370b6fcf3689b9d800df365d34ccdbae9b6ee..325d305a1125961749a51e3031350ea4617d36e5 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 459f07c78ba70afc9c795e75a69ed20328b5b446..c8b7386e80d1f6c6af69530f9bebc3cb37b8acf5 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index be2bf7e8b57214ecb7cff1c0d3ce4fb7fa8f6908..dfcdd45ca02f40d8ca1c668a1ed546536c712dc9 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 1de704a32175e382762324a56ec7e053307d2d1d..2497433c63d82b5dab01a248825ab07ca42aee36 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index c889a963057150a95d3144917524ddc86f5f9d95..339f37ac1f36752ba19e69e4bfcdebbcd6b30971 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
diff --git a/doc/html/Copy-an-existing-installation-over-SSH-and-serve-it-locally/index.html b/doc/html/Copy-an-existing-installation-over-SSH-and-serve-it-locally/index.html
deleted file mode 100644 (file)
index 4aea480..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-<!DOCTYPE html>
-<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  
-  <link rel="shortcut icon" href="../img/favicon.ico">
-  <title>Copy an existing installation over SSH and serve it locally - Shaarli Documentation</title>
-  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
-
-  <link rel="stylesheet" href="../css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
-  <link rel="stylesheet" href="../css/highlight.css">
-  <link href="../github-markdown.css" rel="stylesheet">
-  
-  <script>
-    // Current page data
-    var mkdocs_page_name = "Copy an existing installation over SSH and serve it locally";
-    var mkdocs_page_input_path = "Copy-an-existing-installation-over-SSH-and-serve-it-locally.md";
-    var mkdocs_page_url = "/Copy-an-existing-installation-over-SSH-and-serve-it-locally/";
-  </script>
-  
-  <script src="../js/jquery-2.1.1.min.js"></script>
-  <script src="../js/modernizr-2.8.3.min.js"></script>
-  <script type="text/javascript" src="../js/highlight.pack.js"></script> 
-  
-</head>
-
-<body class="wy-body-for-nav" role="document">
-
-  <div class="wy-grid-for-nav">
-
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
-      <div class="wy-side-nav-search">
-        <a href=".." class="icon icon-home"> Shaarli Documentation</a>
-        <div role="search">
-  <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-  </form>
-</div>
-      </div>
-
-      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-       <ul class="current">
-         
-          
-            <li class="toctree-l1">
-               
-    <a class="" href="..">Home</a>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Setup</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Download-and-Installation/">Download and Installation</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Upgrade-and-migration/">Upgrade and migration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-requirements/">Server requirements</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-configuration/">Server configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-security/">Server security</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Shaarli-configuration/">Shaarli configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Plugins/">Plugins</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Docker</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Docker-101/">Docker 101</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Shaarli-images/">Shaarli images</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Reverse-proxy-configuration/">Reverse proxy configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Docker-resources/">Docker resources</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Usage</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Features/">Features</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Bookmarklet/">Bookmarklet</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Browsing-and-searching/">Browsing and searching</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Firefox-share/">Firefox share</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../RSS-feeds/">RSS feeds</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../REST-API/">REST API</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">How To</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
-                </li>
-                <li class=" current">
-                    
-    <a class="current" href="./">Copy an existing installation over SSH and serve it locally</a>
-    <ul class="subnav">
-            
-    </ul>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <a class="" href="../Troubleshooting/">Troubleshooting</a>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Development</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Development-guidelines/">Development guidelines</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Continuous-integration-tools/">Continuous integration tools</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../GnuPG-signature/">GnuPG signature</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Coding-guidelines/">Coding guidelines</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Directory-structure/">Directory structure</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../3rd-party-libraries/">3rd party libraries</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Plugin-System/">Plugin System</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Release-Shaarli/">Release Shaarli</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Versioning-and-Branches/">Versioning and Branches</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Security/">Security</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Static-analysis/">Static analysis</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Theming/">Theming</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Unit-tests/">Unit tests</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">About</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../FAQ/">FAQ</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Community-&-Related-software/">Community & Related software</a>
-                </li>
-    </ul>
-           </li>
-          
-        </ul>
-      </div>
-      &nbsp;
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
-        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-        <a href="..">Shaarli Documentation</a>
-      </nav>
-
-      
-      <div class="wy-nav-content">
-        <div class="rst-content">
-          <div role="navigation" aria-label="breadcrumbs navigation">
-  <ul class="wy-breadcrumbs">
-    <li><a href="..">Docs</a> &raquo;</li>
-    
-      
-        
-          <li>How To &raquo;</li>
-        
-      
-    
-    <li>Copy an existing installation over SSH and serve it locally</li>
-    <li class="wy-breadcrumbs-aside">
-      
-        <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md"
-          class="icon icon-github"> Edit on GitHub</a>
-      
-    </li>
-  </ul>
-  <hr/>
-</div>
-          <div role="main">
-            <div class="section">
-              
-                <p>Example bash script:</p>
-<pre><code class="bash">#!/bin/bash
-#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
-#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
-#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
-#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
-#Usage: ./local-shaarli.sh
-#Author: nodiscc (nodiscc@gmail.com)
-#License: MIT (http://opensource.org/licenses/MIT)
-set -o errexit
-set -o nounset
-
-##### CONFIG #################
-#The port used by php's local server
-php_local_port=7431
-
-#Name of the SSH server and path where Shaarli is installed
-#TODO: pass these as command-line arguments
-remotehost=&quot;my.ssh.server&quot;
-remote_shaarli_dir=&quot;/var/www/shaarli&quot;
-
-
-###### FUNCTIONS #############
-_main() {
-    _CBSyncShaarli
-    _CBServeShaarli
-}
-
-_CBSyncShaarli() {
-    remote_temp_dir=$(ssh $remotehost mktemp -d)
-    remote_ssh_user=$(ssh $remotehost whoami)
-    ssh -t &quot;$remotehost&quot; sudo cp -r &quot;$remote_shaarli_dir&quot; &quot;$remote_temp_dir&quot;
-    ssh -t &quot;$remotehost&quot; sudo chown -R &quot;$remote_ssh_user&quot;:&quot;$remote_ssh_user&quot; &quot;$remote_temp_dir&quot;
-    scp -rq &quot;$remotehost&quot;:&quot;$remote_temp_dir&quot; local-shaarli
-    ssh &quot;$remotehost&quot; rm -r &quot;$remote_temp_dir&quot;
-}
-
-_CBServeShaarli() {
-    #TODO: allow serving a previously downloaded Shaarli
-    #TODO: ask before overwriting local copy, if it exists
-    cd local-shaarli/
-    php -S localhost:${php_local_port}
-    echo &quot;Please go to http://localhost:${php_local_port}&quot;
-}
-
-
-##### MAIN #################
-
-_main
-</code></pre>
-
-<p>This outputs:</p>
-<pre><code class="bash">$ ./local-shaarli.sh
-PHP 5.6.0RC4 Development Server started at Mon Sep  1 21:56:19 2014
-Listening on http://localhost:7431
-Document root is /home/user/local-shaarli/shaarli
-Press Ctrl-C to quit.
-
-[Mon Sep  1 21:56:27 2014] ::1:57868 [200]: /
-[Mon Sep  1 21:56:27 2014] ::1:57869 [200]: /index.html
-[Mon Sep  1 21:56:37 2014] ::1:57881 [200]: /...
-</code></pre>
-              
-            </div>
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="../Create-and-serve-multiple-Shaarlis-(farm)/" class="btn btn-neutral float-right" title="Create and serve multiple Shaarlis (farm)">Next <span class="icon icon-circle-arrow-right"></span></a>
-      
-      
-        <a href="../Backup,-restore,-import-and-export/" class="btn btn-neutral" title="Backup, restore, import and export"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <!-- Copyright etc -->
-    
-  </div>
-
-  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-</footer>
-         
-        </div>
-      </div>
-
-    </section>
-    
-  </div>
-
-  <div class="rst-versions" role="note" style="cursor: pointer">
-    <span class="rst-current-version" data-toggle="rst-current-version">
-      
-          <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
-      
-      
-        <span><a href="../Backup,-restore,-import-and-export/" style="color: #fcfcfc;">&laquo; Previous</a></span>
-      
-      
-        <span style="margin-left: 15px"><a href="../Create-and-serve-multiple-Shaarlis-(farm)/" style="color: #fcfcfc">Next &raquo;</a></span>
-      
-    </span>
-</div>
-    <script src="../js/theme.js"></script>
-
-</body>
-</html>
diff --git a/doc/html/Create-and-serve-multiple-Shaarlis-(farm)/index.html b/doc/html/Create-and-serve-multiple-Shaarlis-(farm)/index.html
deleted file mode 100644 (file)
index 98d8992..0000000
+++ /dev/null
@@ -1,396 +0,0 @@
-<!DOCTYPE html>
-<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  
-  <link rel="shortcut icon" href="../img/favicon.ico">
-  <title>Create and serve multiple Shaarlis (farm) - Shaarli Documentation</title>
-  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
-
-  <link rel="stylesheet" href="../css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
-  <link rel="stylesheet" href="../css/highlight.css">
-  <link href="../github-markdown.css" rel="stylesheet">
-  
-  <script>
-    // Current page data
-    var mkdocs_page_name = "Create and serve multiple Shaarlis (farm)";
-    var mkdocs_page_input_path = "Create-and-serve-multiple-Shaarlis-(farm).md";
-    var mkdocs_page_url = "/Create-and-serve-multiple-Shaarlis-(farm)/";
-  </script>
-  
-  <script src="../js/jquery-2.1.1.min.js"></script>
-  <script src="../js/modernizr-2.8.3.min.js"></script>
-  <script type="text/javascript" src="../js/highlight.pack.js"></script> 
-  
-</head>
-
-<body class="wy-body-for-nav" role="document">
-
-  <div class="wy-grid-for-nav">
-
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
-      <div class="wy-side-nav-search">
-        <a href=".." class="icon icon-home"> Shaarli Documentation</a>
-        <div role="search">
-  <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-  </form>
-</div>
-      </div>
-
-      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-       <ul class="current">
-         
-          
-            <li class="toctree-l1">
-               
-    <a class="" href="..">Home</a>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Setup</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Download-and-Installation/">Download and Installation</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Upgrade-and-migration/">Upgrade and migration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-requirements/">Server requirements</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-configuration/">Server configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-security/">Server security</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Shaarli-configuration/">Shaarli configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Plugins/">Plugins</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Docker</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Docker-101/">Docker 101</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Shaarli-images/">Shaarli images</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Reverse-proxy-configuration/">Reverse proxy configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Docker-resources/">Docker resources</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Usage</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Features/">Features</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Bookmarklet/">Bookmarklet</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Browsing-and-searching/">Browsing and searching</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Firefox-share/">Firefox share</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../RSS-feeds/">RSS feeds</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../REST-API/">REST API</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">How To</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class=" current">
-                    
-    <a class="current" href="./">Create and serve multiple Shaarlis (farm)</a>
-    <ul class="subnav">
-            
-    </ul>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <a class="" href="../Troubleshooting/">Troubleshooting</a>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Development</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Development-guidelines/">Development guidelines</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Continuous-integration-tools/">Continuous integration tools</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../GnuPG-signature/">GnuPG signature</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Coding-guidelines/">Coding guidelines</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Directory-structure/">Directory structure</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../3rd-party-libraries/">3rd party libraries</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Plugin-System/">Plugin System</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Release-Shaarli/">Release Shaarli</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Versioning-and-Branches/">Versioning and Branches</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Security/">Security</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Static-analysis/">Static analysis</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Theming/">Theming</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Unit-tests/">Unit tests</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">About</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../FAQ/">FAQ</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Community-&-Related-software/">Community & Related software</a>
-                </li>
-    </ul>
-           </li>
-          
-        </ul>
-      </div>
-      &nbsp;
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
-        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-        <a href="..">Shaarli Documentation</a>
-      </nav>
-
-      
-      <div class="wy-nav-content">
-        <div class="rst-content">
-          <div role="navigation" aria-label="breadcrumbs navigation">
-  <ul class="wy-breadcrumbs">
-    <li><a href="..">Docs</a> &raquo;</li>
-    
-      
-        
-          <li>How To &raquo;</li>
-        
-      
-    
-    <li>Create and serve multiple Shaarlis (farm)</li>
-    <li class="wy-breadcrumbs-aside">
-      
-        <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Create-and-serve-multiple-Shaarlis-(farm).md"
-          class="icon icon-github"> Edit on GitHub</a>
-      
-    </li>
-  </ul>
-  <hr/>
-</div>
-          <div role="main">
-            <div class="section">
-              
-                <p>Example bash script (creates multiple shaarli instances and generates an HTML index of them)</p>
-<pre><code class="bash">#!/bin/bash
-set -o errexit
-set -o nounset
-
-#config
-shaarli_base_dir='/var/www/shaarli'
-accounts='bob john whatever username'
-shaarli_repo_url='https://github.com/shaarli/Shaarli'
-ref=&quot;master&quot;
-
-#clone multiple shaarli instances
-if [ ! -d &quot;$shaarli_base_dir&quot; ]; then mkdir &quot;$shaarli_base_dir&quot;; fi
-
-for account in $accounts; do
-    if [ -d &quot;$shaarli_base_dir/$account&quot; ];
-    then echo &quot;[info] account $account already exists, skipping&quot;;
-    else echo &quot;[info] creating new account $account ...&quot;; git clone --quiet &quot;$shaarli_repo_url&quot; -b &quot;$ref&quot; &quot;$shaarli_base_dir/$account&quot;; fi
-done
-
-#generate html index of shaarlis
-htmlhead='&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
-&lt;!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ --&gt;
-&lt;html lang=&quot;en&quot;&gt;
-    &lt;head&gt;
-        &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
-        &lt;title&gt;My Shaarli farm&lt;/title&gt;
-        &lt;style&gt;body {font-family: &quot;Open Sans&quot;}&lt;/style&gt;
-    &lt;/head&gt;
-    &lt;body&gt;
-    &lt;div&gt;
-    &lt;h1&gt;My Shaarli farm&lt;/h1&gt;
-    &lt;ul style=&quot;list-style-type: none;&quot;&gt;'
-
-accountlinks=''
-
-htmlfooter='
-    &lt;/ul&gt;
-    &lt;/div&gt;
-    &lt;/body&gt;
-&lt;/html&gt;'    
-
-
-
-for account in $accounts; do accountlinks=&quot;$accountlinks\n&lt;li&gt;&lt;a href=\&quot;$account\&quot;&gt;$account&lt;/a&gt;&lt;/li&gt;&quot;; done
-if [ -d &quot;$shaarli_base_dir/index.html&quot; ]; then echo &quot;[removing old index.html]&quot;; rm &quot;$shaarli_base_dir/index.html&quot; ]; fi
-echo &quot;[info] generating new index of shaarlis&quot;
-echo -e &quot;$htmlhead $accountlinks $htmlfooter&quot; &gt; &quot;$shaarli_base_dir/index.html&quot;
-echo '[info] done.'
-echo &quot;[info] list of accounts: $accounts&quot;
-echo &quot;[info] contents of $shaarli_base_dir:&quot;
-tree -a -L 1 &quot;$shaarli_base_dir&quot;
-</code></pre>
-
-<p>This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like <a href="https://www.ansible.com/">Ansible</a></p>
-              
-            </div>
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="../Download-CSS-styles-from-an-OPML-list/" class="btn btn-neutral float-right" title="Download CSS styles from an OPML list">Next <span class="icon icon-circle-arrow-right"></span></a>
-      
-      
-        <a href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/" class="btn btn-neutral" title="Copy an existing installation over SSH and serve it locally"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <!-- Copyright etc -->
-    
-  </div>
-
-  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-</footer>
-         
-        </div>
-      </div>
-
-    </section>
-    
-  </div>
-
-  <div class="rst-versions" role="note" style="cursor: pointer">
-    <span class="rst-current-version" data-toggle="rst-current-version">
-      
-          <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
-      
-      
-        <span><a href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/" style="color: #fcfcfc;">&laquo; Previous</a></span>
-      
-      
-        <span style="margin-left: 15px"><a href="../Download-CSS-styles-from-an-OPML-list/" style="color: #fcfcfc">Next &raquo;</a></span>
-      
-    </span>
-</div>
-    <script src="../js/theme.js"></script>
-
-</body>
-</html>
index 747d53a81adb2bf1a8a9c8c304d63c81c22c16f0..e75c911b18f25c84feac5299599adede283a3577 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 82979774b031cde11951e4ed3ce6742f7fad7076..ff075ec5f27bf516e4f0adcee15d29dd1f386a5c 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 5b4f645c439f13aa586857b341de4a516c02c611..31e57b5963bc9e4b3ce22c42a1ce4745e83bb720 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 7bd7067dc6817998d14856fc144748ff26a2c89c..169a0297afa0311ee445c849641e217dcf9d13e8 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
diff --git a/doc/html/Download-CSS-styles-from-an-OPML-list/index.html b/doc/html/Download-CSS-styles-from-an-OPML-list/index.html
deleted file mode 100644 (file)
index e697b39..0000000
+++ /dev/null
@@ -1,496 +0,0 @@
-<!DOCTYPE html>
-<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  
-  <link rel="shortcut icon" href="../img/favicon.ico">
-  <title>Download CSS styles from an OPML list - Shaarli Documentation</title>
-  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
-
-  <link rel="stylesheet" href="../css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
-  <link rel="stylesheet" href="../css/highlight.css">
-  <link href="../github-markdown.css" rel="stylesheet">
-  
-  <script>
-    // Current page data
-    var mkdocs_page_name = "Download CSS styles from an OPML list";
-    var mkdocs_page_input_path = "Download-CSS-styles-from-an-OPML-list.md";
-    var mkdocs_page_url = "/Download-CSS-styles-from-an-OPML-list/";
-  </script>
-  
-  <script src="../js/jquery-2.1.1.min.js"></script>
-  <script src="../js/modernizr-2.8.3.min.js"></script>
-  <script type="text/javascript" src="../js/highlight.pack.js"></script> 
-  
-</head>
-
-<body class="wy-body-for-nav" role="document">
-
-  <div class="wy-grid-for-nav">
-
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
-      <div class="wy-side-nav-search">
-        <a href=".." class="icon icon-home"> Shaarli Documentation</a>
-        <div role="search">
-  <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-  </form>
-</div>
-      </div>
-
-      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-       <ul class="current">
-         
-          
-            <li class="toctree-l1">
-               
-    <a class="" href="..">Home</a>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Setup</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Download-and-Installation/">Download and Installation</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Upgrade-and-migration/">Upgrade and migration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-requirements/">Server requirements</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-configuration/">Server configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Server-security/">Server security</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Shaarli-configuration/">Shaarli configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Plugins/">Plugins</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Docker</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Docker-101/">Docker 101</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Shaarli-images/">Shaarli images</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Reverse-proxy-configuration/">Reverse proxy configuration</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Docker-resources/">Docker resources</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Usage</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Features/">Features</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Bookmarklet/">Bookmarklet</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Browsing-and-searching/">Browsing and searching</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Firefox-share/">Firefox share</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../RSS-feeds/">RSS feeds</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../REST-API/">REST API</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">How To</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class=" current">
-                    
-    <a class="current" href="./">Download CSS styles from an OPML list</a>
-    <ul class="subnav">
-            
-    <li class="toctree-l3"><a href="#download-css-styles-for-shaarlis-listed-in-an-opml-file">Download CSS styles for shaarlis listed in an opml file</a></li>
-    
-
-    </ul>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <a class="" href="../Troubleshooting/">Troubleshooting</a>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">Development</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../Development-guidelines/">Development guidelines</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Continuous-integration-tools/">Continuous integration tools</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../GnuPG-signature/">GnuPG signature</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Coding-guidelines/">Coding guidelines</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Directory-structure/">Directory structure</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../3rd-party-libraries/">3rd party libraries</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Plugin-System/">Plugin System</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Release-Shaarli/">Release Shaarli</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Versioning-and-Branches/">Versioning and Branches</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Security/">Security</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Static-analysis/">Static analysis</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Theming/">Theming</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Unit-tests/">Unit tests</a>
-                </li>
-    </ul>
-           </li>
-          
-            <li class="toctree-l1">
-               
-    <span class="caption-text">About</span>
-    <ul class="subnav">
-                <li class="">
-                    
-    <a class="" href="../FAQ/">FAQ</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Community-&-Related-software/">Community & Related software</a>
-                </li>
-    </ul>
-           </li>
-          
-        </ul>
-      </div>
-      &nbsp;
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
-        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-        <a href="..">Shaarli Documentation</a>
-      </nav>
-
-      
-      <div class="wy-nav-content">
-        <div class="rst-content">
-          <div role="navigation" aria-label="breadcrumbs navigation">
-  <ul class="wy-breadcrumbs">
-    <li><a href="..">Docs</a> &raquo;</li>
-    
-      
-        
-          <li>How To &raquo;</li>
-        
-      
-    
-    <li>Download CSS styles from an OPML list</li>
-    <li class="wy-breadcrumbs-aside">
-      
-        <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Download-CSS-styles-from-an-OPML-list.md"
-          class="icon icon-github"> Edit on GitHub</a>
-      
-    </li>
-  </ul>
-  <hr/>
-</div>
-          <div role="main">
-            <div class="section">
-              
-                <h3 id="download-css-styles-for-shaarlis-listed-in-an-opml-file">Download CSS styles for shaarlis listed in an opml file</h3>
-<p>Example php script:</p>
-<pre><code class="php">&lt;!---- ?php --&gt;
-&lt;!---- Copyright (c) 2014 Nicolas Delsaux (https://github.com/Riduidel) --&gt;
-&lt;!---- License: zlib (http://www.gzip.org/zlib/zlib_license.html) --&gt;
-
-/**
- * Source: https://github.com/Riduidel
- * Download css styles for shaarlis listed in an opml file
- */
-define(&quot;SHAARLI_RSS_OPML&quot;, &quot;https://www.ecirtam.net/shaarlirss/custom/people.opml&quot;);
-
-define(&quot;THEMES_TEMP_FOLDER&quot;, &quot;new_themes&quot;);
-
-if(!file_exists(THEMES_TEMP_FOLDER)) {
-    mkdir(THEMES_TEMP_FOLDER);
-}
-
-function siteUrl($pathInSite) {
-    $indexPos = strpos($pathInSite, &quot;index.php&quot;);
-    if(!$indexPos) {
-        return $pathInSite;
-    } else {
-        return substr($pathInSite, 0, $indexPos);
-    }
-}
-
-function createShaarliHashFromOPMLL($opmlFile) {
-    $result = array();
-    $opml = file_get_contents($opmlFile);
-    $opmlXml = simplexml_load_string($opml);
-    $outlineElements = $opmlXml-&gt;xpath(&quot;body/outline&quot;);
-    foreach($outlineElements as $site) {
-        $siteUrl = siteUrl((string) $site['htmlUrl']);
-        $result[$siteUrl]=((string) $site['text']);
-    }
-    return $result;
-}
-
-function getSiteFolder($url) {
-    $domain = parse_url($url,  PHP_URL_HOST);
-    return THEMES_TEMP_FOLDER.&quot;/&quot;.str_replace(&quot;.&quot;, &quot;_&quot;, $domain);
-}
-
-function get_http_response_code($theURL) {
-     $headers = get_headers($theURL);
-     return substr($headers[0], 9, 3);
-}
-
-/**
- * This makes the code PHP-5 only (particularly the call to &quot;get_headers&quot;)
- */
-function copyUserStyleFrom($url, $name, $knownStyles) {
-    $userStyle = $url.&quot;inc/user.css&quot;;
-    if(in_array($url, $knownStyles)) {
-        // TODO add log message
-    } else {
-        $statusCode = get_http_response_code($userStyle);
-        if(intval($statusCode)&lt;300) {
-            $styleSheet = file_get_contents($userStyle);
-            $siteFolder = getSiteFolder($url);
-            if(!file_exists($siteFolder)) {
-                mkdir($siteFolder);
-            }
-            if(!file_exists($siteFolder.'/user.css')) {
-                // Copy stylesheet
-                file_put_contents($siteFolder.'/user.css', $styleSheet);
-            }
-            if(!file_exists($siteFolder.'/README.md')) {
-                // Then write a readme.md file
-                file_put_contents($siteFolder.'/README.md', 
-                    &quot;User style from &quot;.$name.&quot;\n&quot;
-                    .&quot;=============================&quot;
-                    .&quot;\n\n&quot;
-                    .&quot;This stylesheet was downloaded from &quot;.$userStyle.&quot; on &quot;.date(DATE_RFC822)
-                    );
-            }
-            if(!file_exists($siteFolder.'/config.ini')) {
-                // Write a config file containing useful informations
-                file_put_contents($siteFolder.'/config.ini', 
-                    &quot;site_url=&quot;.$url.&quot;\n&quot;
-                    .&quot;site_name=&quot;.$name.&quot;\n&quot;
-                    );
-            }
-            if(!file_exists($siteFolder.'/home.png')) {
-                // And finally copy generated thumbnail
-                $homeThumb = $siteFolder.'/home.png';
-                file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));
-            }
-            echo 'Theme have been downloaded from  &lt;a href=&quot;'.$url.'&quot;&gt;'.$url.'&lt;/a&gt; into '.$siteFolder
-                .'. It looks like &lt;img src=&quot;'.$homeThumb.'&quot;&gt;&lt;br/&gt;';
-        }
-    }
-}
-
-function getThumbnailUrl($url) {
-    return 'http://api.webthumbnail.org/?url='.$url;
-}
-
-function copyUserStylesFrom($urlToNames, $knownStyles) {
-    foreach($urlToNames as $url =&gt; $name) {
-        copyUserStyleFrom($url, $name, $knownStyles);
-    }
-}
-
-/**
- * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/
- * @param directory the directory we want to list files of
- * @return a simple array containing the list of absolute file paths. Notice that current file (&quot;.&quot;) and parent one(&quot;..&quot;)
- * are not listed here
- */
-function getDirectoryList ($directory)  {
-    $realPath = realpath($directory);
-    // create an array to hold directory list
-    $results = array();
-    // create a handler for the directory
-    $handler = opendir($directory);
-    // open directory and walk through the filenames
-    while ($file = readdir($handler)) {
-        // if file isn't this directory or its parent, add it to the results
-        if ($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot;) {
-            $results[] = realpath($realPath . &quot;/&quot; . $file);
-        }
-    }
-    // tidy up: close the handler
-    closedir($handler);
-    // done!
-    return $results;
-}
-
-/**
- * Start in themes folder and look in all subfolders for config.ini files. 
- * These config.ini files allow us not to download styles again and again
- */
-function findKnownStyles() {
-    $result = array();
-    $subFolders = getDirectoryList(&quot;themes&quot;);
-    foreach($subFolders as $folder) {
-        $configFile = $folder.&quot;/config.ini&quot;;
-        if(file_exists($configFile)) {
-            $iniParameters = parse_ini_file($configFile);
-            array_push($result, $iniParameters['site_url']);
-        }
-    }
-    return $result;
-}
-
-$knownStyles = findKnownStyles();
-copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);
-
-&lt;!--- ? ----&gt;
-</code></pre>
-              
-            </div>
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="../Datastore-hacks/" class="btn btn-neutral float-right" title="Datastore hacks">Next <span class="icon icon-circle-arrow-right"></span></a>
-      
-      
-        <a href="../Create-and-serve-multiple-Shaarlis-(farm)/" class="btn btn-neutral" title="Create and serve multiple Shaarlis (farm)"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <!-- Copyright etc -->
-    
-  </div>
-
-  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-</footer>
-         
-        </div>
-      </div>
-
-    </section>
-    
-  </div>
-
-  <div class="rst-versions" role="note" style="cursor: pointer">
-    <span class="rst-current-version" data-toggle="rst-current-version">
-      
-          <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
-      
-      
-        <span><a href="../Create-and-serve-multiple-Shaarlis-(farm)/" style="color: #fcfcfc;">&laquo; Previous</a></span>
-      
-      
-        <span style="margin-left: 15px"><a href="../Datastore-hacks/" style="color: #fcfcfc">Next &raquo;</a></span>
-      
-    </span>
-</div>
-    <script src="../js/theme.js"></script>
-
-</body>
-</html>
index 1ede1d682f2297a0f0cab83e0128d750d85c6bcb..92342681184573f971d0e77fe6bba284cc166959 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index c48e11f846d1bb9c7269ee829c72fb9d1e766133..f8ced260d8387df17b61d01184f8572cb4705910 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 453f189a96052221ff848d6188cc601d8aba412e..e847c54617368fcaf84495d47e97b5408426d976 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index c0aaf4bd7d4983221992b5c3401a7b84acd51e70..9c028ffc14c428bd445800f0b67651803fa90874 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 781ccd2deaa7ceb4c5467bf467708ba470917769..0b2d842af20c174d9d3f94ec97561010918edeee 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 5ee0f6c1168c7dbe858b441e1650accc2c01f75a..dbed5908ec3b17d8cd785573fcc86e1a01efa465 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 3a30e93c6047436a54e48001cf90b36494b9b53c..4b63681ee3778e242b69e321e511bc312871e2cf 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 2c244bcabe29a6b9b89c211d0efca5e601b781f6..6e2c95181d60bd2aed2dab20757e50379b2259ed 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index bb6e412cd1df7e411a140d25391a977691181bf3..a4b7339fb61aed256591a9581332132cf8b87aa1 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index cf5fcee861c8eb9bd254534c92d203dd95c961d7..924332032163adb127eec06e8a089672bf838f0b 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index bebd663f234318e6e5350d24e5a5e7ecb218d380..f573c5cd3c764e88efc2b709ee002b8791f0e56b 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 19b569e692f756866b3d69218b87376842b80a2e..c7aec5842f3429947463b3f1ecc2fc2f2c87bc3f 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index beb8cd08c8af614986c5a2568c383dfa69166c4c..6e798b4b49fd5dd3692ebd049bb39ed04df2461d 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index ab1b0d35fb447cc1a8705e96f10fd8173bd49dfb..f3bfa1853088b6c060eee2b0eb9b02bf8fa7c051 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index dbe99515f6f61365d79aa4015757b63e7b007b08..6d9f25c038295b0079b5e25646be7b9d543c7ef4 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 95a487d0b5beb39164d4abae9b465d59d36425e0..4e556061ba02c296cd04a2b5997a4f0f6c4ea1f1 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 0fa93ca30e2d604c8654bf5997cc2a8483a69e98..4a1cf66be2be03763c00a7ff1b53a525714f7c0c 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 0dfb551958d6645e19773658c56680a4946a8666..ddd81f8676f790171c38dd837b7f4cde05428187 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 70a36dd49167c071dc0a06ea762055ac3697399a..670dbb80d9d0cd070dd50f4875dc9bcf88ff3482 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index ed1c433d46a92d6ed071b1ad2ef1318e62fdd3d1..f15643628cde25be85bb92b18ef3a4c201ef3bad 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
@@ -400,7 +388,7 @@ php56 1
         <a href="../Development-guidelines/" class="btn btn-neutral float-right" title="Development guidelines">Next <span class="icon icon-circle-arrow-right"></span></a>
       
       
-        <a href="../Datastore-hacks/" class="btn btn-neutral" title="Datastore hacks"><span class="icon icon-circle-arrow-left"></span> Previous</a>
+        <a href="../Various-hacks/" class="btn btn-neutral" title="Various hacks"><span class="icon icon-circle-arrow-left"></span> Previous</a>
       
     </div>
   
@@ -428,7 +416,7 @@ php56 1
           <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
       
       
-        <span><a href="../Datastore-hacks/" style="color: #fcfcfc;">&laquo; Previous</a></span>
+        <span><a href="../Various-hacks/" style="color: #fcfcfc;">&laquo; Previous</a></span>
       
       
         <span style="margin-left: 15px"><a href="../Development-guidelines/" style="color: #fcfcfc">Next &raquo;</a></span>
index 84580db4322b0ab730c4c22961882a0e00b486c1..ce90ed1088df3297ecef457046fb5adbaad72e3d 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 642942bfb8c89510add1cb54bc0cd14df0e81100..3319fa72e0a8b4e708189391cfce895a9a64f524 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
similarity index 88%
rename from doc/html/Datastore-hacks/index.html
rename to doc/html/Various-hacks/index.html
index b3d8d97e5182b4571293060de00ed630ab7d6245..b06207ae2a90bab2dd2d3357ab573a62ce6cc13d 100644 (file)
@@ -8,7 +8,7 @@
   
   
   <link rel="shortcut icon" href="../img/favicon.ico">
-  <title>Datastore hacks - Shaarli Documentation</title>
+  <title>Various hacks - Shaarli Documentation</title>
   <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
 
   <link rel="stylesheet" href="../css/theme.css" type="text/css" />
@@ -18,9 +18,9 @@
   
   <script>
     // Current page data
-    var mkdocs_page_name = "Datastore hacks";
-    var mkdocs_page_input_path = "Datastore-hacks.md";
-    var mkdocs_page_url = "/Datastore-hacks/";
+    var mkdocs_page_name = "Various hacks";
+    var mkdocs_page_input_path = "Various-hacks.md";
+    var mkdocs_page_url = "/Various-hacks/";
   </script>
   
   <script src="../js/jquery-2.1.1.min.js"></script>
                 <li class="">
                     
     <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
                 </li>
                 <li class=" current">
                     
-    <a class="current" href="./">Datastore hacks</a>
+    <a class="current" href="./">Various hacks</a>
     <ul class="subnav">
             
     <li class="toctree-l3"><a href="#decode-datastore-content">Decode datastore content</a></li>
     
 
-    <li class="toctree-l3"><a href="#changing-the-timestamp-for-a-link">Changing the timestamp for a link</a></li>
+    <li class="toctree-l3"><a href="#changing-the-timestamp-for-a-shaare">Changing the timestamp for a shaare</a></li>
+    
+
+    <li class="toctree-l3"><a href="#see-also">See also</a></li>
     
 
     </ul>
         
       
     
-    <li>Datastore hacks</li>
+    <li>Various hacks</li>
     <li class="wy-breadcrumbs-aside">
       
-        <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Datastore-hacks.md"
+        <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Various-hacks.md"
           class="icon icon-github"> Edit on GitHub</a>
       
     </li>
@@ -311,12 +302,19 @@ exit;
 <pre><code>php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(&quot;!.*/\* (.+) \*/.*!&quot;, &quot;$1&quot;, file_get_contents(&quot;data/datastore.php&quot;)))))));' | jq .
 </code></pre>
 
-<h3 id="changing-the-timestamp-for-a-link">Changing the timestamp for a link</h3>
+<h3 id="changing-the-timestamp-for-a-shaare">Changing the timestamp for a shaare</h3>
 <ul>
 <li>Look for <code>&lt;input type="hidden" name="lf_linkdate" value="{$link.linkdate}"&gt;</code> in <code>tpl/editlink.tpl</code> (line 14)</li>
 <li>Replace <code>type="hidden"</code> with <code>type="text"</code> from this line</li>
 <li>A new date/time field becomes available in the edit/new link dialog.</li>
 <li>You can set the timestamp manually by entering it in the format <code>YYYMMDD_HHMMS</code>.</li>
+</ul>
+<h3 id="see-also">See also</h3>
+<ul>
+<li><a href="https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c">Add a new custom field to shaares (example patch)</a></li>
+<li><a href="https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012">Download CSS styles for shaarlis listed in an opml file</a></li>
+<li><a href="https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77">Copy an existing Shaarli installation over SSH, and serve it locally</a></li>
+<li><a href="https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20">Create multiple Shaarli instances, generate an HTML index of them</a></li>
 </ul>
               
             </div>
@@ -328,7 +326,7 @@ exit;
         <a href="../Troubleshooting/" class="btn btn-neutral float-right" title="Troubleshooting">Next <span class="icon icon-circle-arrow-right"></span></a>
       
       
-        <a href="../Download-CSS-styles-from-an-OPML-list/" class="btn btn-neutral" title="Download CSS styles from an OPML list"><span class="icon icon-circle-arrow-left"></span> Previous</a>
+        <a href="../Backup,-restore,-import-and-export/" class="btn btn-neutral" title="Backup, restore, import and export"><span class="icon icon-circle-arrow-left"></span> Previous</a>
       
     </div>
   
@@ -356,7 +354,7 @@ exit;
           <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
       
       
-        <span><a href="../Download-CSS-styles-from-an-OPML-list/" style="color: #fcfcfc;">&laquo; Previous</a></span>
+        <span><a href="../Backup,-restore,-import-and-export/" style="color: #fcfcfc;">&laquo; Previous</a></span>
       
       
         <span style="margin-left: 15px"><a href="../Troubleshooting/" style="color: #fcfcfc">Next &raquo;</a></span>
index 406ad7f988bbd5698d8cd81c836959c7213e9502..97bdb47e1f5202e91b929e12d3191f56c12622e3 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="../Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="../Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="../Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index a9b0c7b98b2747a8bb900044a05b8b61a08df70d..e6d4ef78d8f59978fdf83eca0f09c1c2dd1aca54 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
 
 <!--
 MkDocs version : 0.16.3
-Build Date UTC : 2017-06-17 22:04:25
+Build Date UTC : 2017-06-18 04:31:25
 -->
index 2222a95b6a9bee84b1ac824b1777037fc754b12d..7ef1837c09cf7ed01661302ad0447adec9199785 100644 (file)
             "title": "Import Shaarli links to Firefox"
         },
         {
-            "location": "/Copy-an-existing-installation-over-SSH-and-serve-it-locally/",
-            "text": "Example bash script:\n\n\n#!/bin/bash\n#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli\n#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.\n#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli\n#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed\n#Usage: ./local-shaarli.sh\n#Author: nodiscc (nodiscc@gmail.com)\n#License: MIT (http://opensource.org/licenses/MIT)\nset -o errexit\nset -o nounset\n\n##### CONFIG #################\n#The port used by php's local server\nphp_local_port=7431\n\n#Name of the SSH server and path where Shaarli is installed\n#TODO: pass these as command-line arguments\nremotehost=\"my.ssh.server\"\nremote_shaarli_dir=\"/var/www/shaarli\"\n\n\n###### FUNCTIONS #############\n_main() {\n    _CBSyncShaarli\n    _CBServeShaarli\n}\n\n_CBSyncShaarli() {\n    remote_temp_dir=$(ssh $remotehost mktemp -d)\n    remote_ssh_user=$(ssh $remotehost whoami)\n    ssh -t \"$remotehost\" sudo cp -r \"$remote_shaarli_dir\" \"$remote_temp_dir\"\n    ssh -t \"$remotehost\" sudo chown -R \"$remote_ssh_user\":\"$remote_ssh_user\" \"$remote_temp_dir\"\n    scp -rq \"$remotehost\":\"$remote_temp_dir\" local-shaarli\n    ssh \"$remotehost\" rm -r \"$remote_temp_dir\"\n}\n\n_CBServeShaarli() {\n    #TODO: allow serving a previously downloaded Shaarli\n    #TODO: ask before overwriting local copy, if it exists\n    cd local-shaarli/\n    php -S localhost:${php_local_port}\n    echo \"Please go to http://localhost:${php_local_port}\"\n}\n\n\n##### MAIN #################\n\n_main\n\n\n\n\nThis outputs:\n\n\n$ ./local-shaarli.sh\nPHP 5.6.0RC4 Development Server started at Mon Sep  1 21:56:19 2014\nListening on http://localhost:7431\nDocument root is /home/user/local-shaarli/shaarli\nPress Ctrl-C to quit.\n\n[Mon Sep  1 21:56:27 2014] ::1:57868 [200]: /\n[Mon Sep  1 21:56:27 2014] ::1:57869 [200]: /index.html\n[Mon Sep  1 21:56:37 2014] ::1:57881 [200]: /...",
-            "title": "Copy an existing installation over SSH and serve it locally"
+            "location": "/Various-hacks/",
+            "text": "Decode datastore content\n\n\nTo display the array representing the data saved in \ndata/datastore.php\n, use the following snippet:\n\n\n$data = \"tZNdb9MwFIb... <Commented content inside datastore.php>\";\n$out = unserialize(gzinflate(base64_decode($data)));\necho \"<pre>\"; // Pretty printing is love, pretty printing is life\nprint_r($out);\necho \"</pre>\";\nexit;\n\n\n\n\nThis will output the internal representation of the datastore, \"unobfuscated\" (if this can really be considered obfuscation).\n\n\nAlternatively, you can transform to JSON format (and pretty-print if you have \njq\n installed):\n\n\nphp -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(\"!.*/\\* (.+) \\*/.*!\", \"$1\", file_get_contents(\"data/datastore.php\")))))));' | jq .\n\n\n\n\nChanging the timestamp for a shaare\n\n\n\n\nLook for \n<input type=\"hidden\" name=\"lf_linkdate\" value=\"{$link.linkdate}\">\n in \ntpl/editlink.tpl\n (line 14)\n\n\nReplace \ntype=\"hidden\"\n with \ntype=\"text\"\n from this line\n\n\nA new date/time field becomes available in the edit/new link dialog.\n\n\nYou can set the timestamp manually by entering it in the format \nYYYMMDD_HHMMS\n.\n\n\n\n\nSee also\n\n\n\n\nAdd a new custom field to shaares (example patch)\n\n\nDownload CSS styles for shaarlis listed in an opml file\n\n\nCopy an existing Shaarli installation over SSH, and serve it locally\n\n\nCreate multiple Shaarli instances, generate an HTML index of them",
+            "title": "Various hacks"
         },
         {
-            "location": "/Create-and-serve-multiple-Shaarlis-(farm)/",
-            "text": "Example bash script (creates multiple shaarli instances and generates an HTML index of them)\n\n\n#!/bin/bash\nset -o errexit\nset -o nounset\n\n#config\nshaarli_base_dir='/var/www/shaarli'\naccounts='bob john whatever username'\nshaarli_repo_url='https://github.com/shaarli/Shaarli'\nref=\"master\"\n\n#clone multiple shaarli instances\nif [ ! -d \"$shaarli_base_dir\" ]; then mkdir \"$shaarli_base_dir\"; fi\n\nfor account in $accounts; do\n    if [ -d \"$shaarli_base_dir/$account\" ];\n    then echo \"[info] account $account already exists, skipping\";\n    else echo \"[info] creating new account $account ...\"; git clone --quiet \"$shaarli_repo_url\" -b \"$ref\" \"$shaarli_base_dir/$account\"; fi\ndone\n\n#generate html index of shaarlis\nhtmlhead='<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->\n<html lang=\"en\">\n    <head>\n        <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n        <title>My Shaarli farm</title>\n        <style>body {font-family: \"Open Sans\"}</style>\n    </head>\n    <body>\n    <div>\n    <h1>My Shaarli farm</h1>\n    <ul style=\"list-style-type: none;\">'\n\naccountlinks=''\n\nhtmlfooter='\n    </ul>\n    </div>\n    </body>\n</html>'    \n\n\n\nfor account in $accounts; do accountlinks=\"$accountlinks\\n<li><a href=\\\"$account\\\">$account</a></li>\"; done\nif [ -d \"$shaarli_base_dir/index.html\" ]; then echo \"[removing old index.html]\"; rm \"$shaarli_base_dir/index.html\" ]; fi\necho \"[info] generating new index of shaarlis\"\necho -e \"$htmlhead $accountlinks $htmlfooter\" > \"$shaarli_base_dir/index.html\"\necho '[info] done.'\necho \"[info] list of accounts: $accounts\"\necho \"[info] contents of $shaarli_base_dir:\"\ntree -a -L 1 \"$shaarli_base_dir\"\n\n\n\n\nThis script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like \nAnsible",
-            "title": "Create and serve multiple Shaarlis (farm)"
-        },
-        {
-            "location": "/Download-CSS-styles-from-an-OPML-list/",
-            "text": "Download CSS styles for shaarlis listed in an opml file\n\n\nExample php script:\n\n\n<!---- ?php -->\n<!---- Copyright (c) 2014 Nicolas Delsaux (https://github.com/Riduidel) -->\n<!---- License: zlib (http://www.gzip.org/zlib/zlib_license.html) -->\n\n/**\n * Source: https://github.com/Riduidel\n * Download css styles for shaarlis listed in an opml file\n */\ndefine(\"SHAARLI_RSS_OPML\", \"https://www.ecirtam.net/shaarlirss/custom/people.opml\");\n\ndefine(\"THEMES_TEMP_FOLDER\", \"new_themes\");\n\nif(!file_exists(THEMES_TEMP_FOLDER)) {\n    mkdir(THEMES_TEMP_FOLDER);\n}\n\nfunction siteUrl($pathInSite) {\n    $indexPos = strpos($pathInSite, \"index.php\");\n    if(!$indexPos) {\n        return $pathInSite;\n    } else {\n        return substr($pathInSite, 0, $indexPos);\n    }\n}\n\nfunction createShaarliHashFromOPMLL($opmlFile) {\n    $result = array();\n    $opml = file_get_contents($opmlFile);\n    $opmlXml = simplexml_load_string($opml);\n    $outlineElements = $opmlXml->xpath(\"body/outline\");\n    foreach($outlineElements as $site) {\n        $siteUrl = siteUrl((string) $site['htmlUrl']);\n        $result[$siteUrl]=((string) $site['text']);\n    }\n    return $result;\n}\n\nfunction getSiteFolder($url) {\n    $domain = parse_url($url,  PHP_URL_HOST);\n    return THEMES_TEMP_FOLDER.\"/\".str_replace(\".\", \"_\", $domain);\n}\n\nfunction get_http_response_code($theURL) {\n     $headers = get_headers($theURL);\n     return substr($headers[0], 9, 3);\n}\n\n/**\n * This makes the code PHP-5 only (particularly the call to \"get_headers\")\n */\nfunction copyUserStyleFrom($url, $name, $knownStyles) {\n    $userStyle = $url.\"inc/user.css\";\n    if(in_array($url, $knownStyles)) {\n        // TODO add log message\n    } else {\n        $statusCode = get_http_response_code($userStyle);\n        if(intval($statusCode)<300) {\n            $styleSheet = file_get_contents($userStyle);\n            $siteFolder = getSiteFolder($url);\n            if(!file_exists($siteFolder)) {\n                mkdir($siteFolder);\n            }\n            if(!file_exists($siteFolder.'/user.css')) {\n                // Copy stylesheet\n                file_put_contents($siteFolder.'/user.css', $styleSheet);\n            }\n            if(!file_exists($siteFolder.'/README.md')) {\n                // Then write a readme.md file\n                file_put_contents($siteFolder.'/README.md', \n                    \"User style from \".$name.\"\\n\"\n                    .\"=============================\"\n                    .\"\\n\\n\"\n                    .\"This stylesheet was downloaded from \".$userStyle.\" on \".date(DATE_RFC822)\n                    );\n            }\n            if(!file_exists($siteFolder.'/config.ini')) {\n                // Write a config file containing useful informations\n                file_put_contents($siteFolder.'/config.ini', \n                    \"site_url=\".$url.\"\\n\"\n                    .\"site_name=\".$name.\"\\n\"\n                    );\n            }\n            if(!file_exists($siteFolder.'/home.png')) {\n                // And finally copy generated thumbnail\n                $homeThumb = $siteFolder.'/home.png';\n                file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));\n            }\n            echo 'Theme have been downloaded from  <a href=\"'.$url.'\">'.$url.'</a> into '.$siteFolder\n                .'. It looks like <img src=\"'.$homeThumb.'\"><br/>';\n        }\n    }\n}\n\nfunction getThumbnailUrl($url) {\n    return 'http://api.webthumbnail.org/?url='.$url;\n}\n\nfunction copyUserStylesFrom($urlToNames, $knownStyles) {\n    foreach($urlToNames as $url => $name) {\n        copyUserStyleFrom($url, $name, $knownStyles);\n    }\n}\n\n/**\n * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/\n * @param directory the directory we want to list files of\n * @return a simple array containing the list of absolute file paths. Notice that current file (\".\") and parent one(\"..\")\n * are not listed here\n */\nfunction getDirectoryList ($directory)  {\n    $realPath = realpath($directory);\n    // create an array to hold directory list\n    $results = array();\n    // create a handler for the directory\n    $handler = opendir($directory);\n    // open directory and walk through the filenames\n    while ($file = readdir($handler)) {\n        // if file isn't this directory or its parent, add it to the results\n        if ($file != \".\" && $file != \"..\") {\n            $results[] = realpath($realPath . \"/\" . $file);\n        }\n    }\n    // tidy up: close the handler\n    closedir($handler);\n    // done!\n    return $results;\n}\n\n/**\n * Start in themes folder and look in all subfolders for config.ini files. \n * These config.ini files allow us not to download styles again and again\n */\nfunction findKnownStyles() {\n    $result = array();\n    $subFolders = getDirectoryList(\"themes\");\n    foreach($subFolders as $folder) {\n        $configFile = $folder.\"/config.ini\";\n        if(file_exists($configFile)) {\n            $iniParameters = parse_ini_file($configFile);\n            array_push($result, $iniParameters['site_url']);\n        }\n    }\n    return $result;\n}\n\n$knownStyles = findKnownStyles();\ncopyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);\n\n<!--- ? ---->",
-            "title": "Download CSS styles from an OPML list"
-        },
-        {
-            "location": "/Download-CSS-styles-from-an-OPML-list/#download-css-styles-for-shaarlis-listed-in-an-opml-file",
-            "text": "Example php script:  <!---- ?php -->\n<!---- Copyright (c) 2014 Nicolas Delsaux (https://github.com/Riduidel) -->\n<!---- License: zlib (http://www.gzip.org/zlib/zlib_license.html) -->\n\n/**\n * Source: https://github.com/Riduidel\n * Download css styles for shaarlis listed in an opml file\n */\ndefine(\"SHAARLI_RSS_OPML\", \"https://www.ecirtam.net/shaarlirss/custom/people.opml\");\n\ndefine(\"THEMES_TEMP_FOLDER\", \"new_themes\");\n\nif(!file_exists(THEMES_TEMP_FOLDER)) {\n    mkdir(THEMES_TEMP_FOLDER);\n}\n\nfunction siteUrl($pathInSite) {\n    $indexPos = strpos($pathInSite, \"index.php\");\n    if(!$indexPos) {\n        return $pathInSite;\n    } else {\n        return substr($pathInSite, 0, $indexPos);\n    }\n}\n\nfunction createShaarliHashFromOPMLL($opmlFile) {\n    $result = array();\n    $opml = file_get_contents($opmlFile);\n    $opmlXml = simplexml_load_string($opml);\n    $outlineElements = $opmlXml->xpath(\"body/outline\");\n    foreach($outlineElements as $site) {\n        $siteUrl = siteUrl((string) $site['htmlUrl']);\n        $result[$siteUrl]=((string) $site['text']);\n    }\n    return $result;\n}\n\nfunction getSiteFolder($url) {\n    $domain = parse_url($url,  PHP_URL_HOST);\n    return THEMES_TEMP_FOLDER.\"/\".str_replace(\".\", \"_\", $domain);\n}\n\nfunction get_http_response_code($theURL) {\n     $headers = get_headers($theURL);\n     return substr($headers[0], 9, 3);\n}\n\n/**\n * This makes the code PHP-5 only (particularly the call to \"get_headers\")\n */\nfunction copyUserStyleFrom($url, $name, $knownStyles) {\n    $userStyle = $url.\"inc/user.css\";\n    if(in_array($url, $knownStyles)) {\n        // TODO add log message\n    } else {\n        $statusCode = get_http_response_code($userStyle);\n        if(intval($statusCode)<300) {\n            $styleSheet = file_get_contents($userStyle);\n            $siteFolder = getSiteFolder($url);\n            if(!file_exists($siteFolder)) {\n                mkdir($siteFolder);\n            }\n            if(!file_exists($siteFolder.'/user.css')) {\n                // Copy stylesheet\n                file_put_contents($siteFolder.'/user.css', $styleSheet);\n            }\n            if(!file_exists($siteFolder.'/README.md')) {\n                // Then write a readme.md file\n                file_put_contents($siteFolder.'/README.md', \n                    \"User style from \".$name.\"\\n\"\n                    .\"=============================\"\n                    .\"\\n\\n\"\n                    .\"This stylesheet was downloaded from \".$userStyle.\" on \".date(DATE_RFC822)\n                    );\n            }\n            if(!file_exists($siteFolder.'/config.ini')) {\n                // Write a config file containing useful informations\n                file_put_contents($siteFolder.'/config.ini', \n                    \"site_url=\".$url.\"\\n\"\n                    .\"site_name=\".$name.\"\\n\"\n                    );\n            }\n            if(!file_exists($siteFolder.'/home.png')) {\n                // And finally copy generated thumbnail\n                $homeThumb = $siteFolder.'/home.png';\n                file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));\n            }\n            echo 'Theme have been downloaded from  <a href=\"'.$url.'\">'.$url.'</a> into '.$siteFolder\n                .'. It looks like <img src=\"'.$homeThumb.'\"><br/>';\n        }\n    }\n}\n\nfunction getThumbnailUrl($url) {\n    return 'http://api.webthumbnail.org/?url='.$url;\n}\n\nfunction copyUserStylesFrom($urlToNames, $knownStyles) {\n    foreach($urlToNames as $url => $name) {\n        copyUserStyleFrom($url, $name, $knownStyles);\n    }\n}\n\n/**\n * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/\n * @param directory the directory we want to list files of\n * @return a simple array containing the list of absolute file paths. Notice that current file (\".\") and parent one(\"..\")\n * are not listed here\n */\nfunction getDirectoryList ($directory)  {\n    $realPath = realpath($directory);\n    // create an array to hold directory list\n    $results = array();\n    // create a handler for the directory\n    $handler = opendir($directory);\n    // open directory and walk through the filenames\n    while ($file = readdir($handler)) {\n        // if file isn't this directory or its parent, add it to the results\n        if ($file != \".\" && $file != \"..\") {\n            $results[] = realpath($realPath . \"/\" . $file);\n        }\n    }\n    // tidy up: close the handler\n    closedir($handler);\n    // done!\n    return $results;\n}\n\n/**\n * Start in themes folder and look in all subfolders for config.ini files. \n * These config.ini files allow us not to download styles again and again\n */\nfunction findKnownStyles() {\n    $result = array();\n    $subFolders = getDirectoryList(\"themes\");\n    foreach($subFolders as $folder) {\n        $configFile = $folder.\"/config.ini\";\n        if(file_exists($configFile)) {\n            $iniParameters = parse_ini_file($configFile);\n            array_push($result, $iniParameters['site_url']);\n        }\n    }\n    return $result;\n}\n\n$knownStyles = findKnownStyles();\ncopyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);\n\n<!--- ? ---->",
-            "title": "Download CSS styles for shaarlis listed in an opml file"
-        },
-        {
-            "location": "/Datastore-hacks/",
-            "text": "Decode datastore content\n\n\nTo display the array representing the data saved in \ndata/datastore.php\n, use the following snippet:\n\n\n$data = \"tZNdb9MwFIb... <Commented content inside datastore.php>\";\n$out = unserialize(gzinflate(base64_decode($data)));\necho \"<pre>\"; // Pretty printing is love, pretty printing is life\nprint_r($out);\necho \"</pre>\";\nexit;\n\n\n\n\nThis will output the internal representation of the datastore, \"unobfuscated\" (if this can really be considered obfuscation).\n\n\nAlternatively, you can transform to JSON format (and pretty-print if you have \njq\n installed):\n\n\nphp -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(\"!.*/\\* (.+) \\*/.*!\", \"$1\", file_get_contents(\"data/datastore.php\")))))));' | jq .\n\n\n\n\nChanging the timestamp for a link\n\n\n\n\nLook for \n<input type=\"hidden\" name=\"lf_linkdate\" value=\"{$link.linkdate}\">\n in \ntpl/editlink.tpl\n (line 14)\n\n\nReplace \ntype=\"hidden\"\n with \ntype=\"text\"\n from this line\n\n\nA new date/time field becomes available in the edit/new link dialog.\n\n\nYou can set the timestamp manually by entering it in the format \nYYYMMDD_HHMMS\n.",
-            "title": "Datastore hacks"
-        },
-        {
-            "location": "/Datastore-hacks/#decode-datastore-content",
+            "location": "/Various-hacks/#decode-datastore-content",
             "text": "To display the array representing the data saved in  data/datastore.php , use the following snippet:  $data = \"tZNdb9MwFIb... <Commented content inside datastore.php>\";\n$out = unserialize(gzinflate(base64_decode($data)));\necho \"<pre>\"; // Pretty printing is love, pretty printing is life\nprint_r($out);\necho \"</pre>\";\nexit;  This will output the internal representation of the datastore, \"unobfuscated\" (if this can really be considered obfuscation).  Alternatively, you can transform to JSON format (and pretty-print if you have  jq  installed):  php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(\"!.*/\\* (.+) \\*/.*!\", \"$1\", file_get_contents(\"data/datastore.php\")))))));' | jq .",
             "title": "Decode datastore content"
         },
         {
-            "location": "/Datastore-hacks/#changing-the-timestamp-for-a-link",
+            "location": "/Various-hacks/#changing-the-timestamp-for-a-shaare",
             "text": "Look for  <input type=\"hidden\" name=\"lf_linkdate\" value=\"{$link.linkdate}\">  in  tpl/editlink.tpl  (line 14)  Replace  type=\"hidden\"  with  type=\"text\"  from this line  A new date/time field becomes available in the edit/new link dialog.  You can set the timestamp manually by entering it in the format  YYYMMDD_HHMMS .",
-            "title": "Changing the timestamp for a link"
+            "title": "Changing the timestamp for a shaare"
+        },
+        {
+            "location": "/Various-hacks/#see-also",
+            "text": "Add a new custom field to shaares (example patch)  Download CSS styles for shaarlis listed in an opml file  Copy an existing Shaarli installation over SSH, and serve it locally  Create multiple Shaarli instances, generate an HTML index of them",
+            "title": "See also"
         },
         {
             "location": "/Troubleshooting/",
index b492b8bd0bc44ca987d87fca9b9ba337210d6df9..49541cda6764b87992c107746f822c9a4a60a76c 100644 (file)
                 </li>
                 <li class="">
                     
-    <a class="" href="Copy-an-existing-installation-over-SSH-and-serve-it-locally/">Copy an existing installation over SSH and serve it locally</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="Create-and-serve-multiple-Shaarlis-(farm)/">Create and serve multiple Shaarlis (farm)</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="Download-CSS-styles-from-an-OPML-list/">Download CSS styles from an OPML list</a>
-                </li>
-                <li class="">
-                    
-    <a class="" href="Datastore-hacks/">Datastore hacks</a>
+    <a class="" href="Various-hacks/">Various hacks</a>
                 </li>
     </ul>
            </li>
index 534f02b567b7a1b71ead37a36ccc7a73fc0c077e..2a1b009e3b4e177347454471e9131f1a1cfe913f 100644 (file)
     </url>
         
     <url>
-     <loc>/Copy-an-existing-installation-over-SSH-and-serve-it-locally/</loc>
-     <lastmod>2017-06-18</lastmod>
-     <changefreq>daily</changefreq>
-    </url>
-        
-    <url>
-     <loc>/Create-and-serve-multiple-Shaarlis-(farm)/</loc>
-     <lastmod>2017-06-18</lastmod>
-     <changefreq>daily</changefreq>
-    </url>
-        
-    <url>
-     <loc>/Download-CSS-styles-from-an-OPML-list/</loc>
-     <lastmod>2017-06-18</lastmod>
-     <changefreq>daily</changefreq>
-    </url>
-        
-    <url>
-     <loc>/Datastore-hacks/</loc>
+     <loc>/Various-hacks/</loc>
      <lastmod>2017-06-18</lastmod>
      <changefreq>daily</changefreq>
     </url>
index ad62c2f06ed8add4a0b3022687b784f4ea41ef7d..35707482a5399677a254335dcf371897af8b38bd 100644 (file)
@@ -20,4 +20,4 @@ To search for links that are not tagged, enter `""` in the tag search field.
 
 ## Filtering RSS feeds/Picture wall
 
-RSS feeds can also be restricted to only return items matching a text/tag search: see [[RSS feeds]].
+RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS feeds).
index 6ff7ed459b6ea04743f996ee481232623f9159cd..b8b7cccd439eaa7ad00e5d60c15ed8df361c71d3 100644 (file)
@@ -34,7 +34,7 @@ _TODO: contact repos owners to see if they'd like to standardize their work with
 
 
 ### Themes
-See [[Theming]] for the list of community-contributed themes, and an installation guide.
+See [Theming](Theming) for the list of community-contributed themes, and an installation guide.
 
 ### Server apps
 - [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
index 30dc474d7162296177233de02f3eaa0762677ae3..849257f70c486e0f8da335f805c32cd7a751025c 100644 (file)
@@ -1,20 +1,20 @@
 ## Local development
 A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:
 - Documentation - generate a local HTML copy of the GitHub wiki
-- [[Static analysis]] - check that the code is compliant to PHP conventions
-- [[Unit tests]] - ensure there are no regressions introduced by new commits
+- [Static analysis](Static analysis) - check that the code is compliant to PHP conventions
+- [Unit tests](Unit tests) - ensure there are no regressions introduced by new commits
 
 ## Automatic builds
 [Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:
 - each time a commit is merged to the mainline (`master` branch)
 - each time a Pull Request is submitted or updated
 
-A build is composed of several jobs: one for each supported PHP version (see [[Server requirements]]).
+A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server requirements)).
 
 Each build job:
 - updates Composer
 - installs 3rd-party test dependencies with Composer
-- runs [[Unit tests]]
+- runs [Unit tests](Unit tests)
 
 After all jobs have finished, Travis returns the results to GitHub:
 - a status icon represents the result for the `master` branch: [![](https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli)
index 1480ec89860387690b88a39d327c48a5b79776fb..3a24876721f1c9ec1dcd4c71f5b8ca403eea6fc2 100644 (file)
@@ -2,8 +2,8 @@
 
 Please have a look at the following pages:
 - [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)
-- [[Static analysis]] - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
+- [Static analysis](Static analysis) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
     - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard
     - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide
-- [[Unit tests]]
-- [[GnuPG signature]] for tags/releases
+- [Unit tests](Unit tests)
+- [GnuPG signature](GnuPG signature) for tags/releases
index 9ba57b04e753447d789293bcc95143e8f72890d4..595b94009cec20ed54244e7717079d7312ea23cf 100644 (file)
@@ -8,7 +8,7 @@
 ### Sharing links using Firefox share
 
  * Add the sharing service as described above
- * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [[images/firefoxshare.png]]
+ * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
  * You can edit your link before and after saving, just like the bookmarklet above.
 
 |     | Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection) enabled server for Firefox Share to work. Firefox Share will not work over plain HTTP connections. |
index 1fb3b42f6ab2e96c05442733a49cb823ffb19bc4..62a17d33b5e441bc7735d6363225e0ee6e69d21d 100644 (file)
@@ -73,4 +73,4 @@ gpg: sending key A9D53A3E to hkp server pgp.mit.edu
 
 ## Create and push a GPG-signed tag
 
-See [[Release Shaarli]].
+See [Release Shaarli](Release Shaarli).
index ae68db383a20b66218eee19405beba2636e3647b..d72c2ffd52dae969adcd71564814fa84b0cd01d2 100644 (file)
@@ -15,7 +15,7 @@ This file allows overriding rules defined in the template CSS files (only add ch
 
 **Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
 
-See also [[Download CSS styles from an OPML list]]
+See also [Download CSS styles from an OPML list](Download CSS styles from an OPML list)
 
 ## Themes
 
@@ -77,7 +77,7 @@ Get config written:
 - fill the install form
 - log in to Shaarli
 
-Edit Shaarli's [[configuration|Shaarli configuration]]:
+Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli configuration):
 ```bash
 # the file should be owned by Apache, thus not writeable => sudo
 $ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
index 7348891f31176e90f1357d5b00938d11de02b6c5..2002a4e21531bb272af26d04ab1569cd09a46a36 100644 (file)
@@ -13,7 +13,7 @@ Shaarli stores all user data under the `data` directory:
 - `data/ipbans.php` - banned IP addresses
 - `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
 
-See [[Shaarli configuration]] for more information about Shaarli resources.
+See [Shaarli configuration](Shaarli configuration) for more information about Shaarli resources.
 
 It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
 - users with SSH access: copy or archive the directory to a temporary location
@@ -25,7 +25,7 @@ As all user data is kept under `data`, this is the only directory you need to wo
 
 - backup the `data` directory
 - install or update Shaarli:
-    - fresh installation - see [[Download and installation]]
+    - fresh installation - see [Download and installation](Download and installation)
     - update - see the following sections
 - check or restore the `data` directory
 
@@ -33,11 +33,11 @@ As all user data is kept under `data`, this is the only directory you need to wo
 
 All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.
 
-We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [[Download and installation]] for `git` complete instructions.
+We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [Download and installation](Download and installation) for `git` complete instructions.
 
 Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
 
-After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [[Shaarli configuration]] for more details).
+After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [Shaarli configuration](Shaarli configuration) for more details).
 
 ## Upgrading with Git
 
@@ -170,7 +170,7 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to
 
 #### Step 3: configuration
 
-After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [[Shaarli configuration]] for more details).
+After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli configuration) for more details).
 
 ## Troubleshooting