Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 283 lines (207 sloc) 10.33 kb
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
1 WikiTrust is a MediaWiki extension that computes in real time the
2 reputation of wiki authors, and the trust of wiki text. Text trust is
3 displayed via different colors for the text background, from dark
4 orange (low trust) to white (maximum trust). The colors can be easily
5 changed by changing a skin file. WikiTrust also computes, for each
6 word of text, the author of the word, and the revision where the word
7 was first inserted. When clicking on a word, the user is sent to the
8 revision diff where the word was added. When hovering with the mouse
9 over a word, a pop-up displays the name of the word's author.
10
476377e README typos
B. Thomas Adler authored
11 The WikiTrust extension can be added to an existing wiki, or to a new
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
12 one. If the extension is added to a new wiki, it will start computing
3429ef9 Improved the documentation.
Luca de Alfaro authored
13 reputations and trusts as soon as someone makes an edit, or requests
14 to view a trust-colored revision. The reputation and trust
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
15 computation takes some time, after which the coloring is available.
3429ef9 Improved the documentation.
Luca de Alfaro authored
16 If you switch the extension off, then on, the extension will compute
17 the missing reputation and trust values in a self-healing,
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
18 fault-tolerant fashion.
19
20
21 AUTHORS:
22
23 The main developers are:
24
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
25 - Luca de Alfaro (luca@dealfaro.com)
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
26 - Ian Pye (ipye@gmail.com)
476377e README typos
B. Thomas Adler authored
27 - Bo Adler (thumper@alumni.caltech.edu)
940b750 Some initial changes for WMF.
Luca de Alfaro authored
28
29 Other contributors:
30
31 - Krishnendu Chatterjee (krish.chat@gmail.com)
d195717 mwext: added acknowledgement for Jason
B. Thomas Adler authored
32 - Jason Benterou
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
33
34
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
35 INSTALLATION PROCEDURE:
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
36
37 We describe in this README file the use of WikiTrust as a MediaWiki
940b750 Some initial changes for WMF.
Luca de Alfaro authored
38 extension.
39 Installation instructions for the MWF are given in README-WMF.
3429ef9 Improved the documentation.
Luca de Alfaro authored
40
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
41
3429ef9 Improved the documentation.
Luca de Alfaro authored
42 PREREQUISITES:
af4b60d I changed histiogram -> histogram and made some other documentation fixe...
Luca de Alfaro authored
43
566b14d @lucadealfaro Improved the README
lucadealfaro authored
44 1) Install mysql and mediawiki. In Ubuntu / Debian, you can install
45 the packages:
0070919 Made it easier to build under godi
Luca de Alfaro authored
46
566b14d @lucadealfaro Improved the README
lucadealfaro authored
47 mediawiki
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
48 php5-cli
566b14d @lucadealfaro Improved the README
lucadealfaro authored
49 mysql-server
50 mysql-client
51 tidy
cbb7a51 Changed to 12 past revisions, some changes to readme files.
Luca de Alfaro authored
52
566b14d @lucadealfaro Improved the README
lucadealfaro authored
53 In other distributions, follow the instructions at
54 www.mediawiki.org.
0070919 Made it easier to build under godi
Luca de Alfaro authored
55
953f9a4 Removed a bug in the merging of lists, and improved the README file.
Luca de Alfaro authored
56
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
57 ================================================================
0e3b9c1 Improved the README file.
Luca de Alfaro authored
58
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
59 THE FAST WAY:
953f9a4 Removed a bug in the merging of lists, and improved the README file.
Luca de Alfaro authored
60
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
61 We provide a statically-linked executable, which is built under
62 Ubuntu, but should work under many versions of linux.
63 If you are happy using it, then you can use these abbreaviated
64 instructions. Otherwise, see at the bottom of this file for an
65 alternative to step 2) below, which involves compiling
66 eval_online_wiki from source.
0e3b9c1 Improved the README file.
Luca de Alfaro authored
67
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
68 2) Take a deep breath.
953f9a4 Removed a bug in the merging of lists, and improved the README file.
Luca de Alfaro authored
69
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
70 3) Next, you need to unpack and install the trust coloring extension in
71 mediawiki. If you have downloaded a tarball, you can do:
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
72
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
73 $ cp wikitrust-xyz.tgz /var/lib/mediawiki/extensions
74 $ cd /var/lib/mediawiki/extensions
75 $ tar xfvz wikitrust-xyz.tgz
76
77 where xyz is the version information for the tarball.
78 You should also move the executables to the
79 /var/lib/mediawiki/extensions directory.
80
81 If you use git, then you should really be compiling WikiTrust
82 from scratch; otherwise, what's the point?
83
84 4) You should activate the extension by editing the file
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
85 LocalSettings.php (part of the MediaWiki installation), adding the
86 following lines:
87
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
88 $wgUseTidy = true; // Enable Tidy
89 $wgUseAjax = true; // Enable Ajax (needed for voting)
0fce19a extension: more fixing of paths
B. Thomas Adler authored
90 require_once( $IP . "/extensions/WikiTrust/WikiTrust.php" );
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
91
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
92 You can look in WikiTrust.php (located at WikiTrust/WikiTrust.php)
93 for a list of all the configurable variables. The defaults should
5ae0c16 mwext: update README, set better default for logging
B. Thomas Adler authored
94 be correct for most installation, but you can override
95 values by placing assignments in your LocalSettings.php
96 after the require_once() call for the WikiTrust extension.
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
97
5ae0c16 mwext: update README, set better default for logging
B. Thomas Adler authored
98 Some settings that you might like to use instead:
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
99
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
100 $wgWikiTrustGadget = "gadget-WikiTrust";
101 By default the trust tab is always visible.
102 Set this as above to make it visible only to users opting in.
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
103
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
104 $wgWikiTrustShowVoteButton = false;
5ae0c16 mwext: update README, set better default for logging
B. Thomas Adler authored
105 The default is to always show a "vote" button; disable this
106 feature by setting it to false.
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
107
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
108 $wgWikiTrustLog = "/tmp/{$wgDBname}-trust.log";
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
109 This creates a log of the analysis of how useful each contribution to
110 the wiki is, as well as a log of all user reputation changes.
111 We advise you to create such a log: it contains very useful
112 information, and it is likely that we will develop a variety of tools
113 to extract the information present. You don't want to miss out. Note
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
114 that you are responsible for rotating and compressing the log (e.g., via
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
115 logrotate, or /etc/logrotate.conf or /etc/logrotate.d/
5ae0c16 mwext: update README, set better default for logging
B. Thomas Adler authored
116
117
118 As an example, we usually test with these lines added to
119 our LocalSettings.php file:
120
121 $wgUseTidy = true;
122 $wgUseAjax = true;
123 require_once( $IP . "/extensions/WikiTrust/WikiTrust.php" );
124
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
125
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
126 5) You need to make the installation readable from the web server.
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
127
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
128 $ chmod a+rX /var/lib/mediawiki/extensions/WikiTrust/*.php
129 $ chmod -R a+rX /var/lib/mediawiki/extensions/WikiTrust/includes
130 $ chmod -R a+rX /var/lib/mediawiki/extensions/WikiTrust/css
131 $ chmod -R a+rX /var/lib/mediawiki/extensions/WikiTrust/js
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
132
940b750 Some initial changes for WMF.
Luca de Alfaro authored
133 Be careful not to give access to the web server to the other files,
134 as there may be obscure security issues associated with, for
135 instance, your web server having access to the .git directory (if
136 you got wikitrust via git).
3429ef9 Improved the documentation.
Luca de Alfaro authored
137
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
138 6) You need to create the database tables that the trust coloring
139 extension will use. Assuming that the mediawiki database is called
140 "wikidb" (this is the default name: you give a name to the database
141 when you create the wiki instance during the MediaWiki installation
142 process), proceed as follows:
143
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
144 $ cd sql
145 $ ./create_db.php "path_to_mediawiki" "mysql_root_user_name"
146
147 where path_to_mediawiki is the path to the mediawiki installation.
148 A typical command for Ubuntu is:
149 $ ./create_db.php /usr/share/mediawiki root
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
150
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
151 If you need to remove the tables first, then do instead:
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
152
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
153 $ cd sql
154 $ ./create_db.php "path_to_mediawiki" "mysql_root_user_name" remove
155 $ ./create_db.php "path_to_mediawiki" "mysql_root_user_name"
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
156
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
157 7) If there are already revisions in the wiki, you should first
158 analyze their trust, via:
3429ef9 Improved the documentation.
Luca de Alfaro authored
159
5620bdb README: fix option
B. Thomas Adler authored
160 $ ./eval_online_wiki -n_events 1000000 -db_user <username> -db_pass <pwd> -db_name <db_name>
3429ef9 Improved the documentation.
Luca de Alfaro authored
161
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
162 The '1000000' means that eval_online_wiki will compute the trust of
163 at most 1000000 revisions, then stop. You can repeat the above
164 command as many times as needed (or with a larger or smaller bound)
165 until all revisions are analyzed for trust; each invocation will
166 analyze at most 1000000 additional revisions. Typical values for
167 these parameters are:
3429ef9 Improved the documentation.
Luca de Alfaro authored
168
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
169 username: wikiuser
170 db_name: wikidb
3429ef9 Improved the documentation.
Luca de Alfaro authored
171
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
172 If you wish to redo the analysis from scratch, throwing away the
173 results of previous analyses, you can use the option '-delete_all':
3429ef9 Improved the documentation.
Luca de Alfaro authored
174
5620bdb README: fix option
B. Thomas Adler authored
175 $ ./eval_online_wiki -delete_all -n_events 1000000 -db_user <username> -db_pass <pwd> -db_name <db_name>
3429ef9 Improved the documentation.
Luca de Alfaro authored
176
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
177 Warning: the analysis can take a long time on very large wikis, so
178 do not use the option '-delete_all' lightly!
3429ef9 Improved the documentation.
Luca de Alfaro authored
179
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
180 8) You should now see a trust tab. Click on it, or edit a revision, and
181 the trust of all revision text, and the reputation of all authors,
182 will be computed.
3429ef9 Improved the documentation.
Luca de Alfaro authored
183
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
184 The trust coloring is updated automatically whenever a user edits
185 an article, or requests to view the trust informaton for a
186 revision. In particular, when a user edits an article, or when
187 someone asks to view the trust information, WikiTrust computes the
188 trust coloring not only for the newest revision, but for all past
189 revisions of all wiki articles that have not been colored yet.
5e11242 Minor changes to README files.
Luca de Alfaro authored
190
feb83ea @lucadealfaro Improved README files
lucadealfaro authored
191 9) If you wish to upload pages to the wiki from a dump file, go to the
192 test-scripts directory, and follow the instructions in the README
193 file there.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
194
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
195 ================================================================
af4b60d I changed histiogram -> histogram and made some other documentation fixe...
Luca de Alfaro authored
196
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
197 COMPILING FROM SOURCE
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
198
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
199 If you like, you can also build the packages from source.
200 Follow these instructions in place of step 2) above.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
201
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
202 2a) You need to install some packages for Ocaml. There are two ways.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
203
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
204 2a1) The best way is to use godi (http://godi.camlcity.org), as this
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
205 provides a simple way to get all the packages you need, and it
206 enables you to build everything in userspace.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
207
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
208 Get godi from http://godi.camlcity.org/godi/index.html and
209 download godi. Follow the instructions to install it. Install
a8acab8 Added the info on godi and zlib.
Luca de Alfaro authored
210 the following Ocaml packages from godi (use godi_console to
211 install them):
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
212
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
213 godi-extlib
214 godi-findlib
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
215 godi-json-wheel
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
216 godi-ocaml-mysql
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
217 godi-ocamlnet
218 godi-pcre
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
219 godi-sexplib
220 godi-type-conv
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
221 godi-xml-light
9c7fe3a docs: updated README files to mention other dependencies
B. Thomas Adler authored
222 godi-zip
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
223
568d06b update instructions for godi install
B. Thomas Adler authored
224 For the godi-ocaml-mysql package, you will also need
225 the mysql client library. On Ubuntu, this is package
226 libmysqlclient16-dev
227
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
228 2a2) If you do not wish to use godi, you can get the above packages
229 either from their source, or from the linux distribution you
230 are using. For Ubuntu, you can use the following packages:
abdbb67 Updated the README file.
Luca de Alfaro authored
231
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
232 ocaml (version 3.10.0 or greater)
233 ocaml-base
234 ocaml-native-compilers
235 ocaml-findlib
236 libmysql-ocaml
237 libmysql-ocaml-dev
238 libextlib-ocaml-dev
239 python-mysqldb
d22dd10 qureying the xml api
Ian Pye authored
240 libxml-light-ocaml-dev
241 libzip-ocaml-dev
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
242
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
243 You also need:
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
244
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
245 type-conv
246 sexplib
247
248 Which are available from
249 http://www.janestcapital.com/ocaml/index.html .
250
251 2b) Make OcamlLdaLibs and install them.
252 If you can install without sudo rights:
253 $ make all
0e9e15a fixed building instruction for godi
B. Thomas Adler authored
254 If you used godi (and don't need sudo rights):
255 $ make all-godi
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
256 If you did not use godi, so that you need sudo rights to install:
257 $ make all-sudo
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
258
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
259 2c) Get the code using git:
260
261 $ cd /var/lib/mediawiki/extensions
262 $ git clone git://trust.cse.ucsc.edu/share/git/WikiTrust.git
263
264 2d) Compile the code. There are various branches of git available,
265 and by default you are in the master branch, which is fine.
266 Look at the web documentation to see if you prefer any other
267 branch. You can compile the code with:
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
268
eaf2d6d Fixed a bit the README file, and proceeded testing up to creation of DB ...
Luca de Alfaro authored
269 $ cd WikiTrust
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
270 $ make clean ; make all ; make allopt
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
271
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
272 This creates an eval_online_wiki executable, which is what
273 computes text trust and origin, and author reputation, in a wiki.
274 The executable is called whenever someone edit the wiki, or wishes
275 to see a trust-colored version of a page.
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
276
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
277 ================================================================
7f063a6 Removed top README file in preparation for file reorganization
Luca de Alfaro authored
278
279 BATCH MODE:
280
281 The tool has also a batch mode, useful for computing statistical
282 quantities of a wiki. Please see batch/README for more information.
Something went wrong with that request. Please try again.