-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
executable file
·102 lines (67 loc) · 3.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
CiWiki is a fork of DidiWiki
and I kept the name of Didiwiki for the binary.
Please, don't forget to read file in the folder docs
JP Redonnet.
DidiWiki README
==============
DidiWiki is a small and simple WikiWikiWeb implementation written in
C. It's intended for personal use for notes, Todo lists, etc. It includes
its' own webserver and hopefully its as simple as just compiling, running
and pointing your browser at it.
Installation
============
To build do the usual:
./configure
make
sudo make install
If you don't want to install the binary, don't do 'sudo make install'
and you can run DidiWiki right from the src dir.
On startup it'll tell you the address to point your browser at.
You should then be ready to go.
If upgrading from an earlier version its a good idea to delete
~/.didiwiki/DidiHelp before running so you get the latest version of
the help file.
Remote API
==========
Starting with version 0.5 DidiWiki has a very simple 'REST' like http api.
Hopefully this will make it possible to write alternate front ends to didiwiki.
The api looks like this with parameter passable via GET or POST;
http://didiwiki/api/page/get?page=XXX
Get the raw wiki text for specified page. Returns http 500 code if
page does not exist.
http://didiwiki/api/page/set?page=XXX&text=XXX
Set the wikitext of a page. Page is created if it doesn't exist.
http://didiwiki/api/page/exists?page=XXX
Returns 'success' if page exists, 500 error if not.
http://didiwiki/api/page/delete?page=XXX
Deletes a page.
http://didiwiki/api/pages
Returns a separated list ( one entry per line containing page
title,TAB,modified date) of wiki pages with the most recently modified
first.
http://didiwiki/api/search?expr=XXX
Like the above but lists only pages which contain 'expr'
Notes & Excuses
===============
- If you want to contribute, please check the TODO !
- Pages are stored in ~/.didiwiki ( you can override this by setting
'DIDIWIKIHOME' env var to a valid path. ). You can add a styles.css
to this directory to override the 'inbuilt' stylesheet.
- The webserver part is heavily based on cvstrac's internal server,
following the same kind of process;
- Its a pretty simple lightweight forking server. A child process is
forked to handle each http request.
- These forked children are assumed to not be around for very long (
less than a second ), thus no real attempt is made to free up
memory in these child processes.
- Its probably not very secure at all. !!PLEASE DONT RUN AS ROOT!!
- The code uses asprintf in a couple of places. I dont know how portable
this is to non Linux systems. If its a problem to you Feel free to send
patches.
- You can debug segv's by running like 'didiwiki debug' which will not
start the http server, it existing in a single process but expecting the
http request on stdin.
- The formatting style is very similar to that of kwiki's - I just like
kwiki :-)
- I wrote it in C as I've mostly forgotten Python, Perl etc
( and I wanted it to fit easily on a PDA ).