finish todo item
[phorkie.git] / README.rst
1 ************************************
2 phorkie - PHP and Git based pastebin
3 ************************************
4 Self-hosted pastebin software written in PHP.
5 Pastes are editable, may have multiple files and are stored in git repositories.
6
7 Homepage: http://sourceforge.net/p/phorkie/
8
9 .. contents:: Table of Contents
10
11 ========
12 Features
13 ========
14 - every paste is a git repository
15
16   - repositories can be cloned
17   - clone url can be displayed
18 - paste editing
19
20   - add new files
21   - delete existing files
22   - replace file with upload
23 - multiple files in one paste
24 - syntax highlighting with GeSHi
25 - rST rendering
26 - image upload + display
27 - external tool support
28
29   - xmllint
30   - php syntax check
31 - history in the sidebar
32
33   - old files can be downloaded easily
34
35 ============
36 Dependencies
37 ============
38 phorkie stands on the shoulders of giants.
39
40
41 Install VersionControl_Git
42 ==========================
43 ::
44
45   $ pear install versioncontrol_git-alpha
46
47
48 Install GeSHi
49 =============
50 ::
51
52   $ pear channel-discover mediawiki.googlecode.com/svn
53   $ pear install mediawiki/geshi
54
55 Note that this version of GeSHi is a bit outdated, but it's the fastest
56 way to install it.
57
58
59 Install Twig
60 ============
61 ::
62
63   $ pear channel-discover pear.twig-project.org
64   $ pear install twig/Twig
65
66
67 =====
68 HowTo
69 =====
70
71 Make git repositories clonable
72 ==============================
73 To make git repositories clonable, you need to install ``git-daemon``
74 (``git-daemon-run`` package on Debian/Ubuntu).
75
76 Now make the repositories available by symlinking the paste repository
77 directory (``$GLOBALS['phorkie']['cfg']['repos']`` setting) into
78 ``/var/cache/git``, e.g.::
79
80   $ ln -s /home/user/www/paste/repos/git /var/cache/git/paste
81
82 Edit your ``config.php`` and set the ``$GLOBALS['phorkie']['cfg']['git']['public']``
83 setting to ``git://$yourhostname/git/paste/``.
84 The rest will be appended automatically.
85
86
87 You're on your own to setup writable repositories.
88
89
90 =================
91 Technical details
92 =================
93
94 TODO
95 ====
96 - search
97 - OpenID-Login to get username+email as authorship information
98 - document how to keep disk usage low (block size)
99 - comments
100 - when 2 people edit, merge changes
101 - diff changes
102 - configurable highlights
103 - tags
104 - autotags for file types
105 - Atom feed for new pastes
106 - Atom feed for paste changes
107
108
109 URLs
110 ====
111
112 ``/``
113   Index page. Shows form for new paste
114 ``/[0-9]+``
115   Display page for paste
116 ``/[0-9]/edit``
117   Edit the paste
118 ``/[0-9]+/raw/(.+)``
119   Display raw file contents
120 ``/[0-9]/delete``
121   Delete the paste
122 ``/search(/.+)?``
123   Search for term
124 ``/list(/[0-9])?``
125   List all pastes
126
127
128 Internal directory layout
129 =========================
130 ::
131
132   repos/
133     work/
134       1/ - work directory for paste #1
135       2/ - work directory for paste #2
136     git/
137       1.git/ - git repository for paste #1
138         description - Description for the repository
139       2.git/ - git repository for paste #2
140
141
142 Search
143 ======
144 Use ``ack-grep``
145
146
147
148