README.rst 5.04 KB
Newer Older
Romain Bignon's avatar
Romain Bignon committed
1
The *Asocial Storage Network* (assnet) project is a web application useful for sharing files (with support for photos galleries, videos, etc.) or organizing events with your friends, removing the obligation of using centralized social networks.
2 3 4

You self-host your data and manage permissions to protect your privacy and control exactly who can access what information.

Laurent Bachelier's avatar
Laurent Bachelier committed
5
Your contacts go to a web interface to see and interact with your data, and you use a command-line tool to control your space.
6 7 8 9

Overview
--------

Romain Bignon's avatar
Romain Bignon committed
10
The command-line interface is a first-class citizen in assnet. It is the main way of setting up an assnet instance.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

The software is able to send emails, and a friendly web interface is provided to end-users. The goal is to enable advanced sharing features while staying as close as possible to the Internet standards (web standards, email, etc.).

Features
--------

* Easy to set-up, you create a working directory on your system and share it with a simple configuration on your HTTP daemon.
* Permissions are always in mind, to control your privacy.
* Your contacts aren't required to keep a login/password.
* Notifications are sent by mail.
* A key (OTP) system is used to give to your contacts URLs with a token to authenticate them.
* For each file or directory, you can choose what default view to use (HTML list, text list, JSON, gallery, downloadable archive, etc. for a directory).
* Support several plugins to provide extra features.
* Thorough automated testing, making it PHB-compliant.

Romain Bignon's avatar
Romain Bignon committed
26
assnet is written in Python and is distributed under the AGPLv3+ license.
27 28 29 30 31 32 33 34

Installation
------------

Dependencies
~~~~~~~~~~~~

* Python >= 2.6
Laurent Bachelier's avatar
Laurent Bachelier committed
35
* python-argparse or Python >= 2.7
36 37 38 39
* python-paste
* python-webob
* python-mako
* python-imaging
40
* python-pyrss2gen
41
* python-dateutil
42 43 44 45 46 47

Those dependencies will be either checked or installed automatically unless you chose the "No installation" method.

With a package (recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Romain Bignon's avatar
Romain Bignon committed
48
* Gentoo has an assnet ebuild in the laurentb overlay. To install::
49 50

    # layman -a laurentb
Romain Bignon's avatar
Romain Bignon committed
51
    # emerge --autounmask -av assnet
52 53 54 55 56 57

From the sources
~~~~~~~~~~~~~~~~

Get the source code from the git repository and run the installer::

Romain Bignon's avatar
Romain Bignon committed
58 59
    $ git clone git://git.symlink.me/pub/laurentb/assnet.git
    $ cd assnet
60 61 62 63 64
    $ sudo python setup.py install

No installation (development)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You just have to set the PYTHONPATH variable.
Romain Bignon's avatar
Romain Bignon committed
65
For instance, to run the asn CLI::
66

Romain Bignon's avatar
Romain Bignon committed
67 68 69
    $ git clone git://git.symlink.me/pub/laurentb/assnet.git
    $ cd assnet
    $ PYTHONPATH=. ./bin/asn
70

Romain Bignon's avatar
Romain Bignon committed
71
Beware that if you also have installed assnet globally, the installed data files (assets, templates) could be used (the local ones of course have an higher priority).
72 73 74 75

Getting started
---------------

Laurent Bachelier's avatar
Laurent Bachelier committed
76
First, we have to create the *working directory* where all files you want to share will be put. ::
77 78

    $ cd mysharedfiles
Romain Bignon's avatar
Romain Bignon committed
79 80
    $ asn init
    assnet working directory created.
81

Romain Bignon's avatar
Romain Bignon committed
82
You can test assnet *right now* by starting the integrated server. However, for a more serious usage, it is recommended to configure it to work with a full-blown web server (see the SETUP file)::
83

Romain Bignon's avatar
Romain Bignon committed
84
    $ assnet-serve .
85 86 87 88 89 90 91 92 93
    serving on 0.0.0.0:8042 view at http://127.0.0.1:8042

You can now play around with the web interface. Add some files in your working directory, and they will appear. For instance, let's add one file::

    $ cp ~/pics/my_gf_naked.jpg ./

Refresh the web page. By default, since we added an image, it will be shown as a thumbnail.
However, you might not want this picture to be seen by everyone::

Romain Bignon's avatar
Romain Bignon committed
94
    $ asn chmod all -irl my_gf_naked.jpg
95 96 97

Check all set permissions::

Romain Bignon's avatar
Romain Bignon committed
98
    $ asn tree
99
    -/                                       all(irl-)
Romain Bignon's avatar
Romain Bignon committed
100
     |-.assnet/                              all(----)
101 102 103 104
     -my_gf_naked.jpg                        all(----)

``all`` is a special name to refer to everyone (anonymous users being part of it of course). ``i`` is for appearing In a list, ``r`` is for Reading, ``w`` is for Writing, and ``l`` is for Listing a directory. All modes are inherited from the parents if they are not specified at a higher level.

Laurent Bachelier's avatar
Laurent Bachelier committed
105
Refresh the web page. Now, no one can read and or even know that file exists. But let's do something fun! ::
106

Romain Bignon's avatar
Romain Bignon committed
107 108
    $ asn chmod all +i my_gf_naked.jpg
    $ asn tree
109
    -/                                       all(irl-)
Romain Bignon's avatar
Romain Bignon committed
110
     |-.assnet/                              all(----)
111 112 113 114 115 116
     -my_gf_naked.jpg                        all(i---)

Refresh the web page. The file will appear, but if you try to view it, you will be denied.

The next step is to allow only some users to view that file::

Romain Bignon's avatar
Romain Bignon committed
117 118 119
    $ asn contacts add myfriend
    $ asn chmod u.myfriend +ir my_gf_naked.jpg
    $ asn tree
120
    -/                                       all(irl-)
Romain Bignon's avatar
Romain Bignon committed
121
     |-.assnet/                              all(----)
122 123 124 125 126 127
     -my_gf_naked.jpg                        u.myfriend(ir--) all(i---)

``u`` is a prefix to specify it concerns an user.

Now, connect as this user::

Romain Bignon's avatar
Romain Bignon committed
128
    $ asn contacts genkey myfriend
129
    Key of user myfriend set to 455b00b1e5.
Romain Bignon's avatar
Romain Bignon committed
130
    $ asn geturl -u myfriend .
131 132 133
    http://127.0.0.1:8042/?authkey=455b00b1e5

Open the URL. You can now access the file!
134