Bump version to v0.8.0

Signed-off-by: ArthurHoaro <arthur@hoa.ro>
This commit is contained in:
ArthurHoaro 2016-10-12 12:36:59 +02:00
parent dc8e03bfc4
commit fdf88d1948
60 changed files with 1414 additions and 976 deletions

View file

@ -15,13 +15,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -36,7 +36,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -60,7 +59,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
@ -81,6 +79,7 @@ <h2 id="javascript">Javascript</h2>
</ul>
<h2 id="php">PHP</h2>
<ul>
<li><a href="https://github.com/shaarli/netscape-bookmark-parser">shaarli/netscape-bookmark-parser</a> - Netscape bookmark parser<a href=".html"></a></li>
<li><a href="https://github.com/rainphp/raintpl">RainTPL</a> - HTML templating for PHP<a href=".html"></a></li>
</ul>
</body>

View file

@ -10,4 +10,5 @@
- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation[](.html)
## PHP
- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser[](.html)
- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP[](.html)

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -73,7 +73,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -97,15 +96,21 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
<h1 id="backup-restore-import-and-export">Backup, restore, import and export</h1>
<ul>
<li><a href="#backup-and-restore-the-datastore-file">Backup and restore the datastore file</a><a href=".html"></a></li>
<li><a href="#export-links-as">Export links as...</a><a href=".html"></a></li>
<li><a href="#import-links-from">Import links from...</a><a href=".html"></a></li>
<li><a href="#import-shaarli-links-to-firefox">Import Shaarli links to Firefox</a><a href=".html"></a></li>
</ul>
<hr />
<h2 id="backup-and-restore-the-datastore-file">Backup and restore the datastore file</h2>
<p>Backup the file <code>data/datastore.php</code> (by FTP or SSH). Restore by putting the file back in place.</p>
<p>Example command:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="kw">rsync</span> -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-<span class="ot">$(</span><span class="kw">date</span> +%Y-%m-%d_%H%M<span class="ot">)</span>.php</code></pre></div>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">rsync</span> -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-<span class="va">$(</span><span class="fu">date</span> +%Y-%m-%d_%H%M<span class="va">)</span>.php</code></pre></div>
<h2 id="export-links-as...">Export links as...</h2>
<p>To export links as an HTML file, under <em>Tools &gt; Export</em>, choose:</p>
<ul>
@ -118,7 +123,7 @@ <h2 id="export-links-as...">Export links as...</h2>
<li>This can be done using the <a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> tool.<a href=".html"></a></li>
</ul>
<p>Example command:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="kw">./export-bookmarks.py</span> --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all</code></pre></div>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">./export-bookmarks.py</span> --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all</code></pre></div>
<h2 id="import-links-from...">Import links from...</h2>
<h3 id="diigo">Diigo</h3>
<p>If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.)</p>
@ -126,5 +131,20 @@ <h3 id="mister-wong">Mister Wong</h3>
<p>See <a href="https://github.com/sebsauvage/Shaarli/issues/146">this issue</a> for import tweaks.<a href=".html"></a></p>
<h3 id="semanticscuttle">SemanticScuttle</h3>
<p>To correctly import the tags from a <a href="http://semanticscuttle.sourceforge.net/">SemanticScuttle</a> HTML export, edit the HTML file before importing and replace all occurences of <code>tags=</code> (lowercase) to <code>TAGS=</code> (uppercase).<a href=".html"></a></p>
<h3 id="scuttle">Scuttle</h3>
<p>Shaarli cannot import data directly from <a href="https://github.com/scronide/scuttle">Scuttle</a>. However, you can use this third party tool: <a href="https://github.com/q2apro/scuttle-to-shaarli" class="uri">https://github.com/q2apro/scuttle-to-shaarli</a> to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.<a href=".html"></a></p>
<h2 id="import-shaarli-links-to-firefox">Import Shaarli links to Firefox</h2>
<ul>
<li>Export your Shaarli links as described above.</li>
<li>For compatibility reasons, check <code>Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)</code></li>
<li>In Firefox, open the bookmark manager (not the sidebar! <code>Bookmarks menu &gt; Show all bookmarks</code> or <code>Ctrl+Shift+B</code>)</li>
<li>Select <code>Import and Backup &gt; Import bookmarks in HTML format</code></li>
</ul>
<p>Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. &quot;Self&quot; (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time.</p>
<p>You may be interested in these Firefox addons to manage links imported from Shaarli</p>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/">Bookmark Deduplicator</a> - provides an easy way to deduplicate your bookmarks<a href=".html"></a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/tagsieve/">TagSieve</a> - browse your bookmarks by their tags<a href=".html"></a></li>
</ul>
</body>
</html>

View file

@ -1,4 +1,12 @@
#Backup, restore, import and export
* [Backup and restore the datastore file](#backup-and-restore-the-datastore-file)[](.html)
* [Export links as...](#export-links-as)[](.html)
* [Import links from...](#import-links-from)[](.html)
* [Import Shaarli links to Firefox](#import-shaarli-links-to-firefox)[](.html)
----------------------
## Backup and restore the datastore file
Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place.
@ -9,6 +17,7 @@ rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +
```
## Export links as...
To export links as an HTML file, under _Tools > Export_, choose:
- _Export all_ to export both public and private links
- _Export public_ to export public links only
@ -23,13 +32,35 @@ Example command:
```
## Import links from...
### Diigo
If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.)
### Mister Wong
See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.[](.html)
### SemanticScuttle
To correctly import the tags from a [SemanticScuttle](http://semanticscuttle.sourceforge.net/) HTML export, edit the HTML file before importing and replace all occurences of `tags=` (lowercase) to `TAGS=` (uppercase).[](.html)
### Scuttle
Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/scuttle). However, you can use this third party tool: https://github.com/q2apro/scuttle-to-shaarli to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.[](.html)
## Import Shaarli links to Firefox
* Export your Shaarli links as described above.
* For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
* In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
* Select `Import and Backup > Import bookmarks in HTML format`
Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. "Self" (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time.
You may be interested in these Firefox addons to manage links imported from Shaarli
* [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks[](.html)
* [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags[](.html)

View file

@ -15,13 +15,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -36,7 +36,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -60,7 +59,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>

View file

@ -15,13 +15,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -36,7 +36,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -60,7 +59,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>

View file

@ -15,13 +15,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -36,7 +36,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -60,7 +59,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
@ -84,8 +82,9 @@ <h3 id="third-party-plugins">Third party plugins</h3>
<li><a href="https://github.com/kalvn/shaarli-plugin-autosave">autosave</a> by <a href="https://github.com/kalvn">@kalvn</a>: Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.<a href=".html"></a></li>
<li><a href="https://github.com/ArthurHoaro/code-coloration">Code Coloration</a> by <a href="https://github.com/ArthurHoaro">@ArthurHoaro</a>: client side code syntax highlighter.<a href=".html"></a></li>
<li><a href="https://github.com/alexisju/social">social</a> by <a href="https://github.com/alexisju">@alexisju</a>: share links to social networks.<a href=".html"></a></li>
<li><a href="https://github.com/NerosTie/emojione">emojione</a> by <a href="https://github.com/NerosTie/emojione">@NerosTie</a>: Add colorful emojis to your Shaarli.<a href=".html"></a></li>
<li><a href="https://github.com/NerosTie/emojione">emojione</a> by <a href="https://github.com/NerosTie">@NerosTie</a>: Add colorful emojis to your Shaarli.<a href=".html"></a></li>
<li><a href="https://github.com/ArthurHoaro/launch-plugin">launch</a> - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.<a href=".html"></a></li>
<li><a href="https://github.com/kalvn/shaarli-plugin-disqus">Disqus</a> by <a href="https://github.com/kalvn">@kalvn</a>: Adds Disqus comment system to your Shaarli.<a href=".html"></a></li>
</ul>
<h3 id="themes">Themes</h3>
<p>See <a href="Theming.html">Theming</a> for the list of community-contributed themes, and an installation guide.</p>

View file

@ -21,8 +21,9 @@ _TODO: contact repos owners to see if they'd like to standardize their work with
* [autosave](https://github.com/kalvn/shaarli-plugin-autosave) by [@kalvn](https://github.com/kalvn): Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.[](.html)
* [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.[](.html)
* [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.[](.html)
* [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie/emojione): Add colorful emojis to your Shaarli.[](.html)
* [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.[](.html)
* [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.[](.html)
* [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.[](.html)
### Themes

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -73,7 +73,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -97,7 +96,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
@ -111,55 +109,55 @@ <h1 id="copy-an-existing-installation-over-ssh-and-serve-it-locally">Copy an exi
<span class="co">#Usage: ./local-shaarli.sh</span>
<span class="co">#Author: nodiscc (nodiscc@gmail.com)</span>
<span class="co">#License: MIT (http://opensource.org/licenses/MIT)</span>
<span class="kw">set</span> <span class="kw">-o</span> errexit
<span class="kw">set</span> <span class="kw">-o</span> nounset
<span class="kw">set</span> <span class="ex">-o</span> errexit
<span class="kw">set</span> <span class="ex">-o</span> nounset
<span class="co">##### CONFIG #################</span>
<span class="co">#The port used by php&#39;s local server</span>
<span class="ot">php_local_port=</span>7431
<span class="va">php_local_port=</span>7431
<span class="co">#Name of the SSH server and path where Shaarli is installed</span>
<span class="co">#TODO: pass these as command-line arguments</span>
<span class="ot">remotehost=</span><span class="st">&quot;my.ssh.server&quot;</span>
<span class="ot">remote_shaarli_dir=</span><span class="st">&quot;/var/www/shaarli&quot;</span>
<span class="va">remotehost=</span><span class="st">&quot;my.ssh.server&quot;</span>
<span class="va">remote_shaarli_dir=</span><span class="st">&quot;/var/www/shaarli&quot;</span>
<span class="co">###### FUNCTIONS #############</span>
<span class="fu">_main()</span> <span class="kw">{</span>
<span class="kw">_CBSyncShaarli</span>
<span class="kw">_CBServeShaarli</span>
<span class="ex">_CBSyncShaarli</span>
<span class="ex">_CBServeShaarli</span>
<span class="kw">}</span>
<span class="fu">_CBSyncShaarli()</span> <span class="kw">{</span>
<span class="ot">remote_temp_dir=$(</span><span class="kw">ssh</span> <span class="ot">$remotehost</span> mktemp -d<span class="ot">)</span>
<span class="ot">remote_ssh_user=$(</span><span class="kw">ssh</span> <span class="ot">$remotehost</span> whoami<span class="ot">)</span>
<span class="kw">ssh</span> -t <span class="st">&quot;</span><span class="ot">$remotehost</span><span class="st">&quot;</span> sudo cp -r <span class="st">&quot;</span><span class="ot">$remote_shaarli_dir</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="ot">$remote_temp_dir</span><span class="st">&quot;</span>
<span class="kw">ssh</span> -t <span class="st">&quot;</span><span class="ot">$remotehost</span><span class="st">&quot;</span> sudo chown -R <span class="st">&quot;</span><span class="ot">$remote_ssh_user</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="ot">$remote_ssh_user</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="ot">$remote_temp_dir</span><span class="st">&quot;</span>
<span class="kw">scp</span> -rq <span class="st">&quot;</span><span class="ot">$remotehost</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="ot">$remote_temp_dir</span><span class="st">&quot;</span> local-shaarli
<span class="kw">ssh</span> <span class="st">&quot;</span><span class="ot">$remotehost</span><span class="st">&quot;</span> rm -r <span class="st">&quot;</span><span class="ot">$remote_temp_dir</span><span class="st">&quot;</span>
<span class="va">remote_temp_dir=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> mktemp -d<span class="va">)</span>
<span class="va">remote_ssh_user=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> whoami<span class="va">)</span>
<span class="fu">ssh</span> -t <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> sudo cp -r <span class="st">&quot;</span><span class="va">$remote_shaarli_dir</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
<span class="fu">ssh</span> -t <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> sudo chown -R <span class="st">&quot;</span><span class="va">$remote_ssh_user</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="va">$remote_ssh_user</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
<span class="fu">scp</span> -rq <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span> local-shaarli
<span class="fu">ssh</span> <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> rm -r <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
<span class="kw">}</span>
<span class="fu">_CBServeShaarli()</span> <span class="kw">{</span>
<span class="co">#TODO: allow serving a previously downloaded Shaarli</span>
<span class="co">#TODO: ask before overwriting local copy, if it exists</span>
<span class="kw">cd</span> local-shaarli/
<span class="kw">php</span> -S localhost:<span class="ot">${php_local_port}</span>
<span class="kw">echo</span> <span class="st">&quot;Please go to http://localhost:</span><span class="ot">${php_local_port}</span><span class="st">&quot;</span>
<span class="bu">cd</span> local-shaarli/
<span class="ex">php</span> -S localhost:<span class="va">${php_local_port}</span>
<span class="bu">echo</span> <span class="st">&quot;Please go to http://localhost:</span><span class="va">${php_local_port}</span><span class="st">&quot;</span>
<span class="kw">}</span>
<span class="co">##### MAIN #################</span>
<span class="kw">_main</span></code></pre></div>
<span class="ex">_main</span></code></pre></div>
<p>This outputs:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">./local-shaarli.sh</span>
<span class="kw">PHP</span> 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
<span class="kw">Listening</span> on http://localhost:7431
<span class="kw">Document</span> root is /home/user/local-shaarli/shaarli
<span class="kw">Press</span> Ctrl-C to quit.
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">./local-shaarli.sh</span>
<span class="ex">PHP</span> 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
<span class="ex">Listening</span> on http://localhost:7431
<span class="ex">Document</span> root is /home/user/local-shaarli/shaarli
<span class="ex">Press</span> Ctrl-C to quit.
[<span class="kw">Mon</span> Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
[<span class="kw">Mon</span> Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
[<span class="kw">Mon</span> Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)</code></pre></div>
[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
[<span class="ex">Mon</span> Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)</code></pre></div>
</body>
</html>

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -73,7 +73,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -97,33 +96,32 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
<h1 id="create-and-serve-multiple-shaarlis-farm">Create and serve multiple Shaarlis (farm)</h1>
<p>Example bash script (creates multiple shaarli instances and generates an HTML index of them)</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
<span class="kw">set</span> <span class="kw">-o</span> errexit
<span class="kw">set</span> <span class="kw">-o</span> nounset
<span class="kw">set</span> <span class="ex">-o</span> errexit
<span class="kw">set</span> <span class="ex">-o</span> nounset
<span class="co">#config</span>
<span class="ot">shaarli_base_dir=</span><span class="st">&#39;/var/www/shaarli&#39;</span>
<span class="ot">accounts=</span><span class="st">&#39;bob john whatever username&#39;</span>
<span class="ot">shaarli_repo_url=</span><span class="st">&#39;https://github.com/shaarli/Shaarli&#39;</span>
<span class="ot">ref=</span><span class="st">&quot;master&quot;</span>
<span class="va">shaarli_base_dir=</span><span class="st">&#39;/var/www/shaarli&#39;</span>
<span class="va">accounts=</span><span class="st">&#39;bob john whatever username&#39;</span>
<span class="va">shaarli_repo_url=</span><span class="st">&#39;https://github.com/shaarli/Shaarli&#39;</span>
<span class="va">ref=</span><span class="st">&quot;master&quot;</span>
<span class="co">#clone multiple shaarli instances</span>
<span class="kw">if [</span> <span class="ot">!</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">&quot;</span><span class="kw"> ]</span>; <span class="kw">then</span> <span class="kw">mkdir</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(.html)</span>
<span class="kw">if</span><span class="bu"> [</span> <span class="ot">!</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span><span class="bu"> ]</span>; <span class="kw">then</span> <span class="fu">mkdir</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
<span class="kw">for</span> <span class="kw">account</span> in <span class="ot">$accounts</span><span class="kw">;</span> <span class="kw">do</span>
<span class="kw">if [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">/</span><span class="ot">$account</span><span class="st">&quot;</span><span class="kw"> ]</span>;[]<span class="kw">(.html)</span>
<span class="kw">then</span> <span class="kw">echo</span> <span class="st">&quot;[info] account </span><span class="ot">$account</span><span class="st"> already exists, skipping&quot;</span><span class="kw">;</span>[]<span class="kw">(.html)</span>
<span class="kw">else</span> <span class="kw">echo</span> <span class="st">&quot;[info] creating new account </span><span class="ot">$account</span><span class="st"> ...&quot;</span><span class="kw">;</span> <span class="kw">git</span> clone --quiet <span class="st">&quot;</span><span class="ot">$shaarli_repo_url</span><span class="st">&quot;</span> -b <span class="st">&quot;</span><span class="ot">$ref</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">/</span><span class="ot">$account</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(.html)</span>
<span class="kw">for</span> <span class="ex">account</span> in <span class="va">$accounts</span><span class="kw">;</span> <span class="kw">do</span>
<span class="kw">if</span><span class="bu"> [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/</span><span class="va">$account</span><span class="st">&quot;</span><span class="bu"> ]</span>;[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
<span class="kw">then</span> <span class="bu">echo</span> <span class="st">&quot;[info] account </span><span class="va">$account</span><span class="st"> already exists, skipping&quot;</span><span class="kw">;</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
<span class="kw">else</span> <span class="bu">echo</span> <span class="st">&quot;[info] creating new account </span><span class="va">$account</span><span class="st"> ...&quot;</span><span class="kw">;</span> <span class="fu">git</span> clone --quiet <span class="st">&quot;</span><span class="va">$shaarli_repo_url</span><span class="st">&quot;</span> -b <span class="st">&quot;</span><span class="va">$ref</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/</span><span class="va">$account</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
<span class="kw">done</span>
<span class="co">#generate html index of shaarlis</span>
<span class="ot">htmlhead=</span><span class="st">&#39;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
<span class="va">htmlhead=</span><span class="st">&#39;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
<span class="st">&lt;!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ --&gt;</span>
<span class="st">&lt;html lang=&quot;en&quot;&gt;</span>
<span class="st"> &lt;head&gt;</span>
@ -136,9 +134,9 @@ <h1 id="create-and-serve-multiple-shaarlis-farm">Create and serve multiple Shaar
<span class="st"> &lt;h1&gt;My Shaarli farm&lt;/h1&gt;</span>
<span class="st"> &lt;ul style=&quot;list-style-type: none;&quot;&gt;&#39;</span>
<span class="ot">accountlinks=</span><span class="st">&#39;&#39;</span>
<span class="va">accountlinks=</span><span class="st">&#39;&#39;</span>
<span class="ot">htmlfooter=</span><span class="st">&#39;</span>
<span class="va">htmlfooter=</span><span class="st">&#39;</span>
<span class="st"> &lt;/ul&gt;</span>
<span class="st"> &lt;/div&gt;</span>
<span class="st"> &lt;/body&gt;</span>
@ -146,14 +144,14 @@ <h1 id="create-and-serve-multiple-shaarlis-farm">Create and serve multiple Shaar
<span class="kw">for</span> <span class="kw">account</span> in <span class="ot">$accounts</span><span class="kw">;</span> <span class="kw">do</span> <span class="ot">accountlinks=</span><span class="st">&quot;</span><span class="ot">$accountlinks</span><span class="st">\n&lt;li&gt;&lt;a href=</span><span class="dt">\&quot;</span><span class="ot">$account</span><span class="dt">\&quot;</span><span class="st">&gt;</span><span class="ot">$account</span><span class="st">&lt;/a&gt;&lt;/li&gt;&quot;</span>; <span class="kw">done</span>
<span class="kw">if [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">/index.html&quot;</span><span class="kw"> ]</span>; <span class="kw">then</span> <span class="kw">echo</span> <span class="st">&quot;[removing old index.html]&quot;</span><span class="kw">;</span> <span class="kw">rm</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">/index.html&quot;</span> ]<span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(.html)</span>
<span class="kw">echo</span> <span class="st">&quot;[info] generating new index of shaarlis&quot;</span>[](.html)
<span class="kw">echo</span> -e <span class="st">&quot;</span><span class="ot">$htmlhead</span><span class="st"> </span><span class="ot">$accountlinks</span><span class="st"> </span><span class="ot">$htmlfooter</span><span class="st">&quot;</span> <span class="kw">&gt;</span> <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">/index.html&quot;</span>
<span class="kw">echo</span> <span class="st">&#39;[info] done.&#39;</span>[](.html)
<span class="kw">echo</span> <span class="st">&quot;[info] list of accounts: </span><span class="ot">$accounts</span><span class="st">&quot;</span>[](.html)
<span class="kw">echo</span> <span class="st">&quot;[info] contents of </span><span class="ot">$shaarli_base_dir</span><span class="st">:&quot;</span>[](.html)
<span class="kw">tree</span> -a -L 1 <span class="st">&quot;</span><span class="ot">$shaarli_base_dir</span><span class="st">&quot;</span></code></pre></div>
<span class="kw">for</span> <span class="ex">account</span> in <span class="va">$accounts</span><span class="kw">;</span> <span class="kw">do</span> <span class="va">accountlinks=</span><span class="st">&quot;</span><span class="va">$accountlinks</span><span class="st">\n&lt;li&gt;&lt;a href=</span><span class="dt">\&quot;</span><span class="va">$account</span><span class="dt">\&quot;</span><span class="st">&gt;</span><span class="va">$account</span><span class="st">&lt;/a&gt;&lt;/li&gt;&quot;</span>; <span class="kw">done</span>
<span class="kw">if</span><span class="bu"> [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span><span class="bu"> ]</span>; <span class="kw">then</span> <span class="bu">echo</span> <span class="st">&quot;[removing old index.html]&quot;</span><span class="kw">;</span> <span class="fu">rm</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span> ]<span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
<span class="bu">echo</span> <span class="st">&quot;[info] generating new index of shaarlis&quot;</span>[](.html)
<span class="bu">echo</span> -e <span class="st">&quot;</span><span class="va">$htmlhead</span><span class="st"> </span><span class="va">$accountlinks</span><span class="st"> </span><span class="va">$htmlfooter</span><span class="st">&quot;</span> <span class="op">&gt;</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span>
<span class="bu">echo</span> <span class="st">&#39;[info] done.&#39;</span>[](.html)
<span class="bu">echo</span> <span class="st">&quot;[info] list of accounts: </span><span class="va">$accounts</span><span class="st">&quot;</span>[](.html)
<span class="bu">echo</span> <span class="st">&quot;[info] contents of </span><span class="va">$shaarli_base_dir</span><span class="st">:&quot;</span>[](.html)
<span class="ex">tree</span> -a -L 1 <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span></code></pre></div>
<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><a href=".html"></a></p>
</body>
</html>

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -73,7 +73,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -97,7 +96,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>

View file

@ -15,13 +15,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -36,7 +36,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -60,7 +59,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -73,7 +73,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -97,39 +96,38 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
<h1 id="directory-structure">Directory structure</h1>
<p>Here is the directory structure of Shaarli and the purpose of the different files:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"> <span class="kw">index.php</span> <span class="co"># Main program</span>
<span class="kw">application/</span> <span class="co"># Shaarli classes</span>
├── <span class="kw">LinkDB.php</span>
└── <span class="kw">Utils.php</span>
<span class="kw">tests/</span> <span class="co"># Shaarli unitary &amp; functional tests</span>
├── <span class="kw">LinkDBTest.php</span>
├── <span class="kw">utils</span> <span class="co"># utilities to ease testing</span>
│ └── <span class="kw">ReferenceLinkDB.php</span>
└── <span class="kw">UtilsTest.php</span>
<span class="kw">COPYING</span> <span class="co"># Shaarli license</span>
<span class="kw">inc/</span> <span class="co"># static assets and 3rd party libraries</span>
├── <span class="kw">awesomplete.*</span> <span class="co"># tags autocompletion library</span>
├── <span class="kw">blazy.*</span> <span class="co"># picture wall lazy image loading library</span>
├── <span class="kw">shaarli.css</span>, reset.css <span class="co"># Shaarli stylesheet.</span>
├── <span class="kw">qr.*</span> <span class="co"># qr code generation library</span>
└──<span class="kw">rain.tpl.class.php</span> <span class="co"># RainTPL templating library</span>
<span class="kw">tpl/</span> <span class="co"># RainTPL templates for Shaarli. They are used to build the pages.</span>
<span class="kw">images/</span> <span class="co"># Images and icons used in Shaarli</span>
<span class="kw">data/</span> <span class="co"># data storage: bookmark database, configuration, logs, banlist…</span>
├── <span class="kw">config.php</span> <span class="co"># Shaarli configuration (login, password, timezone, title…)</span>
├── <span class="kw">datastore.php</span> <span class="co"># Your link database (compressed).</span>
├── <span class="kw">ipban.php</span> <span class="co"># IP address ban system data</span>
├── <span class="kw">lastupdatecheck.txt</span> <span class="co"># Update check timestamp file</span>
└──<span class="kw">log.txt</span> <span class="co"># login/IPban log.</span>
<span class="kw">cache/</span> <span class="co"># thumbnails cache</span>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"> <span class="ex">index.php</span> <span class="co"># Main program</span>
<span class="ex">application/</span> <span class="co"># Shaarli classes</span>
├── <span class="ex">LinkDB.php</span>
└── <span class="ex">Utils.php</span>
<span class="ex">tests/</span> <span class="co"># Shaarli unitary &amp; functional tests</span>
├── <span class="ex">LinkDBTest.php</span>
├── <span class="ex">utils</span> <span class="co"># utilities to ease testing</span>
│ └── <span class="ex">ReferenceLinkDB.php</span>
└── <span class="ex">UtilsTest.php</span>
<span class="ex">COPYING</span> <span class="co"># Shaarli license</span>
<span class="ex">inc/</span> <span class="co"># static assets and 3rd party libraries</span>
├── <span class="ex">awesomplete.*</span> <span class="co"># tags autocompletion library</span>
├── <span class="ex">blazy.*</span> <span class="co"># picture wall lazy image loading library</span>
├── <span class="ex">shaarli.css</span>, reset.css <span class="co"># Shaarli stylesheet.</span>
├── <span class="ex">qr.*</span> <span class="co"># qr code generation library</span>
└──<span class="ex">rain.tpl.class.php</span> <span class="co"># RainTPL templating library</span>
<span class="ex">tpl/</span> <span class="co"># RainTPL templates for Shaarli. They are used to build the pages.</span>
<span class="ex">images/</span> <span class="co"># Images and icons used in Shaarli</span>
<span class="ex">data/</span> <span class="co"># data storage: bookmark database, configuration, logs, banlist…</span>
├── <span class="ex">config.php</span> <span class="co"># Shaarli configuration (login, password, timezone, title…)</span>
├── <span class="ex">datastore.php</span> <span class="co"># Your link database (compressed).</span>
├── <span class="ex">ipban.php</span> <span class="co"># IP address ban system data</span>
├── <span class="ex">lastupdatecheck.txt</span> <span class="co"># Update check timestamp file</span>
└──<span class="ex">log.txt</span> <span class="co"># login/IPban log.</span>
<span class="ex">cache/</span> <span class="co"># thumbnails cache</span>
<span class="co"># This directory is automatically created. You can erase it anytime you want.</span>
<span class="kw">tmp/</span> <span class="co"># Temporary directory for compiled RainTPL templates.</span>
<span class="ex">tmp/</span> <span class="co"># Temporary directory for compiled RainTPL templates.</span>
<span class="co"># This directory is automatically created. You can erase it anytime you want.</span></code></pre></div>
</body>
</html>

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
</ul></li>
@ -73,7 +73,6 @@
<li>How To
<ul>
<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
<li><a href="Upgrade-from-original-sebsauvage/Shaarli.html">Upgrade from original sebsauvage/Shaarli</a></li>
<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
@ -97,7 +96,6 @@
<ul>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
<li><a href="TODO.html">TODO</a></li>
</ul></li>
</ul>
</div>
@ -112,18 +110,18 @@ <h3 id="basics">Basics</h3>
<p>Install <a href="https://www.docker.com/">Docker</a>, by following the instructions relevant<a href=".html"></a><br />
to your OS / distribution, and start the service.</p>
<h4 id="search-an-image-on-dockerhub">Search an image on <a href="https://hub.docker.com/">DockerHub</a><a href=".html"></a></h4>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">docker</span> search debian
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> search debian
<span class="kw">NAME</span> DESCRIPTION STARS OFFICIAL AUTOMATED
<span class="kw">ubuntu</span> Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
<span class="kw">debian</span> Debian is a Linux distribution that<span class="st">&#39;s comp... 603 [OK][](.html)</span>
<span class="ex">NAME</span> DESCRIPTION STARS OFFICIAL AUTOMATED
<span class="ex">ubuntu</span> Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
<span class="ex">debian</span> Debian is a Linux distribution that<span class="st">&#39;s comp... 603 [OK][](.html)</span>
<span class="st">google/debian 47 [OK][](.html)</span></code></pre></div>
<h4 id="show-available-tags-for-a-repository">Show available tags for a repository</h4>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">curl</span> https://index.docker.io/v1/repositories/debian/tags <span class="kw">|</span> <span class="kw">python</span> -m json.tool
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">curl</span> https://index.docker.io/v1/repositories/debian/tags <span class="kw">|</span> <span class="ex">python</span> -m json.tool
<span class="kw">%</span> Total % Received % Xferd Average Speed Time Time Time Current
<span class="kw">Dload</span> Upload Total Spent Left Speed
<span class="kw">100</span> 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433</code></pre></div>
<span class="ex">%</span> Total % Received % Xferd Average Speed Time Time Time Current
<span class="ex">Dload</span> Upload Total Spent Left Speed
<span class="ex">100</span> 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433</code></pre></div>
<p>Sample output:</p>
<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="ot">[[]</span><span class="er">(.html)</span>
<span class="fu">{</span>
@ -148,14 +146,14 @@ <h4 id="show-available-tags-for-a-repository">Show available tags for a reposito
<span class="fu">}</span>
<span class="ot">]</span></code></pre></div>
<h4 id="pull-an-image-from-dockerhub">Pull an image from DockerHub</h4>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">docker</span> pull repository[:tag][](.html)
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull repository[:tag][](.html)
$ <span class="kw">docker</span> pull debian:wheezy
<span class="kw">wheezy</span>: Pulling from debian
<span class="kw">4c8cbfd2973e</span>: Pull complete
<span class="kw">60c52dbe9d91</span>: Pull complete
<span class="kw">Digest</span>: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
<span class="kw">Status</span>: Downloaded newer image for debian:wheezy</code></pre></div>
$ <span class="ex">docker</span> pull debian:wheezy
<span class="ex">wheezy</span>: Pulling from debian
<span class="ex">4c8cbfd2973e</span>: Pull complete
<span class="ex">60c52dbe9d91</span>: Pull complete
<span class="ex">Digest</span>: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
<span class="ex">Status</span>: Downloaded newer image for debian:wheezy</code></pre></div>
<h2 id="get-and-run-a-shaarli-image">Get and run a Shaarli image</h2>
<h3 id="dockerhub-repository">DockerHub repository</h3>
<p>The images can be found in the <a href="https://hub.docker.com/r/shaarli/shaarli/"><code>shaarli/shaarli</code></a><a href=".html"></a><br />
@ -173,53 +171,53 @@ <h3 id="available-image-tags">Available image tags</h3>
<li><a href="http://nginx.org/">Nginx</a><a href=".html"></a></li>
</ul>
<h3 id="download-from-dockerhub">Download from DockerHub</h3>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">docker</span> pull shaarli/shaarli
<span class="kw">latest</span>: Pulling from shaarli/shaarli
<span class="kw">32716d9fcddb</span>: Pull complete
<span class="kw">84899d045435</span>: Pull complete
<span class="kw">4b6ad7444763</span>: Pull complete
<span class="kw">e0345ef7a3e0</span>: Pull complete
<span class="kw">5c1dd344094f</span>: Pull complete
<span class="kw">6422305a200b</span>: Pull complete
<span class="kw">7d63f861dbef</span>: Pull complete
<span class="kw">3eb97210645c</span>: Pull complete
<span class="kw">869319d746ff</span>: Already exists
<span class="kw">869319d746ff</span>: Pulling fs layer
<span class="kw">902b87aaaec9</span>: Already exists
<span class="kw">Digest</span>: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
<span class="kw">Status</span>: Downloaded newer image for shaarli/shaarli:latest</code></pre></div>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull shaarli/shaarli
<span class="ex">latest</span>: Pulling from shaarli/shaarli
<span class="ex">32716d9fcddb</span>: Pull complete
<span class="ex">84899d045435</span>: Pull complete
<span class="ex">4b6ad7444763</span>: Pull complete
<span class="ex">e0345ef7a3e0</span>: Pull complete
<span class="ex">5c1dd344094f</span>: Pull complete
<span class="ex">6422305a200b</span>: Pull complete
<span class="ex">7d63f861dbef</span>: Pull complete
<span class="ex">3eb97210645c</span>: Pull complete
<span class="ex">869319d746ff</span>: Already exists
<span class="ex">869319d746ff</span>: Pulling fs layer
<span class="ex">902b87aaaec9</span>: Already exists
<span class="ex">Digest</span>: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
<span class="ex">Status</span>: Downloaded newer image for shaarli/shaarli:latest</code></pre></div>
<h3 id="create-and-start-a-new-container-from-the-image">Create and start a new container from the image</h3>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># map the host&#39;s :8000 port to the container&#39;s :80 port</span>
$ <span class="kw">docker</span> create -p 8000:80 shaarli/shaarli
<span class="kw">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
$ <span class="ex">docker</span> create -p 8000:80 shaarli/shaarli
<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
<span class="co"># launch the container in the background</span>
$ <span class="kw">docker</span> start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
<span class="kw">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
$ <span class="ex">docker</span> start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
<span class="co"># list active containers</span>
$ <span class="kw">docker</span> ps
<span class="kw">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<span class="kw">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000-<span class="kw">&gt;</span>80/tcp backstabbing_galileo</code></pre></div>
$ <span class="ex">docker</span> ps
<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000-<span class="op">&gt;</span>80/tcp backstabbing_galileo</code></pre></div>
<h3 id="stop-and-destroy-a-container">Stop and destroy a container</h3>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">docker</span> stop backstabbing_galileo <span class="co"># those docker guys are really rude to physicists!</span>
<span class="kw">backstabbing_galileo</span>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> stop backstabbing_galileo <span class="co"># those docker guys are really rude to physicists!</span>
<span class="ex">backstabbing_galileo</span>
<span class="co"># check the container is stopped</span>
$ <span class="kw">docker</span> ps
<span class="kw">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ <span class="ex">docker</span> ps
<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<span class="co"># list ALL containers</span>
$ <span class="kw">docker</span> ps -a
<span class="kw">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<span class="kw">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) <span class="kw">48</span> seconds ago backstabbing_galileo
$ <span class="ex">docker</span> ps -a
<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) <span class="ex">48</span> seconds ago backstabbing_galileo
<span class="co"># destroy the container</span>
$ <span class="kw">docker</span> rm backstabbing_galileo <span class="co"># let&#39;s put an end to these barbarian practices</span>
<span class="kw">backstabbing_galileo</span>
$ <span class="ex">docker</span> rm backstabbing_galileo <span class="co"># let&#39;s put an end to these barbarian practices</span>
<span class="ex">backstabbing_galileo</span>
$ <span class="kw">docker</span> ps -a
<span class="kw">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES</code></pre></div>
$ <span class="ex">docker</span> ps -a
<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES</code></pre></div>
<h2 id="resources">Resources</h2>
<h3 id="docker-1">Docker</h3>
<ul>

View file

@ -52,13 +52,13 @@
<div id="local-sidebar">
<ul>
<li><a href="Home.html">Home</a></li>
<li>Installation
<li>Setup
<ul>
<li><a href="Download.html">Download</a></li>
<li><a href="Download-and-Installation.html">Download and Installation</a></li>
<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
<li><a href="Server-requirements.html">Server requirements</a></li>
<li><a href="Server-configuration.html">Server configuration</a></li>
<li><a href="Server-security.html">Server security</a></li>
<li><a href="Shaarli-installation.html">Shaarli installation</a></li>
<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
<li><a href="Plugins.html">Plugins</a></li>
<