diff --git a/doc/3rd-party-libraries.html b/doc/3rd-party-libraries.html index f6ff476..946ca03 100644 --- a/doc/3rd-party-libraries.html +++ b/doc/3rd-party-libraries.html @@ -15,13 +15,13 @@
@@ -81,6 +79,7 @@

PHP

diff --git a/doc/3rd-party-libraries.md b/doc/3rd-party-libraries.md index 3101c90..e637054 100644 --- a/doc/3rd-party-libraries.md +++ b/doc/3rd-party-libraries.md @@ -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) diff --git a/doc/Backup,-restore,-import-and-export.html b/doc/Backup,-restore,-import-and-export.html index 4d72728..a4a48ad 100644 --- a/doc/Backup,-restore,-import-and-export.html +++ b/doc/Backup,-restore,-import-and-export.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

Backup, restore, import and export

+ +

Backup and restore the datastore file

Backup the file data/datastore.php (by FTP or SSH). Restore by putting the file back in place.

Example command:

-
rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +%Y-%m-%d_%H%M).php
+
rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +%Y-%m-%d_%H%M).php

To export links as an HTML file, under Tools > Export, choose:

Example command:

-
./export-bookmarks.py --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all
+
./export-bookmarks.py --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all

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.)

@@ -126,5 +131,20 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

See this issue for import tweaks.

SemanticScuttle

To correctly import the tags from a SemanticScuttle HTML export, edit the HTML file before importing and replace all occurences of tags= (lowercase) to TAGS= (uppercase).

+

Scuttle

+

Shaarli cannot import data directly from 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.

+ + +

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

