Let travis test on PHP 7.2, 7.3 and 7.4
[grauphel.git] / README.rst
1 *****************************
2 grauphel - tomboy REST server
3 *****************************
4 nextCloud__ application implementing the `Tomboy`__ `REST API`__ for syncing notes.
5
6 Pretty stable.
7
8 __ https://nextcloud.com/
9 __ https://wiki.gnome.org/Apps/Tomboy
10 __ https://wiki.gnome.org/Apps/Tomboy/Synchronization/REST/1.0
11
12
13 .. contents::
14
15 ======
16 Status
17 ======
18
19 What works
20 ==========
21 - Note synchronization
22 - OAuth token management interface
23 - Database management interface (reset)
24 - Viewing notes
25 - Searching notes
26 - Downloading notes as HTML and reStructuredText
27
28 What is missing
29 ===============
30 - Web interface to edit notes. I will probably not implement this.
31   Patches welcome :-)
32
33
34 =================
35 Supported clients
36 =================
37 * Conboy__ (Nokia N900 Maemo)
38 * Tomboy__ (Linux, Windows)
39 * Tomdroid__ (Android)
40
41 __ http://conboy.garage.maemo.org/
42 __ https://wiki.gnome.org/Apps/Tomboy
43 __ https://launchpad.net/tomdroid
44
45
46 Known working versions
47 ======================
48 grauphel 0.7.2 is known to work with:
49
50 * Tomboy 1.15.2, Linux
51 * Tomboy 1.15.1, Windows
52 * Tomdroid 0.7.5, Android 4.4.1
53
54 See the HowTo__ document for client-specific configuration instructions.
55
56 __ docs/howto.rst
57
58
59 =============
60 Functionality
61 =============
62
63 Search
64 ======
65 You can use nextCloud's global search on the top right.
66
67 During search, the note's titles, tags and content are searched.
68
69 Search syntax:
70
71 ``foo``
72   Search for notes containing "foo"
73 ``foo bar``
74   Search for notes containing "foo" and "bar"
75 ``"foo bar" baz``
76   Search for notes containing "foo bar" and "baz"
77 ``foo -bar``
78   Search for notes containing "foo" but not "bar"
79
80
81 ============
82 Dependencies
83 ============
84 * PHP
85 * PHP `oauth extension`__
86
87 __ http://pecl.php.net/package/oauth
88
89
90 ============
91 Installation
92 ============
93
94 .. note::
95    grauphel needs to be activated for all users.
96    It will not work with the "enable only for specific groups" setting.
97
98 App store installation
99 ======================
100 #. Log into nextcloud as administrator
101 #. Goto "Apps"
102 #. Enable experimental apps in the settings
103 #. Click "Productivity"
104 #. Look for "grauphel - Tomboy sync server"
105 #. Click "Activate"
106
107
108 Manual installation
109 ===================
110
111 #. SSH onto your web server
112 #. Navigate to the nextcloud ``apps`` directory, often in ``/var/www/nextcloud/apps``
113 #. Download the latest release from http://cweiske.de/grauphel.htm#download
114    and extract it.
115    For example::
116
117      $ wget http://cweiske.de/download/grauphel/grauphel-0.7.2.tar.gz
118      $ tar xjvf grauphel-0.7.2.tar.gz
119      $ rm grauphel-0.7.2.tar.gz
120
121    You do have a directory ``/var/www/nextcloud/apps/grauphel`` now.
122 #. Using your browser, login as administrator into nextCloud and click
123    the "Apps" icon in the main menu ("+" icon).
124 #. Click on "Grauphel: Tomboy note server" and then on the "Enable" button.
125 #. In the main menu, click the "Tomboy notes" icon.
126
127 It may be that grauphel now shows you an error message::
128
129   PHP extension "oauth" is required
130
131 You have to install the PHP PECL oauth extension now.
132 On Debian 9 or higher, do the following::
133
134   $ apt install php-oauth
135   $ phpenmod oauth
136   $ /etc/init.d/apache2 restart
137
138 Reload the nextCloud page in your browser now.
139
140 .. note::
141    ``oauth-1.2.3`` is only needed on PHP 5.x
142    For PHP 7 simply use ``pecl install oauth``.
143
144
145 ========
146 Download
147 ========
148 .. LATESTRELEASE
149
150 See `grauphel downloads page <http://cweiske.de/grauphel-download.htm>`_
151 for all released versions.
152
153 ======
154 Author
155 ======
156 Christian Weiske, cweiske@cweiske.de, http://cweiske.de/
157
158
159 =====
160 Links
161 =====
162 - `Homepage`__
163 - `grauphel on apps.nextcloud.com`__
164 - `Source code repository`__
165 - `Github source code mirror`__
166
167 __ http://cweiske.de/grauphel.htm
168 __ http://apps.nextcloud.com/apps/grauphel
169 __ http://git.cweiske.de/grauphel.git/
170 __ https://github.com/cweiske/grauphel
171
172
173 =================
174 Development hints
175 =================
176 * JSON coming from Tomboy: Title is html-escaped already
177   (e.g. ``>`` is ``&gt;``).
178   We store it that way in the database, so there is no need to escape the
179   output.
180 * ``latest-sync-revision`` sent from Tomboy during PUT sync is already
181   incremented by 1.
182
183
184 Unit testing
185 ============
186 - `ownCloud unit testing documentation`__
187 - `grauphel on Travis CI`__
188
189   .. image:: https://travis-ci.org/cweiske/grauphel.svg
190      :target: https://travis-ci.org/cweiske/grauphel
191
192 __ https://doc.owncloud.org/server/8.0/developer_manual/core/unit-testing.html
193 __ https://travis-ci.org/cweiske/grauphel
194
195
196 Releasing grauphel
197 ==================
198 To release a new version, do the following:
199
200 #. Increase version number in ``appinfo/version`` and ``appinfo/info.xml``.
201 #. Validate ``appinfo/info.xml``::
202
203      $ xmllint --noout --schema tools/info.xsd appinfo/info.xml
204
205 #. Validate ``appinfo/database.xml``::
206
207      $ xmllint --noout --schema tools/database.xsd appinfo/database.xml
208
209 #. Fill the ``ChangeLog`` file with the changes since the last release,
210    mention the new version number.
211 #. Update ``README.rst`` and increase the version number
212 #. Create the grauphel release file with::
213
214      $ phing
215
216    The file will be in ``dist/``
217 #. Test the release on a server
218 #. Tag the release in git
219 #. Upload the release to http://cweiske.de/grauphel.htm with::
220
221      $ cd ~/Dev/html/cweiske.de
222      $ ./scripts/update-grauphel.sh
223
224 #. Upload the new release on
225    https://apps.nextcloud.com/developer/apps/releases/new
226
227    Signature::
228
229      $ openssl dgst -sha512 -sign ~/.nextcloud/certificates/grauphel.key dist/grauphel-0.7.2.tar.gz | openssl base64