ignore dist files
[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 Date_HumanDiff
49 ======================
50 ::
51
52   $ pear install https://github.com/downloads/cweiske/Date_HumanDiff/Date_HumanDiff-0.1.0.tgz
53
54
55 Install GeSHi
56 =============
57 ::
58
59   $ pear channel-discover mediawiki.googlecode.com/svn
60   $ pear install mediawiki/geshi
61
62 Note that this version of GeSHi is a bit outdated, but it's the fastest
63 way to install it.
64
65
66 Install Twig
67 ============
68 ::
69
70   $ pear channel-discover pear.twig-project.org
71   $ pear install twig/Twig
72
73
74 =====
75 HowTo
76 =====
77
78 Make git repositories clonable
79 ==============================
80 To make git repositories clonable, you need to install ``git-daemon``
81 (``git-daemon-run`` package on Debian/Ubuntu).
82
83 Now make the repositories available by symlinking the paste repository
84 directory (``$GLOBALS['phorkie']['cfg']['repos']`` setting) into
85 ``/var/cache/git``, e.g.::
86
87   $ ln -s /home/user/www/paste/repos/git /var/cache/git/paste
88
89 Edit your ``config.php`` and set the ``$GLOBALS['phorkie']['cfg']['git']['public']``
90 setting to ``git://$yourhostname/git/paste/``.
91 The rest will be appended automatically.
92
93
94 You're on your own to setup writable repositories.
95
96
97 =================
98 Technical details
99 =================
100
101 TODO
102 ====
103 - filters (xmllint --format, rapper)
104 - search
105 - OpenID-Login to get username+email as authorship information
106 - document how to keep disk usage low (block size)
107 - comments
108 - when 2 people edit, merge changes
109 - diff changes
110 - configurable highlights
111 - tags
112 - autotags for file types
113 - Atom feed for new pastes
114 - Atom feed for paste changes
115
116
117 URLs
118 ====
119
120 ``/``
121   Index page. Shows form for new paste
122 ``/[0-9]+``
123   Display page for paste
124 ``/[0-9]/edit``
125   Edit the paste
126 ``/[0-9]+/raw/(.+)``
127   Display raw file contents
128 ``/[0-9]/delete``
129   Delete the paste
130 ``/search(/.+)?``
131   Search for term
132 ``/list(/[0-9])?``
133   List all pastes
134
135
136 Internal directory layout
137 =========================
138 ::
139
140   repos/
141     work/
142       1/ - work directory for paste #1
143       2/ - work directory for paste #2
144     git/
145       1.git/ - git repository for paste #1
146         description - Description for the repository
147       2.git/ - git repository for paste #2
148
149
150 Search
151 ======
152 Use ``ack-grep``
153
154
155
156