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