+ diff --git a/doc/Backup,-restore,-import-and-export.md b/doc/Backup,-restore,-import-and-export.md index cf6b9f4..9f5598e 100644 --- a/doc/Backup,-restore,-import-and-export.md +++ b/doc/Backup,-restore,-import-and-export.md @@ -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) diff --git a/doc/Browsing-and-searching.html b/doc/Browsing-and-searching.html index 3980612..23001bc 100644 --- a/doc/Browsing-and-searching.html +++ b/doc/Browsing-and-searching.html @@ -15,13 +15,13 @@
diff --git a/doc/Coding-guidelines.html b/doc/Coding-guidelines.html index add6963..1a2a935 100644 --- a/doc/Coding-guidelines.html +++ b/doc/Coding-guidelines.html @@ -15,13 +15,13 @@
diff --git a/doc/Community-&-Related-software.html b/doc/Community-&-Related-software.html index 77b9793..accbacd 100644 --- a/doc/Community-&-Related-software.html +++ b/doc/Community-&-Related-software.html @@ -15,13 +15,13 @@
@@ -84,8 +82,9 @@
  • autosave by @kalvn: Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.
  • Code Coloration by @ArthurHoaro: client side code syntax highlighter.
  • social by @alexisju: share links to social networks.
  • -
  • emojione by @NerosTie: Add colorful emojis to your Shaarli.
  • +
  • emojione by @NerosTie: Add colorful emojis to your Shaarli.
  • launch - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
  • +
  • Disqus by @kalvn: Adds Disqus comment system to your Shaarli.
  • Themes

    See Theming for the list of community-contributed themes, and an installation guide.

    diff --git a/doc/Community-&-Related-software.md b/doc/Community-&-Related-software.md index 03a3dea..3945d00 100644 --- a/doc/Community-&-Related-software.md +++ b/doc/Community-&-Related-software.md @@ -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 diff --git a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html index edb1555..9efb1ad 100644 --- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html +++ b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
    @@ -111,55 +109,55 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf #Usage: ./local-shaarli.sh #Author: nodiscc (nodiscc@gmail.com) #License: MIT (http://opensource.org/licenses/MIT) -set -o errexit -set -o nounset +set -o errexit +set -o nounset ##### CONFIG ################# #The port used by php's local server -php_local_port=7431 +php_local_port=7431 #Name of the SSH server and path where Shaarli is installed #TODO: pass these as command-line arguments -remotehost="my.ssh.server" -remote_shaarli_dir="/var/www/shaarli" +remotehost="my.ssh.server" +remote_shaarli_dir="/var/www/shaarli" ###### FUNCTIONS ############# _main() { - _CBSyncShaarli - _CBServeShaarli + _CBSyncShaarli + _CBServeShaarli } _CBSyncShaarli() { - remote_temp_dir=$(ssh $remotehost mktemp -d) - remote_ssh_user=$(ssh $remotehost whoami) - ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir" - ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir" - scp -rq "$remotehost":"$remote_temp_dir" local-shaarli - ssh "$remotehost" rm -r "$remote_temp_dir" + remote_temp_dir=$(ssh $remotehost mktemp -d) + remote_ssh_user=$(ssh $remotehost whoami) + ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir" + ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir" + scp -rq "$remotehost":"$remote_temp_dir" local-shaarli + ssh "$remotehost" rm -r "$remote_temp_dir" } _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 "Please go to http://localhost:${php_local_port}" + cd local-shaarli/ + php -S localhost:${php_local_port} + echo "Please go to http://localhost:${php_local_port}" } ##### MAIN ################# -_main +_main

    This outputs:

    -
    $ ./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.
    +
    $ ./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]: /[](.html)
    -[Mon Sep  1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
    -[Mon Sep  1 21:56:37 2014] ::1:57881 [200]: /...[](.html)
    +[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html) +[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html) +[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)
    diff --git a/doc/Create-and-serve-multiple-Shaarlis-(farm).html b/doc/Create-and-serve-multiple-Shaarlis-(farm).html index 933144e..672e4bf 100644 --- a/doc/Create-and-serve-multiple-Shaarlis-(farm).html +++ b/doc/Create-and-serve-multiple-Shaarlis-(farm).html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

    Create and serve multiple Shaarlis (farm)

    Example bash script (creates multiple shaarli instances and generates an HTML index of them)

    #!/bin/bash
    -set -o errexit
    -set -o nounset
    +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="master"
    +shaarli_base_dir='/var/www/shaarli'
    +accounts='bob john whatever username'
    +shaarli_repo_url='https://github.com/shaarli/Shaarli'
    +ref="master"
     
     #clone multiple shaarli instances
    -if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi[](.html)
    +if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi[](.html)
        
    -for account in $accounts; do
    -    if [ -d "$shaarli_base_dir/$account" ];[](.html)
    -    then echo "[info] account $account already exists, skipping";[](.html)
    -    else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi[](.html)
    +for account in $accounts; do
    +    if [ -d "$shaarli_base_dir/$account" ];[](.html)
    +    then echo "[info] account $account already exists, skipping";[](.html)
    +    else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi[](.html)
     done
     
     #generate html index of shaarlis
    -htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    +htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
     <!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->
     <html lang="en">
         <head>
    @@ -136,9 +134,9 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
         <h1>My Shaarli farm</h1>
         <ul style="list-style-type: none;">'
     
    -accountlinks=''
    +accountlinks=''
         
    -htmlfooter='
    +htmlfooter='
         </ul>
         </div>
         </body>
    @@ -146,14 +144,14 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
         
     
     
    -for account in $accounts; do accountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done
    -if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi[](.html)
    -echo "[info] generating new index of shaarlis"[](.html)
    -echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
    -echo '[info] done.'[](.html)
    -echo "[info] list of accounts: $accounts"[](.html)
    -echo "[info] contents of $shaarli_base_dir:"[](.html)
    -tree -a -L 1 "$shaarli_base_dir"
    +for account in $accounts; do accountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done +if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi[](.html) +echo "[info] generating new index of shaarlis"[](.html) +echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html" +echo '[info] done.'[](.html) +echo "[info] list of accounts: $accounts"[](.html) +echo "[info] contents of $shaarli_base_dir:"[](.html) +tree -a -L 1 "$shaarli_base_dir"

    This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like Ansible

    diff --git a/doc/Datastore-hacks.html b/doc/Datastore-hacks.html index 8863940..15da09d 100644 --- a/doc/Datastore-hacks.html +++ b/doc/Datastore-hacks.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
    diff --git a/doc/Development.html b/doc/Development.html index 2eacff9..c577641 100644 --- a/doc/Development.html +++ b/doc/Development.html @@ -15,13 +15,13 @@
    diff --git a/doc/Directory-structure.html b/doc/Directory-structure.html index 003d4d9..404ff7c 100644 --- a/doc/Directory-structure.html +++ b/doc/Directory-structure.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

    Directory structure

    Here is the directory structure of Shaarli and the purpose of the different files:

    -
        index.php        # Main program
    -    application/     # Shaarli classes
    -        ├── LinkDB.php
    -        └── Utils.php
    -    tests/       # Shaarli unitary & functional tests
    -        ├── LinkDBTest.php
    -        ├── utils  # utilities to ease testing
    -        │   └── ReferenceLinkDB.php
    -        └── UtilsTest.php
    -    COPYING          # Shaarli license
    -    inc/             # static assets and 3rd party libraries
    -        ├── awesomplete.*          # tags autocompletion library
    -        ├── blazy.*                # picture wall lazy image loading library
    -        ├── shaarli.css, reset.css # Shaarli stylesheet.
    -        ├── qr.*                   # qr code generation library
    -        └──rain.tpl.class.php      # RainTPL templating library
    -    tpl/             # RainTPL templates for Shaarli. They are used to build the pages.
    -    images/          # Images and icons used in Shaarli
    -    data/            # data storage: bookmark database, configuration, logs, banlist…
    -        ├── config.php             # Shaarli configuration (login, password, timezone, title…)
    -        ├── datastore.php          # Your link database (compressed).
    -        ├── ipban.php              # IP address ban system data
    -        ├── lastupdatecheck.txt    # Update check timestamp file
    -        └──log.txt                 # login/IPban log.
    -    cache/           # thumbnails cache
    +
        index.php        # Main program
    +    application/     # Shaarli classes
    +        ├── LinkDB.php
    +        └── Utils.php
    +    tests/       # Shaarli unitary & functional tests
    +        ├── LinkDBTest.php
    +        ├── utils  # utilities to ease testing
    +        │   └── ReferenceLinkDB.php
    +        └── UtilsTest.php
    +    COPYING          # Shaarli license
    +    inc/             # static assets and 3rd party libraries
    +        ├── awesomplete.*          # tags autocompletion library
    +        ├── blazy.*                # picture wall lazy image loading library
    +        ├── shaarli.css, reset.css # Shaarli stylesheet.
    +        ├── qr.*                   # qr code generation library
    +        └──rain.tpl.class.php      # RainTPL templating library
    +    tpl/             # RainTPL templates for Shaarli. They are used to build the pages.
    +    images/          # Images and icons used in Shaarli
    +    data/            # data storage: bookmark database, configuration, logs, banlist…
    +        ├── config.php             # Shaarli configuration (login, password, timezone, title…)
    +        ├── datastore.php          # Your link database (compressed).
    +        ├── ipban.php              # IP address ban system data
    +        ├── lastupdatecheck.txt    # Update check timestamp file
    +        └──log.txt                 # login/IPban log.
    +    cache/           # thumbnails cache
                          # This directory is automatically created. You can erase it anytime you want.
    -    tmp/             # Temporary directory for compiled RainTPL templates.
    +    tmp/             # Temporary directory for compiled RainTPL templates.
                          # This directory is automatically created. You can erase it anytime you want.
    diff --git a/doc/Docker.html b/doc/Docker.html index a443d10..e89c90f 100644 --- a/doc/Docker.html +++ b/doc/Docker.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf @@ -112,18 +110,18 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

    Install Docker, by following the instructions relevant
    to your OS / distribution, and start the service.

    Search an image on DockerHub

    -
    $ docker search debian
    +
    $ docker search debian
     
    -NAME            DESCRIPTION                                     STARS   OFFICIAL   AUTOMATED
    -ubuntu          Ubuntu is a Debian-based Linux operating s...   2065    [OK][](.html)
    -debian          Debian is a Linux distribution that's comp...   603     [OK][](.html)
    +NAME            DESCRIPTION                                     STARS   OFFICIAL   AUTOMATED
    +ubuntu          Ubuntu is a Debian-based Linux operating s...   2065    [OK][](.html)
    +debian          Debian is a Linux distribution that's comp...   603     [OK][](.html)
     google/debian                                                   47                 [OK][](.html)

    Show available tags for a repository

    -
    $ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
    +
    $ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
     
    -% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
    -Dload  Upload   Total   Spent    Left  Speed
    -100  1283    0  1283    0     0    433      0 --:--:--  0:00:02 --:--:--   433
    +% Total % Received % Xferd Average Speed Time Time Time Current +Dload Upload Total Spent Left Speed +100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433

    Sample output:

    [[](.html)
         {
    @@ -148,14 +146,14 @@ to your OS / distribution, and start the service.

    } ]

    Pull an image from DockerHub

    -
    $ docker pull repository[:tag][](.html)
    +
    $ docker pull repository[:tag][](.html)
     
    -$ docker pull debian:wheezy
    -wheezy: Pulling from debian
    -4c8cbfd2973e: Pull complete
    -60c52dbe9d91: Pull complete
    -Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
    -Status: Downloaded newer image for debian:wheezy
    +$ docker pull debian:wheezy +wheezy: Pulling from debian +4c8cbfd2973e: Pull complete +60c52dbe9d91: Pull complete +Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe +Status: Downloaded newer image for debian:wheezy

    Get and run a Shaarli image

    DockerHub repository

    The images can be found in the shaarli/shaarli
    @@ -173,53 +171,53 @@ repository.

  • Nginx
  • Download from DockerHub

    -
    $ docker pull shaarli/shaarli
    -latest: Pulling from shaarli/shaarli
    -32716d9fcddb: Pull complete
    -84899d045435: Pull complete
    -4b6ad7444763: Pull complete
    -e0345ef7a3e0: Pull complete
    -5c1dd344094f: Pull complete
    -6422305a200b: Pull complete
    -7d63f861dbef: Pull complete
    -3eb97210645c: Pull complete
    -869319d746ff: Already exists
    -869319d746ff: Pulling fs layer
    -902b87aaaec9: Already exists
    -Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
    -Status: Downloaded newer image for shaarli/shaarli:latest
    +
    $ docker pull shaarli/shaarli
    +latest: Pulling from shaarli/shaarli
    +32716d9fcddb: Pull complete
    +84899d045435: Pull complete
    +4b6ad7444763: Pull complete
    +e0345ef7a3e0: Pull complete
    +5c1dd344094f: Pull complete
    +6422305a200b: Pull complete
    +7d63f861dbef: Pull complete
    +3eb97210645c: Pull complete
    +869319d746ff: Already exists
    +869319d746ff: Pulling fs layer
    +902b87aaaec9: Already exists
    +Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
    +Status: Downloaded newer image for shaarli/shaarli:latest

    Create and start a new container from the image

    # map the host's :8000 port to the container's :80 port
    -$ docker create -p 8000:80 shaarli/shaarli
    -d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
    +$ docker create -p 8000:80 shaarli/shaarli
    +d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
     
     # launch the container in the background
    -$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
    -d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
    +$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
    +d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
     
     # list active containers
    -$ docker ps
    -CONTAINER ID  IMAGE            COMMAND               CREATED         STATUS        PORTS                 NAMES
    -d40b7af693d6  shaarli/shaarli  /usr/bin/supervisor  15 seconds ago  Up 4 seconds  0.0.0.0:8000->80/tcp  backstabbing_galileo
    +$ docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo

    Stop and destroy a container

    -
    $ docker stop backstabbing_galileo  # those docker guys are really rude to physicists!
    -backstabbing_galileo
    +
    $ docker stop backstabbing_galileo  # those docker guys are really rude to physicists!
    +backstabbing_galileo
     
     # check the container is stopped
    -$ docker ps
    -CONTAINER ID  IMAGE            COMMAND               CREATED         STATUS        PORTS                 NAMES
    +$ docker ps
    +CONTAINER ID  IMAGE            COMMAND               CREATED         STATUS        PORTS                 NAMES
     
     # list ALL containers
    -$ docker ps -a
    -CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                      PORTS               NAMES
    -d40b7af693d6        shaarli/shaarli     /usr/bin/supervisor   5 minutes ago       Exited (0) 48 seconds ago                       backstabbing_galileo
    +$ docker ps -a
    +CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                      PORTS               NAMES
    +d40b7af693d6        shaarli/shaarli     /usr/bin/supervisor   5 minutes ago       Exited (0) 48 seconds ago                       backstabbing_galileo
     
     # destroy the container
    -$ docker rm backstabbing_galileo  # let's put an end to these barbarian practices
    -backstabbing_galileo
    +$ docker rm backstabbing_galileo  # let's put an end to these barbarian practices
    +backstabbing_galileo
     
    -$ docker ps -a
    -CONTAINER ID  IMAGE            COMMAND               CREATED         STATUS        PORTS                 NAMES
    +$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

    Resources

    Docker

      diff --git a/doc/Download-CSS-styles-from-an-OPML-list.html b/doc/Download-CSS-styles-from-an-OPML-list.html index 2277150..a4f68ac 100644 --- a/doc/Download-CSS-styles-from-an-OPML-list.html +++ b/doc/Download-CSS-styles-from-an-OPML-list.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf @@ -209,8 +207,8 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf /** * 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 (".") and parent one("..") + * @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 (".") and parent one("..") * are not listed here */ function getDirectoryList ($directory) { diff --git a/doc/Download.html b/doc/Download-and-Installation.html similarity index 56% rename from doc/Download.html rename to doc/Download-and-Installation.html index 9f9f511..17c7b69 100644 --- a/doc/Download.html +++ b/doc/Download-and-Installation.html @@ -4,7 +4,7 @@ - Shaarli – Download + Shaarli – Download and Installation - - - - - -

      Shaarli installation

      -

      Once Shaarli is downloaded and installed behind a web server, open it in your favorite browser.

      -

      install screenshot

      -

      Setup your Shaarli installation, and it's ready to use!

      - - diff --git a/doc/Shaarli-installation.md b/doc/Shaarli-installation.md deleted file mode 100644 index be9726e..0000000 --- a/doc/Shaarli-installation.md +++ /dev/null @@ -1,6 +0,0 @@ -#Shaarli installation -Once Shaarli is downloaded and installed behind a web server, open it in your favorite browser. - -![install screenshot](http://i.imgur.com/wuMpDSN.png)[](.html) - -Setup your Shaarli installation, and it's ready to use! diff --git a/doc/Sharing-button.html b/doc/Sharing-button.html index 3770d8a..93710ef 100644 --- a/doc/Sharing-button.html +++ b/doc/Sharing-button.html @@ -15,13 +15,13 @@ diff --git a/doc/Static-analysis.html b/doc/Static-analysis.html index 86cb469..d964e91 100644 --- a/doc/Static-analysis.html +++ b/doc/Static-analysis.html @@ -15,13 +15,13 @@ diff --git a/doc/TODO.html b/doc/TODO.html deleted file mode 100644 index 04224db..0000000 --- a/doc/TODO.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - Shaarli – TODO - - - - - - -

      TODO

      -
        -
      • add more screenshots
      • -
      • improve developer documentation: storage architecture, classes and functions, security handling...
      • -
      • add server configuration examples: lighthttpd
      • -
      - - diff --git a/doc/TODO.md b/doc/TODO.md deleted file mode 100644 index fb72fd5..0000000 --- a/doc/TODO.md +++ /dev/null @@ -1,4 +0,0 @@ -#TODO -* add more screenshots -* improve developer documentation: storage architecture, classes and functions, security handling... -* add server configuration examples: lighthttpd diff --git a/doc/Theming.html b/doc/Theming.html index 27c5d86..13e6acf 100644 --- a/doc/Theming.html +++ b/doc/Theming.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf @@ -132,6 +130,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
    • kalvn/shaarli-blocks - A template/theme for Shaarli
    • kalvn/Shaarli-Material - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.
    • misterair/Limonade - A fork of (legacy) Shaarli with a new template
    • +
    • mrjovanovic/serious-theme-shaarli - A serious theme for SHaarli.
    • Vinm/Blue-theme-for Shaarli - A template/theme for Shaarli (unmaintained, compatibility unknown)
    • vivienhaese/shaarlitheme - A Shaarli fork meant to be run in an openshift instance
    @@ -142,17 +141,17 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
  • user sites are enabled, e.g. /home/user/public_html/somedir is served as http://localhost/~user/somedir
  • http is the name of the Apache user
  • -
    $ cd ~/public_html
    +
    $ cd ~/public_html
     
     # clone repositories
    -$ git clone https://github.com/shaarli/Shaarli.git shaarli
    -$ pushd shaarli/tpl
    -$ git clone https://github.com/alexisju/albinomouse-template.git
    -$ popd
    +$ git clone https://github.com/shaarli/Shaarli.git shaarli
    +$ pushd shaarli/tpl
    +$ git clone https://github.com/alexisju/albinomouse-template.git
    +$ popd
     
     # set access rights for Apache
    -$ chgrp -R http shaarli
    -$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
    +$ chgrp -R http shaarli +$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp

    Get config written:

    • go to the freshly installed site
    • @@ -161,6 +160,6 @@ $ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli

    Edit Shaarli's configuration|Shaarli configuration:

    # the file should be owned by Apache, thus not writeable => sudo
    -$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
    +$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
    diff --git a/doc/Theming.md b/doc/Theming.md index 9dfdcf9..7fb8d92 100644 --- a/doc/Theming.md +++ b/doc/Theming.md @@ -28,6 +28,7 @@ $GLOBALS['config'['RAINTPL_TPL'] = 'tpl/my-template/';]('RAINTPL_TPL']-=-'tpl/my - [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli[](.html) - [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.[](.html) - [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template[](.html) +- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for SHaarli.[](.html) - [Vinm/Blue-theme-for Shaarli](https://github.com/Vinm/Blue-theme-for-Shaarli) - A template/theme for Shaarli ([unmaintained](https://github.com/Vinm/Blue-theme-for-Shaarli/issues/2), compatibility unknown)[](.html) - [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance[](.html) diff --git a/doc/Troubleshooting.html b/doc/Troubleshooting.html index 3de8ad1..ed1c6f0 100644 --- a/doc/Troubleshooting.html +++ b/doc/Troubleshooting.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
    @@ -132,6 +130,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

    network.http.referer.trimmingPolicy - trim the URI not to send a full Referer

    Firefox, localhost and redirections

    -

    localhost is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or anly accept requests from the same base domain/host, Shaarli redirections will not work properly.

    +

    localhost is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly.

    To solve this, assign a local domain to your host, e.g.

    127.0.0.1 localhost desktop localhost.lan
     ::1       localhost desktop localhost.lan
    diff --git a/doc/Troubleshooting.md b/doc/Troubleshooting.md index e91fe84..8e30fce 100644 --- a/doc/Troubleshooting.md +++ b/doc/Troubleshooting.md @@ -25,6 +25,7 @@ HTTP settings are available by browsing `about:config`, here are the available s `network.http.referer.spoofSource` - Referer spoofing (~faking) - false (default): real referer - true: spoof referer (use target URI as referer) + - known to break some functionality in Shaarli `network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer - 0 (default): send full URI @@ -32,7 +33,7 @@ HTTP settings are available by browsing `about:config`, here are the available s - 2: scheme+host+port ### Firefox, localhost and redirections -`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or anly accept requests from the same base domain/host, Shaarli redirections will not work properly. +`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly. To solve this, assign a local domain to your host, e.g. ``` diff --git a/doc/Unit-tests.html b/doc/Unit-tests.html index 7934e34..266fd33 100644 --- a/doc/Unit-tests.html +++ b/doc/Unit-tests.html @@ -52,13 +52,13 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
    @@ -111,87 +109,87 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

    Sample usage

    # system-wide version
    -$ composer install
    -$ composer update
    +$ composer install
    +$ composer update
     
     # local version
    -$ php composer.phar self-update
    -$ php composer.phar install
    -$ php composer.phar update
    +$ php composer.phar self-update +$ php composer.phar install +$ php composer.phar update

    Install Shaarli dev dependencies

    -
    $ cd /path/to/shaarli
    -$ composer update
    +
    $ cd /path/to/shaarli
    +$ composer update

    Install and enable Xdebug to generate PHPUnit coverage reports

    For Debian-based distros:

    -
    $ aptitude install php5-xdebug
    +
    $ aptitude install php5-xdebug

    For ArchLinux:

    -
    $ pacman -S xdebug
    +
    $ pacman -S xdebug

    Then add the following line to /etc/php/php.ini:

    zend_extension=xdebug.so

    Run unit tests

    Successful test suite:

    -
    $ make test
    +
    $ make test
     
    --------
    -PHPUNIT
    --------
    -PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
    +-------
    +PHPUNIT
    +-------
    +PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
     
    -Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
    +Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
     
    -....................................
    +....................................
     
    -Time: 759 ms, Memory: 8.25Mb
    +Time: 759 ms, Memory: 8.25Mb
     
    -OK (36 tests, 65 assertions)
    +OK (36 tests, 65 assertions)

    Test suite with failures and errors:

    -
    $ make test
    --------
    -PHPUNIT
    --------
    -PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
    +
    $ make test
    +-------
    +PHPUNIT
    +-------
    +PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
     
    -Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
    +Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
     
    -E..FF...............................
    +E..FF...............................
     
    -Time: 802 ms, Memory: 8.25Mb
    +Time: 802 ms, Memory: 8.25Mb
     
    -There was 1 error:
    +There was 1 error:
     
    -1) LinkDBTest::testConstructLoggedIn
    -Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
    +1) LinkDBTest::testConstructLoggedIn
    +Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
     DBTest.php on line 79 and defined
     
    -/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
    -/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
    +/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
    +/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
     
    ---
    +--
     
    -There were 2 failures:
    +There were 2 failures:
     
    -1) LinkDBTest::testCheckDBNew
    -Failed asserting that two strings are equal.
    ---- Expected
    -+++ Actual
    -@@ @@
    --'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
    -+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
    +1) LinkDBTest::testCheckDBNew
    +Failed asserting that two strings are equal.
    +--- Expected
    ++++ Actual
    +@@ @@
    +-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
    ++'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
     
    -/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
    +/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
     
    -2) LinkDBTest::testCheckDBLoad
    -Failed asserting that two strings are equal.
    ---- Expected
    -+++ Actual
    -@@ @@
    --'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
    -+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
    +2) LinkDBTest::testCheckDBLoad
    +Failed asserting that two strings are equal.
    +--- Expected
    ++++ Actual
    +@@ @@
    +-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
    ++'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
     
    -/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
    +/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
     
    -FAILURES!
    -Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
    +FAILURES! +Tests: 36, Assertions: 63, Errors: 1, Failures: 2.

    Test results and coverage

    By default, PHPUnit will run all suitable tests found under the tests directory.

    Each test has 3 possible outcomes:

    diff --git a/doc/Upgrade-and-migration.html b/doc/Upgrade-and-migration.html new file mode 100644 index 0000000..a5b041d --- /dev/null +++ b/doc/Upgrade-and-migration.html @@ -0,0 +1,242 @@ + + + + + + + Shaarli – Upgrade and migration + + + + + + +
    + +
    +

    Upgrade and migration

    +

    Preparation

    +

    Backup your data

    +

    Shaarli stores all user data under the data directory:

    + +

    See Shaarli configuration for more information about Shaarli resources.

    +

    It is recommended to backup this repository before starting updating/upgrading Shaarli:

    + +

    Migrating data from a previous installation

    +

    As all user data is kept under data, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps:

    + +

    Upgrading from release archives

    +

    All tagged revisions can be downloaded as tarballs or ZIP archives from the releases page.

    +

    We recommend using the releases from the stable branch, which are available as:

    + +

    Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the contents of the data directory!

    +

    After upgrading, 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).

    +

    Upgrading with Git

    +

    Updating a community Shaarli

    +

    If you have installed Shaarli from the community Git repository, simply pull new changes from your local clone:

    +
    $ cd /path/to/shaarli
    +$ git pull
    +
    +From github.com:shaarli/Shaarli
    + * branch            master     -> FETCH_HEAD
    +Updating ebd67c6..521f0e6
    +Fast-forward
    + application/Url.php   | 1 +
    + shaarli_version.php   | 2 +-
    + tests/Url/UrlTest.php | 1 +
    + 3 files changed, 3 insertions(+), 1 deletion(-)
    +

    Shaarli >= v0.8.x: install/update third-party PHP dependencies using Composer:

    +
    $ composer update --no-dev
    +
    +Loading composer repositories with package information
    +Updating dependencies
    +  - Installing shaarli/netscape-bookmark-parser (v1.0.1)
    +    Downloading: 100%
    +

    Migrating and upgrading from Sebsauvage's repository

    +

    If you have installed Shaarli from Sebsauvage's original Git repository, you can use Git remotes to update your working copy.

    +

    The following guide assumes that:

    + +

    Step 0: show repository information

    +
    $ cd /path/to/shaarli
    +
    +$ git remote -v
    +origin  https://github.com/sebsauvage/Shaarli (fetch)
    +origin  https://github.com/sebsauvage/Shaarli (push)
    +
    +$ git branch -vv
    +* master 029f75f [origin/master] Update README.md[](.html)
    +
    +$ git status
    +On branch master
    +Your branch is up-to-date with 'origin/master'.
    +nothing to commit, working directory clean
    +

    Step 1: update Git remotes

    +
    $ git remote rename origin sebsauvage
    +$ git remote -v
    +sebsauvage  https://github.com/sebsauvage/Shaarli (fetch)
    +sebsauvage  https://github.com/sebsauvage/Shaarli (push)
    +
    +$ git remote add origin https://github.com/shaarli/Shaarli
    +$ git fetch origin
    +
    +remote: Counting objects: 3015, done.
    +remote: Compressing objects: 100% (19/19), done.
    +remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
    +Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
    +Resolving deltas: 100% (1899/1899), completed with 48 local objects.
    +From https://github.com/shaarli/Shaarli
    + * [new branch]      master     -> origin/master[](.html)
    + * [new branch]      stable     -> origin/stable[](.html)
    +[...][](.html)
    + * [new tag]         v0.6.4     -> v0.6.4[](.html)
    + * [new tag]         v0.7.0     -> v0.7.0[](.html)
    +

    Step 2: use the stable community branch

    +
    $ git checkout origin/stable -b stable
    +Branch stable set up to track remote branch stable from origin.
    +Switched to a new branch 'stable'
    +
    +$ git branch -vv
    +  master 029f75f [sebsauvage/master] Update README.md[](.html)
    +* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html)
    +

    Shaarli >= v0.8.x: install/update third-party PHP dependencies using Composer:

    +
    $ composer update --no-dev
    +
    +Loading composer repositories with package information
    +Updating dependencies
    +  - Installing shaarli/netscape-bookmark-parser (v1.0.1)
    +    Downloading: 100%
    +

    Optionally, you can delete information related to the legacy version:

    +
    $ git branch -D master
    +Deleted branch master (was 029f75f).
    +
    +$ git remote remove sebsauvage
    +
    +$ git remote -v
    +origin  https://github.com/shaarli/Shaarli (fetch)
    +origin  https://github.com/shaarli/Shaarli (push)
    +
    +$ git gc
    +Counting objects: 3317, done.
    +Delta compression using up to 8 threads.
    +Compressing objects: 100% (1237/1237), done.
    +Writing objects: 100% (3317/3317), done.
    +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).

    + + diff --git a/doc/Upgrade-and-migration.md b/doc/Upgrade-and-migration.md new file mode 100644 index 0000000..0bc3382 --- /dev/null +++ b/doc/Upgrade-and-migration.md @@ -0,0 +1,161 @@ +#Upgrade and migration +## Preparation +### Backup your data + +Shaarli stores all user data under the `data` directory: +- `data/config.php` - main configuration file +- `data/datastore.php` - bookmarked links +- `data/ipbans.php` - banned IP addresses + +See [Shaarli configuration](Shaarli-configuration.html) 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 +- users with FTP access: download a local copy of your Shaarli installation using your favourite client + +### Migrating data from a previous installation +As all user data is kept under `data`, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps: + +- backup the `data` directory +- install or update Shaarli: + - fresh installation - see [Download and installation](Download-and-installation.html) + - update - see the following sections +- check or restore the `data` directory + +## Upgrading from release archives +All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html) + +We _recommend_ using the releases from the `stable` branch, which are available as: +- gzipped tarball - https://github.com/shaarli/Shaarli/archive/stable.tar.gz +- ZIP archive - https://github.com/shaarli/Shaarli/archive/stable.zip + +Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the contents of the `data` directory! + +After upgrading, 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.html) for more details). + +## Upgrading with Git +### Updating a community Shaarli +If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone:[](.html) + +```bash +$ cd /path/to/shaarli +$ git pull + +From github.com:shaarli/Shaarli + * branch master -> FETCH_HEAD +Updating ebd67c6..521f0e6 +Fast-forward + application/Url.php | 1 + + shaarli_version.php | 2 +- + tests/Url/UrlTest.php | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) +``` + +Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) + +```bash +$ composer update --no-dev + +Loading composer repositories with package information +Updating dependencies + - Installing shaarli/netscape-bookmark-parser (v1.0.1) + Downloading: 100% +``` + +### Migrating and upgrading from Sebsauvage's repository +If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy.[](.html) + +The following guide assumes that: +- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)[](.html) +- the default remote is named `origin` and points to Sebsauvage's repository +- the current branch is `master` + - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break![](.html) +- the working copy is clean: + - no versioned file has been locally modified + - no untracked files are present + +#### Step 0: show repository information +```bash +$ cd /path/to/shaarli + +$ git remote -v +origin https://github.com/sebsauvage/Shaarli (fetch) +origin https://github.com/sebsauvage/Shaarli (push) + +$ git branch -vv +* master 029f75f [origin/master] Update README.md[](.html) + +$ git status +On branch master +Your branch is up-to-date with 'origin/master'. +nothing to commit, working directory clean +``` + +#### Step 1: update Git remotes +``` +$ git remote rename origin sebsauvage +$ git remote -v +sebsauvage https://github.com/sebsauvage/Shaarli (fetch) +sebsauvage https://github.com/sebsauvage/Shaarli (push) + +$ git remote add origin https://github.com/shaarli/Shaarli +$ git fetch origin + +remote: Counting objects: 3015, done. +remote: Compressing objects: 100% (19/19), done. +remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550 +Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done. +Resolving deltas: 100% (1899/1899), completed with 48 local objects. +From https://github.com/shaarli/Shaarli + * [new branch] master -> origin/master[](.html) + * [new branch] stable -> origin/stable[](.html) +[...][](.html) + * [new tag] v0.6.4 -> v0.6.4[](.html) + * [new tag] v0.7.0 -> v0.7.0[](.html) +``` + +#### Step 2: use the stable community branch + +```bash +$ git checkout origin/stable -b stable +Branch stable set up to track remote branch stable from origin. +Switched to a new branch 'stable' + +$ git branch -vv + master 029f75f [sebsauvage/master] Update README.md[](.html) +* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html) +``` + +Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) + +```bash +$ composer update --no-dev + +Loading composer repositories with package information +Updating dependencies + - Installing shaarli/netscape-bookmark-parser (v1.0.1) + Downloading: 100% +``` + +Optionally, you can delete information related to the legacy version: + +```bash +$ git branch -D master +Deleted branch master (was 029f75f). + +$ git remote remove sebsauvage + +$ git remote -v +origin https://github.com/shaarli/Shaarli (fetch) +origin https://github.com/shaarli/Shaarli (push) + +$ git gc +Counting objects: 3317, done. +Delta compression using up to 8 threads. +Compressing objects: 100% (1237/1237), done. +Writing objects: 100% (3317/3317), done. +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](Shaarli-configuration.html) for more details). diff --git a/doc/Upgrade-from-original-sebsauvage-Shaarli.html b/doc/Upgrade-from-original-sebsauvage-Shaarli.html deleted file mode 100644 index db69a0e..0000000 --- a/doc/Upgrade-from-original-sebsauvage-Shaarli.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - Shaarli – Upgrade from original sebsauvage Shaarli - - - - - -
    - -
    -

    Upgrade from original sebsauvage Shaarli

    - - - diff --git a/doc/Upgrade-from-original-sebsauvage-Shaarli.md b/doc/Upgrade-from-original-sebsauvage-Shaarli.md deleted file mode 100644 index 6ae0c67..0000000 --- a/doc/Upgrade-from-original-sebsauvage-Shaarli.md +++ /dev/null @@ -1,4 +0,0 @@ -#Upgrade from original sebsauvage Shaarli - * Backup your original `data/` directory. - * [Install](https://github.com/shaarli/Shaarli#installation--upgrade) and setup the Shaarli community fork.[](.html) - * Copy your original `data` directory over the new installation. diff --git a/doc/Usage.html b/doc/Usage.html index 2befaa0..63f21d9 100644 --- a/doc/Usage.html +++ b/doc/Usage.html @@ -15,13 +15,13 @@
    diff --git a/doc/_Footer.html b/doc/_Footer.html index a054cc5..e8a62d2 100644 --- a/doc/_Footer.html +++ b/doc/_Footer.html @@ -15,13 +15,13 @@
    -

    _Footer
    -Shaarli, the personal, minimalist, super-fast, no-database delicious clone

    +

    _Footer
    +Shaarli, the personal, minimalist, super-fast, database-free bookmarking service

    diff --git a/doc/_Footer.md b/doc/_Footer.md index 29c39bb..50fa4f5 100644 --- a/doc/_Footer.md +++ b/doc/_Footer.md @@ -1,2 +1,2 @@ #_Footer -_Shaarli, the personal, minimalist, super-fast, no-database delicious clone_ +_Shaarli, the personal, minimalist, super-fast, database-free bookmarking service_ diff --git a/doc/_Sidebar.html b/doc/_Sidebar.html index 89c2cf8..bb6dad9 100644 --- a/doc/_Sidebar.html +++ b/doc/_Sidebar.html @@ -15,13 +15,13 @@

    _Sidebar