deleting files works now
[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 - paste editing
16
17   - add new files
18   - delete existing files
19 - multiple files in one paste
20 - syntax highlighting with GeSHi
21 - rST rendering
22
23
24 ============
25 Dependencies
26 ============
27 phorkie stands on the shoulders of giants.
28
29
30 Install VersionControl_Git
31 ==========================
32 ::
33
34   $ pear install versioncontrol_git-alpha
35
36
37 Install GeSHi
38 =============
39 ::
40
41   $ pear channel-discover mediawiki.googlecode.com/svn
42   $ pear install mediawiki/geshi
43
44 Note that this version of GeSHi is a bit outdated, but it's the fastest
45 way to install it.
46
47
48 Install Twig
49 ============
50 ::
51
52   $ pear channel-discover pear.twig-project.org
53   $ pear install twig/Twig
54
55
56 =====
57 HowTo
58 =====
59
60 Make git repositories clonable
61 ==============================
62 To make git repositories clonable, you need to install ``git-daemon``
63 (``git-daemon-run`` package on Debian/Ubuntu).
64
65 Now make the repositories available by symlinking the paste repository
66 directory (``$GLOBALS['phorkie']['cfg']['repos']`` setting) into
67 ``/var/cache/git``, e.g.::
68
69   $ ln -s /home/user/www/paste/repos /var/cache/git/paste
70
71 Edit your ``config.php`` and set the ``$GLOBALS['phorkie']['cfg']['git']['public']``
72 setting to ``git://$yourhostname/git/paste/``.
73 The rest will be appended automatically.
74
75
76 You're on your own to setup writable repositories.
77
78
79 =================
80 Technical details
81 =================
82
83 TODO
84 ====
85 - search
86 - OpenID-Login to get username+email as authorship information
87 - sidebar: history
88 - image upload
89 - document how to keep disk usage low (block size)
90 - comments
91 - when 2 people edit, merge changes
92 - diff changes
93 - configurable highlights
94
95
96 URLs
97 ====
98
99 ``/``
100   Index page. Shows form for new paste
101 ``/[0-9]+``
102   Display page for paste
103 ``/[0-9]/edit``
104   Edit the paste
105 ``/[0-9]+/raw/(.+)``
106   Display raw file contents
107 ``/[0-9]/delete``
108   Delete the paste
109 ``/search(/.+)?``
110   Search for term
111 ``/list(/[0-9])?``
112   List all pastes
113
114
115 Internal directory layout
116 =========================
117 ::
118
119   repos/
120     1/ - git repository for paste #1
121       .git/
122         description - Description for the repository
123     2/ - git repository for paste #2
124
125
126 Search
127 ======
128 Use ``ack-grep``
129
130
131
132