1 | ========= |
---|
2 | OpenBlock |
---|
3 | ========= |
---|
4 | |
---|
5 | OpenBlock is a web application that allows users to browse and search |
---|
6 | their local area for "hyper-local news" - to see what's going on |
---|
7 | recently in the immediate geographic area. |
---|
8 | |
---|
9 | OpenBlock began life as the open-source code released by |
---|
10 | Everyblock.com in June 2009. Originally created by Adrian Holovaty |
---|
11 | and the Everyblock team, it is now developed as an open-source (GPL) |
---|
12 | project at http://openblockproject.org. |
---|
13 | |
---|
14 | Funding for the initial creation of Everyblock and the ongoing |
---|
15 | development of OpenBlock is provided by the Knight Foundation |
---|
16 | (http://www.knightfoundation.org/). |
---|
17 | |
---|
18 | ==================== |
---|
19 | System Requirements |
---|
20 | ==================== |
---|
21 | |
---|
22 | Linux or some other Unix flavor; Mac OSX might work. |
---|
23 | |
---|
24 | python 2.6 (2.7 might work) |
---|
25 | postgresql |
---|
26 | postgis |
---|
27 | libgdal |
---|
28 | libxml2 |
---|
29 | libxslt |
---|
30 | git |
---|
31 | |
---|
32 | ========================================= |
---|
33 | Quickstart: Install and Set Up Demo Site |
---|
34 | ========================================= |
---|
35 | |
---|
36 | These instructions will install the software in an isolated |
---|
37 | python environment using virtualenv ( http://pypi.python.org/pypi/virtualenv ) |
---|
38 | For detailed instructions and further steps, see obdemo/README.txt:: |
---|
39 | |
---|
40 | $ git clone git://github.com/openplans/openblock.git openblock |
---|
41 | $ cd openblock |
---|
42 | $ python bootstrap.py |
---|
43 | |
---|
44 | |
---|
45 | Optionally you can edit obdemo/obdemo/real_settings.py at this stage. |
---|
46 | It's a good idea to look at it, at least to get an idea of what can be |
---|
47 | configured. |
---|
48 | |
---|
49 | Now you can set up the database and start the server:: |
---|
50 | |
---|
51 | $ source bin/activate |
---|
52 | $ sudo -u postgres oblock setup_db |
---|
53 | $ ./manage.py syncdb |
---|
54 | $ ./manage.py runserver |
---|
55 | |
---|
56 | |
---|
57 | If all goes well, you should be able to visit the demo site at: |
---|
58 | http://localhost:8000 |
---|
59 | |
---|
60 | If you encounter problems, double check that you have the basic system |
---|
61 | requirements installed and then have a look at the step-by-step |
---|
62 | instructions in obdemo/README.txt. |
---|
63 | |
---|
64 | For more help, you can try the ebcode group: |
---|
65 | http://groups.google.com/group/ebcode |
---|
66 | or look for us in the #openblock IRC channel on irc.freenode.net. |
---|
67 | |
---|
68 | |
---|
69 | ============== |
---|
70 | For Developers |
---|
71 | ============== |
---|
72 | |
---|
73 | This is a Django application, so it's highly recommended that you have |
---|
74 | familiarity with the Django Web framework. The best places to learn |
---|
75 | are the official documentation (http://docs.djangoproject.com/) and |
---|
76 | the free Django Book (http://www.djangobook.com/). Note that OpenBlock |
---|
77 | requires Django 1.1 and as of this writing does not yet work with |
---|
78 | Django 1.2 or later. |
---|
79 | |
---|
80 | Before you dive in, it's *highly* recommend you spend a little bit of |
---|
81 | time browsing around http://demo.openblockproject.org and/or |
---|
82 | http://EveryBlock.com to get a feel for what this software does. |
---|
83 | |
---|
84 | Also, for a light conceptual background on some of this, particularly the |
---|
85 | data storage aspect, watch the video "Behind the scenes of EveryBlock.com" |
---|
86 | here: http://blip.tv/file/1957362 |
---|
87 | |
---|
88 | |
---|
89 | ========================================== |
---|
90 | Creating a Custom Site Based on OpenBlock |
---|
91 | ========================================== |
---|
92 | |
---|
93 | This is documented in the "Quickstart" section of ebpub/README.TXT. |
---|
94 | For an example, have a look in obdemo/ which was set up in that |
---|
95 | fashion. |
---|
96 | |
---|
97 | For installation in this case, you can just use the bootstrap.py |
---|
98 | script and do the rest of the setup by hand. You can look at |
---|
99 | pavement.py to get an idea of what needs doing, and/or modify it for |
---|
100 | your own use. |
---|
101 | |
---|
102 | Things You Will Need |
---|
103 | ==================== |
---|
104 | |
---|
105 | Details are in ebpub/README.TXT, but briefly to get anything useful |
---|
106 | out of your site, at mininum you will need to do the following: |
---|
107 | |
---|
108 | 1. A database of streets in your city; for example |
---|
109 | TIGER/Line files from http://www.census.gov/geo/www/tiger/ |
---|
110 | See ebpub/README.TXT |
---|
111 | |
---|
112 | 2. Decide what locations are interesting in your area - for example, |
---|
113 | neighborhoods, zip codes. Obtain shapefiles of the boundaries of |
---|
114 | those locations, and feed them in. See ebpub/README.TXT |
---|
115 | |
---|
116 | 3. Decide what news sources you want to feed in. |
---|
117 | |
---|
118 | a. Configure the system with schemas for them. See |
---|
119 | ebpub/README.TXT |
---|
120 | |
---|
121 | b. Write scraper scripts to retrieve your news sources and feed |
---|
122 | it in. See ebdata/README.TXT |
---|
123 | |
---|
124 | |
---|
125 | This is currently a *lot* of work. We're planning to simplify this |
---|
126 | process as much as we can :) |
---|
127 | |
---|
128 | The obdemo/bin/bootstrap_demo.sh script does all this for the demo |
---|
129 | site. You can dive into the other scripts that it calls to get more |
---|
130 | details on how it all works. |
---|
131 | |
---|
132 | |
---|
133 | ============= |
---|
134 | Code Contents |
---|
135 | ============= |
---|
136 | |
---|
137 | This distribution contains a number of packages, summarized below: |
---|
138 | |
---|
139 | |
---|
140 | obdemo |
---|
141 | ====== |
---|
142 | |
---|
143 | The code and configuration used by http://demo.openblockproject.org. |
---|
144 | This is useful as an example of how to set up your own site based on |
---|
145 | OpenBlock, and is a great place to start. It primarily uses the ebpub |
---|
146 | package, and is set up with Boston, MA as the area of interest. |
---|
147 | |
---|
148 | For more information, see obdemo/README.txt |
---|
149 | |
---|
150 | |
---|
151 | ebblog |
---|
152 | ====== |
---|
153 | |
---|
154 | The blog application used by http://blog.everyblock.com |
---|
155 | |
---|
156 | Only of interest if you want to bundle a simple blog with your |
---|
157 | OpenBlock site; you can probably ignore this. |
---|
158 | |
---|
159 | For more information, see ebblog/README.TXT |
---|
160 | |
---|
161 | ebdata |
---|
162 | ====== |
---|
163 | |
---|
164 | Code to help write scripts that import/crawl/parse data into ebpub. |
---|
165 | |
---|
166 | You *will* need to write such scripts to get OpenBlock to do anything |
---|
167 | useful; that is how you feed local news into the system. |
---|
168 | |
---|
169 | For more information, see ebdata/README.TXT |
---|
170 | |
---|
171 | |
---|
172 | ebgeo |
---|
173 | ===== |
---|
174 | |
---|
175 | The eb map system. This is mostly used for rendering and serving map |
---|
176 | tiles with Mapnik. |
---|
177 | |
---|
178 | ebgeo also contains some clustering display logic used by ebpub, so |
---|
179 | you need to have it installed even if you don't use Mapnik. |
---|
180 | (TODO: we should break that dependency) |
---|
181 | |
---|
182 | For more information, see ebgeo/README.TXT |
---|
183 | |
---|
184 | |
---|
185 | ebinternal |
---|
186 | ========== |
---|
187 | |
---|
188 | Internal applications for the EveryBlock team. |
---|
189 | |
---|
190 | Most OpenBlock users probably won't need this. |
---|
191 | Not used by obdemo. |
---|
192 | |
---|
193 | ebinternal consists of two apps, citypoll and feedback. citypoll |
---|
194 | powers EveryBlock's city voting system, both on EveryBlock.com and on |
---|
195 | the iPhone app. feeback manages the feedback received from the |
---|
196 | feedback forms at the bottom of almost every page on EveryBlock.com. |
---|
197 | |
---|
198 | For more information, see ebinternal/README.TXT |
---|
199 | |
---|
200 | |
---|
201 | ebpub |
---|
202 | ===== |
---|
203 | |
---|
204 | Publishing system for block-specific news, as used by EveryBlock.com. |
---|
205 | |
---|
206 | This is the core of an OpenBlock site, providing the web interface |
---|
207 | that users see as well as the underlying data models. You need this. |
---|
208 | |
---|
209 | For more information, see ebpub/README.TXT |
---|
210 | |
---|
211 | |
---|
212 | ebwiki |
---|
213 | ====== |
---|
214 | |
---|
215 | A basic wiki. |
---|
216 | |
---|
217 | I'm not even sure if this is used on everyblock.com anymore. |
---|
218 | Probably not useful to most OpenBlock users. |
---|
219 | |
---|
220 | For more information, see ebwiki/README.TXT |
---|
221 | |
---|
222 | |
---|
223 | everyblock |
---|
224 | =========== |
---|
225 | |
---|
226 | This package contains code/templates that are specific to |
---|
227 | EveryBlock.com. They were released to fulfill the terms of the grant |
---|
228 | that funded EveryBlock's development and are likely not of general |
---|
229 | use. |
---|
230 | |
---|
231 | For more information, see everyblock/README.TXT |
---|
232 | |
---|
233 | obutil |
---|
234 | ====== |
---|
235 | |
---|
236 | installation and utilities package for openblock virtual envs |
---|