Show More
@@ -1,42 +1,47 b'' | |||
|
1 | 1 | syntax: glob |
|
2 | 2 | *.pyc |
|
3 | 3 | *.swp |
|
4 | 4 | *.sqlite |
|
5 | 5 | *.tox |
|
6 | 6 | *.egg-info |
|
7 | 7 | *.egg |
|
8 | 8 | *.mo |
|
9 | 9 | .eggs/ |
|
10 | 10 | tarballcache/ |
|
11 | 11 | |
|
12 | 12 | syntax: regexp |
|
13 | 13 | ^rcextensions |
|
14 | 14 | ^build |
|
15 | 15 | ^dist/ |
|
16 | 16 | ^docs/build/ |
|
17 | 17 | ^docs/_build/ |
|
18 | 18 | ^data$ |
|
19 | 19 | ^sql_dumps/ |
|
20 | 20 | ^\.settings$ |
|
21 | 21 | ^\.project$ |
|
22 | 22 | ^\.pydevproject$ |
|
23 | 23 | ^\.coverage$ |
|
24 | 24 | ^kallithea/front-end/node_modules$ |
|
25 | 25 | ^kallithea/front-end/package-lock\.json$ |
|
26 | 26 | ^kallithea/front-end/tmp$ |
|
27 |
^kallithea/public/css/s |
|
|
27 | ^kallithea/public/css/select2-spinner\.gif$ | |
|
28 | ^kallithea/public/css/select2\.png$ | |
|
29 | ^kallithea/public/css/select2x2\.png$ | |
|
30 | ^kallithea/public/css/style\.css$ | |
|
31 | ^kallithea/public/css/style\.css\.map$ | |
|
28 | 32 | ^kallithea/public/js/bootstrap\.js$ |
|
29 | 33 | ^kallithea/public/js/jquery\.flot\.js$ |
|
30 | 34 | ^kallithea/public/js/jquery\.flot\.selection\.js$ |
|
31 | 35 | ^kallithea/public/js/jquery\.flot\.time\.js$ |
|
32 | 36 | ^kallithea/public/js/jquery\.min\.js$ |
|
37 | ^kallithea/public/js/select2\.js$ | |
|
33 | 38 | ^theme\.less$ |
|
34 | 39 | ^kallithea\.db$ |
|
35 | 40 | ^test\.db$ |
|
36 | 41 | ^Kallithea\.egg-info$ |
|
37 | 42 | ^my\.ini$ |
|
38 | 43 | ^fabfile.py |
|
39 | 44 | ^\.idea$ |
|
40 | 45 | ^\.cache$ |
|
41 | 46 | ^\.pytest_cache$ |
|
42 | 47 | /__pycache__$ |
@@ -1,305 +1,311 b'' | |||
|
1 | 1 | Kallithea License |
|
2 | 2 | ================= |
|
3 | 3 | |
|
4 | 4 | Kallithea as a whole is copyrighted by various authors and is licensed under |
|
5 | 5 | the terms of the GNU General Public License, version 3 (GPLv3), which is a |
|
6 | 6 | license published by the Free Software Foundation, |
|
7 | 7 | Inc. [A copy of GPLv3](/COPYING) is included herein. |
|
8 | 8 | |
|
9 | 9 | Some individual files have copyright notices and those who offer changes to |
|
10 | 10 | those files should update the copyright notices in those specific files if |
|
11 | 11 | they so chose. |
|
12 | 12 | |
|
13 | 13 | However, the definitive list of copyright holders for this project is kept in |
|
14 | 14 | [the about page template](kallithea/templates/about.html) so that it is |
|
15 | 15 | displayed appropriately when Kallithea is installed. This is the most |
|
16 | 16 | important place to update copyright notices. |
|
17 | 17 | |
|
18 | 18 | Third-Party Code Incorporated in Kallithea |
|
19 | 19 | ========================================== |
|
20 | 20 | |
|
21 | 21 | Various third-party code under GPLv3-compatible licenses is included as part |
|
22 | 22 | of Kallithea. |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | Alembic |
|
26 | 26 | ------- |
|
27 | 27 | |
|
28 | 28 | Kallithea incorporates an [Alembic](http://alembic.zzzcomputing.com/en/latest/) |
|
29 | 29 | "migration environment" in `kallithea/alembic`, portions of which is: |
|
30 | 30 | |
|
31 | 31 | Copyright © 2009-2016 by Michael Bayer. |
|
32 | 32 | Alembic is a trademark of Michael Bayer. |
|
33 | 33 | |
|
34 | 34 | and licensed under the MIT-permissive license, which is |
|
35 | 35 | [included in this distribution](MIT-Permissive-License.txt). |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | Bootstrap |
|
39 | 39 | --------- |
|
40 | 40 | |
|
41 | 41 | Kallithea uses the web framework called |
|
42 | 42 | [Bootstrap](http://getbootstrap.com/), which is: |
|
43 | 43 | |
|
44 | 44 | Copyright © 2011-2016 Twitter, Inc. |
|
45 | 45 | |
|
46 | 46 | and licensed under the MIT-permissive license, which is |
|
47 | 47 | [included in this distribution](MIT-Permissive-License.txt). |
|
48 | 48 | |
|
49 | 49 | It is not distributed with Kallithea, but will be downloaded |
|
50 | 50 | using the ''kallithea-cli front-end-build'' command. |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | Codemirror |
|
55 | 55 | ---------- |
|
56 | 56 | |
|
57 | 57 | Kallithea incorporates parts of the Javascript system called |
|
58 | 58 | [Codemirror](http://codemirror.net/), version 4.7.0, which is primarily: |
|
59 | 59 | |
|
60 | 60 | Copyright © 2013-2014 by Marijn Haverbeke <marijnh@gmail.com> |
|
61 | 61 | |
|
62 | 62 | and licensed under the MIT-permissive license, which is |
|
63 | 63 | [included in this distribution](MIT-Permissive-License.txt). |
|
64 | 64 | |
|
65 | 65 | Additional files from upstream Codemirror are copyrighted by various authors |
|
66 | 66 | and licensed under other permissive licenses. The sub-directories under |
|
67 | 67 | [.../public/codemirror](kallithea/public/codemirror) include the copyright and |
|
68 | 68 | license notice and information as they appeared in Codemirror's upstream |
|
69 | 69 | release. |
|
70 | 70 | |
|
71 | 71 | |
|
72 | 72 | |
|
73 | 73 | jQuery |
|
74 | 74 | ------ |
|
75 | 75 | |
|
76 | 76 | Kallithea uses the Javascript system called |
|
77 | 77 | [jQuery](http://jquery.org/). |
|
78 | 78 | |
|
79 | 79 | It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an |
|
80 | 80 | [MIT-permissive license](MIT-Permissive-License.txt). |
|
81 | 81 | |
|
82 | 82 | It is not distributed with Kallithea, but will be downloaded |
|
83 | 83 | using the ''kallithea-cli front-end-build'' command. |
|
84 | 84 | |
|
85 | 85 | |
|
86 | 86 | |
|
87 | 87 | DataTables |
|
88 | 88 | ---------- |
|
89 | 89 | |
|
90 | 90 | Kallithea incorporates the Javascript system called |
|
91 | 91 | [DataTables](http://www.datatables.net/) |
|
92 | 92 | which can be found together with their Corresponding Source in |
|
93 | 93 | https://github.com/DataTables/DataTables at tag 1.10.13 (mirrored at |
|
94 | 94 | https://kallithea-scm.org/repos/mirror/DataTables/files/1.10.13/ ). |
|
95 | 95 | |
|
96 | 96 | It is Copyright 2008-2015 SpryMedia Ltd. and is under an |
|
97 | 97 | [MIT-permissive license](MIT-Permissive-License.txt). |
|
98 | 98 | |
|
99 | 99 | |
|
100 | 100 | |
|
101 | 101 | Mergely |
|
102 | 102 | ------- |
|
103 | 103 | |
|
104 | 104 | Kallithea incorporates some code from the Javascript system called |
|
105 | 105 | [Mergely](http://www.mergely.com/), version 3.3.9. |
|
106 | 106 | [Mergely's license](http://www.mergely.com/license.php), a |
|
107 | 107 | [copy of which is included in this repository](LICENSE-MERGELY.html), |
|
108 | 108 | is (GPL|LGPL|MPL). Kallithea as GPLv3'd project chooses the GPL arm of that |
|
109 | 109 | tri-license. |
|
110 | 110 | |
|
111 | 111 | |
|
112 | 112 | |
|
113 | 113 | Select2 |
|
114 | 114 | ------- |
|
115 | 115 | |
|
116 |
Kallithea |
|
|
116 | Kallithea uses the Javascript system called | |
|
117 | 117 | [Select2](http://ivaynberg.github.io/select2/), which is: |
|
118 | 118 | |
|
119 | 119 | Copyright 2012 Igor Vaynberg (and probably others) |
|
120 | 120 | |
|
121 | 121 | and is licensed [under the following license](https://github.com/ivaynberg/select2/blob/master/LICENSE): |
|
122 | 122 | |
|
123 | 123 | > This software is licensed under the Apache License, Version 2.0 (the |
|
124 | 124 | > "Apache License") or the GNU General Public License version 2 (the "GPL |
|
125 | 125 | > License"). You may choose either license to govern your use of this |
|
126 | 126 | > software only upon the condition that you accept all of the terms of either |
|
127 | 127 | > the Apache License or the GPL License. |
|
128 | 128 | |
|
129 | 129 | A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included |
|
130 | 130 | in this distribution. |
|
131 | 131 | |
|
132 | 132 | Kallithea will take the Apache license fork of the dual license, since |
|
133 | 133 | Kallithea is GPLv3'd. |
|
134 | 134 | |
|
135 | It is not distributed with Kallithea, but will be downloaded | |
|
136 | using the ''kallithea-cli front-end-build'' command. | |
|
137 | ||
|
135 | 138 | |
|
136 | 139 | |
|
137 | 140 | Select2-Bootstrap-CSS |
|
138 | 141 | --------------------- |
|
139 | 142 | |
|
140 |
Kallithea |
|
|
143 | Kallithea uses some CSS from a system called | |
|
141 | 144 | [Select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css), which |
|
142 | 145 | is: |
|
143 | 146 | |
|
144 | 147 | Copyright © 2013 Tom Terrace (and likely others) |
|
145 | 148 | |
|
146 | 149 | and licensed under the MIT-permissive license, which is |
|
147 | 150 | [included in this distribution](MIT-Permissive-License.txt). |
|
148 | 151 | |
|
152 | It is not distributed with Kallithea, but will be downloaded | |
|
153 | using the ''kallithea-cli front-end-build'' command. | |
|
154 | ||
|
149 | 155 | |
|
150 | 156 | |
|
151 | 157 | History.js |
|
152 | 158 | ---------- |
|
153 | 159 | |
|
154 | 160 | Kallithea incorporates some CSS from a system called History.js, which is |
|
155 | 161 | |
|
156 | 162 | Copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com> |
|
157 | 163 | |
|
158 | 164 | Redistribution and use in source and binary forms, with or without |
|
159 | 165 | modification, are permitted provided that the following conditions are met: |
|
160 | 166 | |
|
161 | 167 | 1. Redistributions of source code must retain the above copyright notice, |
|
162 | 168 | this list of conditions and the following disclaimer. |
|
163 | 169 | |
|
164 | 170 | 2. Redistributions in binary form must reproduce the above copyright notice, |
|
165 | 171 | this list of conditions and the following disclaimer in the documentation |
|
166 | 172 | and/or other materials provided with the distribution. |
|
167 | 173 | |
|
168 | 174 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
169 | 175 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
170 | 176 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
171 | 177 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
|
172 | 178 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
|
173 | 179 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
|
174 | 180 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
175 | 181 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|
176 | 182 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
177 | 183 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
178 | 184 | POSSIBILITY OF SUCH DAMAGE. |
|
179 | 185 | |
|
180 | 186 | |
|
181 | 187 | |
|
182 | 188 | YUI |
|
183 | 189 | --- |
|
184 | 190 | |
|
185 | 191 | Kallithea incorporates parts of the Javascript system called |
|
186 | 192 | [YUI 2 — Yahoo! User Interface Library](http://yui.github.io/yui2/docs/yui_2.9.0_full/), |
|
187 | 193 | which is made available under the [BSD License](http://yuilibrary.com/license/): |
|
188 | 194 | |
|
189 | 195 | Copyright © 2013 Yahoo! Inc. All rights reserved. |
|
190 | 196 | |
|
191 | 197 | Redistribution and use of this software in source and binary forms, with or |
|
192 | 198 | without modification, are permitted provided that the following conditions are |
|
193 | 199 | met: |
|
194 | 200 | |
|
195 | 201 | * Redistributions of source code must retain the above copyright notice, this |
|
196 | 202 | list of conditions and the following disclaimer. |
|
197 | 203 | |
|
198 | 204 | * Redistributions in binary form must reproduce the above copyright notice, |
|
199 | 205 | this list of conditions and the following disclaimer in the documentation |
|
200 | 206 | and/or other materials provided with the distribution. |
|
201 | 207 | |
|
202 | 208 | * Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be |
|
203 | 209 | used to endorse or promote products derived from this software without |
|
204 | 210 | specific prior written permission of Yahoo! Inc. |
|
205 | 211 | |
|
206 | 212 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
|
207 | 213 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
208 | 214 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
209 | 215 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
|
210 | 216 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
211 | 217 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
212 | 218 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
|
213 | 219 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
214 | 220 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|
215 | 221 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
216 | 222 | |
|
217 | 223 | |
|
218 | 224 | Kallithea includes a minified version of YUI 2.9. To build yui.2.9.js: |
|
219 | 225 | |
|
220 | 226 | git clone https://github.com/yui/builder |
|
221 | 227 | git clone https://github.com/yui/yui2 |
|
222 | 228 | cd yui2/ |
|
223 | 229 | git checkout hudson-yui2-2800 |
|
224 | 230 | ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing |
|
225 | 231 | rm -f tmp.js |
|
226 | 232 | for m in yahoo event dom animation datasource autocomplete event-delegate; do |
|
227 | 233 | rm -f build/$m/$m.js |
|
228 | 234 | ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js |
|
229 | 235 | done |
|
230 | 236 | java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js |
|
231 | 237 | |
|
232 | 238 | In compliance with GPLv3 the Corresponding Source for this Object Code is made |
|
233 | 239 | available on |
|
234 | 240 | [https://kallithea-scm.org/repos/mirror](https://kallithea-scm.org/repos/mirror). |
|
235 | 241 | |
|
236 | 242 | |
|
237 | 243 | |
|
238 | 244 | YUI Flot |
|
239 | 245 | -------- |
|
240 | 246 | |
|
241 | 247 | Kallithea incorporates some CSS from a system called |
|
242 | 248 | [Flot](http://code.google.com/p/flot/), which is: |
|
243 | 249 | |
|
244 | 250 | Copyright 2006 Google Inc. |
|
245 | 251 | |
|
246 | 252 | Licensed under the Apache License, Version 2.0 (the "License"); |
|
247 | 253 | you may not use this file except in compliance with the License. |
|
248 | 254 | |
|
249 | 255 | A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included |
|
250 | 256 | in this distribution. |
|
251 | 257 | |
|
252 | 258 | |
|
253 | 259 | |
|
254 | 260 | Flot |
|
255 | 261 | ---- |
|
256 | 262 | |
|
257 | 263 | Kallithea uses some parts of a Javascript system called |
|
258 | 264 | [Flot](http://www.flotcharts.org/), which is: |
|
259 | 265 | |
|
260 | 266 | Copyright (c) 2007-2014 IOLA and Ole Laursen |
|
261 | 267 | |
|
262 | 268 | Permission is hereby granted, free of charge, to any person |
|
263 | 269 | obtaining a copy of this software and associated documentation |
|
264 | 270 | files (the "Software"), to deal in the Software without |
|
265 | 271 | restriction, including without limitation the rights to use, |
|
266 | 272 | copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
267 | 273 | copies of the Software, and to permit persons to whom the |
|
268 | 274 | Software is furnished to do so, subject to the following |
|
269 | 275 | conditions: |
|
270 | 276 | |
|
271 | 277 | The above copyright notice and this permission notice shall be |
|
272 | 278 | included in all copies or substantial portions of the Software. |
|
273 | 279 | |
|
274 | 280 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
275 | 281 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
276 | 282 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
277 | 283 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
278 | 284 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
279 | 285 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
280 | 286 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
281 | 287 | OTHER DEALINGS IN THE SOFTWARE. |
|
282 | 288 | |
|
283 | 289 | It is not distributed with Kallithea, but will be downloaded |
|
284 | 290 | using the ''kallithea-cli front-end-build'' command. |
|
285 | 291 | |
|
286 | 292 | |
|
287 | 293 | |
|
288 | 294 | Icon fonts |
|
289 | 295 | ---------- |
|
290 | 296 | |
|
291 | 297 | Kallithea incorporates subsets of both |
|
292 | 298 | [Font Awesome](http://fontawesome.io) and |
|
293 | 299 | [GitHub Octicons](https://octicons.github.com) for icons. Font Awesome is: |
|
294 | 300 | |
|
295 | 301 | Copyright (c) 2016, Dave Gandy |
|
296 | 302 | |
|
297 | 303 | Octicons is: |
|
298 | 304 | |
|
299 | 305 | Copyright (c) 2012-2014 GitHub |
|
300 | 306 | |
|
301 | 307 | These two sets are distributed under [SIL OFL 1.1](http://scripts.sil.org/OFL) |
|
302 | 308 | and have been combined into one font called "kallithea." |
|
303 | 309 | |
|
304 | 310 | |
|
305 | 311 | EOF |
@@ -1,93 +1,99 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | # This program is free software: you can redistribute it and/or modify |
|
3 | 3 | # it under the terms of the GNU General Public License as published by |
|
4 | 4 | # the Free Software Foundation, either version 3 of the License, or |
|
5 | 5 | # (at your option) any later version. |
|
6 | 6 | # |
|
7 | 7 | # This program is distributed in the hope that it will be useful, |
|
8 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
9 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
10 | 10 | # GNU General Public License for more details. |
|
11 | 11 | # |
|
12 | 12 | # You should have received a copy of the GNU General Public License |
|
13 | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
14 | 14 | |
|
15 | 15 | import click |
|
16 | 16 | import kallithea.bin.kallithea_cli_base as cli_base |
|
17 | 17 | |
|
18 | 18 | import os |
|
19 | 19 | import shutil |
|
20 | 20 | import subprocess |
|
21 | 21 | import json |
|
22 | 22 | |
|
23 | 23 | import kallithea |
|
24 | 24 | |
|
25 | 25 | @cli_base.register_command() |
|
26 | 26 | @click.option('--install-deps/--no-install-deps', default=True, |
|
27 | 27 | help='Skip installation of dependencies, via "npm".') |
|
28 | 28 | @click.option('--generate/--no-generate', default=True, |
|
29 | 29 | help='Skip generation of front-end files.') |
|
30 | 30 | def front_end_build(install_deps, generate): |
|
31 | 31 | """Build the front-end. |
|
32 | 32 | |
|
33 | 33 | Install required dependencies for the front-end and generate the necessary |
|
34 | 34 | files. This step is complementary to any 'pip install' step which only |
|
35 | 35 | covers Python dependencies. |
|
36 | 36 | |
|
37 | 37 | The installation of front-end dependencies happens via the tool 'npm' which |
|
38 | 38 | is expected to be installed already. |
|
39 | 39 | """ |
|
40 | 40 | front_end_dir = os.path.abspath(os.path.join(kallithea.__file__, '..', 'front-end')) |
|
41 | 41 | public_dir = os.path.abspath(os.path.join(kallithea.__file__, '..', 'public')) |
|
42 | 42 | |
|
43 | 43 | if install_deps: |
|
44 | 44 | click.echo("Running 'npm install' to install front-end dependencies from package.json") |
|
45 | 45 | subprocess.check_call(['npm', 'install'], cwd=front_end_dir) |
|
46 | 46 | |
|
47 | 47 | if generate: |
|
48 | 48 | tmp_dir = os.path.join(front_end_dir, 'tmp') |
|
49 | 49 | if not os.path.isdir(tmp_dir): |
|
50 | 50 | os.mkdir(tmp_dir) |
|
51 | 51 | |
|
52 | 52 | click.echo("Building CSS styling based on Bootstrap") |
|
53 | 53 | with open(os.path.join(tmp_dir, 'pygments.css'), 'w') as f: |
|
54 | 54 | subprocess.check_call(['pygmentize', |
|
55 | 55 | '-S', 'default', |
|
56 | 56 | '-f', 'html', |
|
57 | 57 | '-a', '.code-highlight'], |
|
58 | 58 | stdout=f) |
|
59 | 59 | lesscpath = os.path.join(front_end_dir, 'node_modules', '.bin', 'lessc') |
|
60 | 60 | lesspath = os.path.join(public_dir, 'less', 'main.less') |
|
61 | 61 | csspath = os.path.join(public_dir, 'css', 'style.css') |
|
62 | 62 | subprocess.check_call([lesscpath, '--relative-urls', '--source-map', |
|
63 | 63 | '--source-map-less-inline', lesspath, csspath], |
|
64 | 64 | cwd=front_end_dir) |
|
65 | 65 | |
|
66 | 66 | click.echo("Preparing Bootstrap JS") |
|
67 | 67 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.js'), os.path.join(public_dir, 'js', 'bootstrap.js')) |
|
68 | 68 | |
|
69 | 69 | click.echo("Preparing jQuery JS with Flot") |
|
70 | 70 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery', 'dist', 'jquery.min.js'), os.path.join(public_dir, 'js', 'jquery.min.js')) |
|
71 | 71 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery.flot', 'jquery.flot.js'), os.path.join(public_dir, 'js', 'jquery.flot.js')) |
|
72 | 72 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery.flot', 'jquery.flot.selection.js'), os.path.join(public_dir, 'js', 'jquery.flot.selection.js')) |
|
73 | 73 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery.flot', 'jquery.flot.time.js'), os.path.join(public_dir, 'js', 'jquery.flot.time.js')) |
|
74 | 74 | |
|
75 | click.echo("Preparing Select2 JS") | |
|
76 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'select2', 'select2.js'), os.path.join(public_dir, 'js', 'select2.js')) | |
|
77 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'select2', 'select2.png'), os.path.join(public_dir, 'css', 'select2.png')) | |
|
78 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'select2', 'select2x2.png'), os.path.join(public_dir, 'css', 'select2x2.png')) | |
|
79 | shutil.copy(os.path.join(front_end_dir, 'node_modules', 'select2', 'select2-spinner.gif'), os.path.join(public_dir, 'css', 'select2-spinner.gif')) | |
|
80 | ||
|
75 | 81 | click.echo("Generating LICENSES.txt") |
|
76 | 82 | check_licensing_json_path = os.path.join(tmp_dir, 'licensing.json') |
|
77 | 83 | licensing_txt_path = os.path.join(public_dir, 'LICENSES.txt') |
|
78 | 84 | subprocess.check_call([ |
|
79 | 85 | os.path.join(front_end_dir, 'node_modules', '.bin', 'license-checker'), |
|
80 | 86 | '--json', |
|
81 | 87 | '--out', check_licensing_json_path, |
|
82 | 88 | ], cwd=front_end_dir) |
|
83 | 89 | with open(check_licensing_json_path) as jsonfile: |
|
84 | 90 | rows = json.loads(jsonfile.read()) |
|
85 | 91 | with open(licensing_txt_path, 'w') as out: |
|
86 | 92 | out.write("The Kallithea front-end was built using the following Node modules:\n\n") |
|
87 | 93 | for name_version, values in sorted(rows.items()): |
|
88 | 94 | name, version = name_version.rsplit('@', 1) |
|
89 | 95 | line = "%s from https://www.npmjs.com/package/%s/v/%s\n License: %s\n Repository: %s\n" % ( |
|
90 | 96 | name_version, name, version, values['licenses'], values.get('repository', '-')) |
|
91 | 97 | if values.get('copyright'): |
|
92 | 98 | line += " Copyright: %s\n" % (values['copyright']) |
|
93 | 99 | out.write(line + '\n') |
@@ -1,14 +1,16 b'' | |||
|
1 | 1 | { |
|
2 | 2 | "name": "kallithea", |
|
3 | 3 | "private": true, |
|
4 | 4 | "dependencies": { |
|
5 | 5 | "bootstrap": "3.3.7", |
|
6 | 6 | "jquery": "1.12.3", |
|
7 | "jquery.flot": "0.8.3" | |
|
7 | "jquery.flot": "0.8.3", | |
|
8 | "select2": "3.5.1", | |
|
9 | "select2-bootstrap-css": "1.2.4" | |
|
8 | 10 | }, |
|
9 | 11 | "devDependencies": { |
|
10 | 12 | "less": "~2.7", |
|
11 | 13 | "less-plugin-clean-css": "~1.5", |
|
12 | 14 | "license-checker": "24.1.0" |
|
13 | 15 | } |
|
14 | 16 | } |
@@ -1,28 +1,28 b'' | |||
|
1 | 1 | /*! |
|
2 | 2 | * Don't edit the css file directly. |
|
3 | 3 | * |
|
4 | 4 | * Instead, edit the less file(s) and regenerate the css: |
|
5 | 5 | * |
|
6 | 6 | * npm install |
|
7 | 7 | * npm run less |
|
8 | 8 | * |
|
9 | 9 | */ |
|
10 | 10 | |
|
11 | 11 | /* 3rd party styles */ |
|
12 | 12 | @import "node_modules/bootstrap/less/bootstrap.less"; |
|
13 | 13 | @import (inline) "3rd-party/dataTables.bootstrap.css"; |
|
14 |
@import (less) " |
|
|
15 |
@import (less) " |
|
|
14 | @import (less) "node_modules/select2/select2.css"; | |
|
15 | @import (less) "node_modules/select2-bootstrap-css/select2-bootstrap.css"; | |
|
16 | 16 | @import (less) "tmp/pygments.css"; |
|
17 | 17 | @import (less) "../fontello/css/kallithea.css"; |
|
18 | 18 | |
|
19 | 19 | /* kallithea styles */ |
|
20 | 20 | @import "kallithea-variables.less"; |
|
21 | 21 | @import "kallithea-labels.less"; |
|
22 | 22 | @import "yui-ac.less"; |
|
23 | 23 | @import "kallithea-select2.less"; |
|
24 | 24 | @import "kallithea-diff.less"; |
|
25 | 25 | @import "style.less"; |
|
26 | 26 | |
|
27 | 27 | /* finally, import the optional theme file with local customizations */ |
|
28 | 28 | @import (optional) "theme.less"; |
@@ -1,141 +1,141 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <!DOCTYPE html> |
|
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 | 4 | <head> |
|
5 | 5 | <title><%block name="title"/><%block name="branding_title"/></title> |
|
6 | 6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
7 | 7 | <meta http-equiv="X-UA-Compatible" content="IE=10"/> |
|
8 | 8 | <meta name="robots" content="index, nofollow"/> |
|
9 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
10 | 10 | <link rel="shortcut icon" href="${h.url('/images/favicon.ico')}" type="image/x-icon" /> |
|
11 | 11 | <link rel="icon" type="image/png" href="${h.url('/images/favicon-32x32.png')}" sizes="32x32"> |
|
12 | 12 | <link rel="icon" type="image/png" href="${h.url('/images/favicon-16x16.png')}" sizes="16x16"> |
|
13 | 13 | <link rel="apple-touch-icon" sizes="180x180" href="${h.url('/images/apple-touch-icon.png')}"> |
|
14 | 14 | <link rel="manifest" href="${h.url('/images/manifest.json')}"> |
|
15 | 15 | <link rel="mask-icon" href="${h.url('/images/safari-pinned-tab.svg')}" color="#b1d579"> |
|
16 | 16 | <meta name="msapplication-config" content="${h.url('/images/browserconfig.xml')}"> |
|
17 | 17 | <meta name="theme-color" content="#ffffff"> |
|
18 | 18 | |
|
19 | 19 | ## CSS ### |
|
20 | 20 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.kallithea_version)}" media="screen"/> |
|
21 | 21 | <%block name="css_extra"/> |
|
22 | 22 | |
|
23 | 23 | ## JAVASCRIPT ## |
|
24 | 24 | <script type="text/javascript"> |
|
25 | 25 | ## JS translations map |
|
26 | 26 | var TRANSLATION_MAP = { |
|
27 | 27 | 'Cancel': ${h.jshtml(_("Cancel"))}, |
|
28 | 28 | 'Retry': ${h.jshtml(_("Retry"))}, |
|
29 | 29 | 'Submitting ...': ${h.jshtml(_("Submitting ..."))}, |
|
30 | 30 | 'Unable to post': ${h.jshtml(_("Unable to post"))}, |
|
31 | 31 | 'Add Another Comment': ${h.jshtml(_("Add Another Comment"))}, |
|
32 | 32 | 'Stop following this repository': ${h.jshtml(_('Stop following this repository'))}, |
|
33 | 33 | 'Start following this repository': ${h.jshtml(_('Start following this repository'))}, |
|
34 | 34 | 'Group': ${h.jshtml(_('Group'))}, |
|
35 | 35 | 'Loading ...': ${h.jshtml(_('Loading ...'))}, |
|
36 | 36 | 'loading ...': ${h.jshtml(_('loading ...'))}, |
|
37 | 37 | 'Search truncated': ${h.jshtml(_('Search truncated'))}, |
|
38 | 38 | 'No matching files': ${h.jshtml(_('No matching files'))}, |
|
39 | 39 | 'Open New Pull Request from {0}': ${h.jshtml(_('Open New Pull Request from {0}'))}, |
|
40 | 40 | 'Open New Pull Request for {0} → {1}': ${h.js(_('Open New Pull Request for {0} → {1}'))}, |
|
41 | 41 | 'Show Selected Changesets {0} → {1}': ${h.js(_('Show Selected Changesets {0} → {1}'))}, |
|
42 | 42 | 'Selection Link': ${h.jshtml(_('Selection Link'))}, |
|
43 | 43 | 'Collapse Diff': ${h.jshtml(_('Collapse Diff'))}, |
|
44 | 44 | 'Expand Diff': ${h.jshtml(_('Expand Diff'))}, |
|
45 | 45 | 'No revisions': ${h.jshtml(_('No revisions'))}, |
|
46 | 46 | 'Type name of user or member to grant permission': ${h.jshtml(_('Type name of user or member to grant permission'))}, |
|
47 | 47 | 'Failed to revoke permission': ${h.jshtml(_('Failed to revoke permission'))}, |
|
48 | 48 | 'Confirm to revoke permission for {0}: {1} ?': ${h.jshtml(_('Confirm to revoke permission for {0}: {1} ?'))}, |
|
49 | 49 | 'Enabled': ${h.jshtml(_('Enabled'))}, |
|
50 | 50 | 'Disabled': ${h.jshtml(_('Disabled'))}, |
|
51 | 51 | 'Select changeset': ${h.jshtml(_('Select changeset'))}, |
|
52 | 52 | 'Specify changeset': ${h.jshtml(_('Specify changeset'))}, |
|
53 | 53 | 'MSG_SORTASC': ${h.jshtml(_('Click to sort ascending'))}, |
|
54 | 54 | 'MSG_SORTDESC': ${h.jshtml(_('Click to sort descending'))}, |
|
55 | 55 | 'MSG_EMPTY': ${h.jshtml(_('No records found.'))}, |
|
56 | 56 | 'MSG_ERROR': ${h.jshtml(_('Data error.'))}, |
|
57 | 57 | 'MSG_LOADING': ${h.jshtml(_('Loading...'))} |
|
58 | 58 | }; |
|
59 | 59 | var _TM = TRANSLATION_MAP; |
|
60 | 60 | |
|
61 | 61 | var TOGGLE_FOLLOW_URL = ${h.js(h.url('toggle_following'))}; |
|
62 | 62 | |
|
63 | 63 | var REPO_NAME = ""; |
|
64 | 64 | %if hasattr(c, 'repo_name'): |
|
65 | 65 | var REPO_NAME = ${h.js(c.repo_name)}; |
|
66 | 66 | %endif |
|
67 | 67 | |
|
68 | 68 | var _authentication_token = ${h.js(h.authentication_token())}; |
|
69 | 69 | </script> |
|
70 | 70 | <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.kallithea_version)}"></script> |
|
71 | 71 | <script type="text/javascript" src="${h.url('/js/jquery.min.js', ver=c.kallithea_version)}"></script> |
|
72 | 72 | <script type="text/javascript" src="${h.url('/js/jquery.dataTables.min.js', ver=c.kallithea_version)}"></script> |
|
73 | 73 | <script type="text/javascript" src="${h.url('/js/dataTables.bootstrap.js', ver=c.kallithea_version)}"></script> |
|
74 | 74 | <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.kallithea_version)}"></script> |
|
75 |
<script type="text/javascript" src="${h.url('/js/select2 |
|
|
75 | <script type="text/javascript" src="${h.url('/js/select2.js', ver=c.kallithea_version)}"></script> | |
|
76 | 76 | <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.kallithea_version)}"></script> |
|
77 | 77 | <script type="text/javascript" src="${h.url('/js/base.js', ver=c.kallithea_version)}"></script> |
|
78 | 78 | ## EXTRA FOR JS |
|
79 | 79 | <%block name="js_extra"/> |
|
80 | 80 | <script type="text/javascript"> |
|
81 | 81 | (function(window,undefined){ |
|
82 | 82 | var History = window.History; // Note: We are using a capital H instead of a lower h |
|
83 | 83 | if ( !History.enabled ) { |
|
84 | 84 | // History.js is disabled for this browser. |
|
85 | 85 | // This is because we can optionally choose to support HTML4 browsers or not. |
|
86 | 86 | return false; |
|
87 | 87 | } |
|
88 | 88 | })(window); |
|
89 | 89 | |
|
90 | 90 | $(document).ready(function(){ |
|
91 | 91 | tooltip_activate(); |
|
92 | 92 | show_more_event(); |
|
93 | 93 | // routes registration |
|
94 | 94 | pyroutes.register('home', ${h.js(h.url('home'))}, []); |
|
95 | 95 | pyroutes.register('new_gist', ${h.js(h.url('new_gist'))}, []); |
|
96 | 96 | pyroutes.register('gists', ${h.js(h.url('gists'))}, []); |
|
97 | 97 | pyroutes.register('new_repo', ${h.js(h.url('new_repo'))}, []); |
|
98 | 98 | |
|
99 | 99 | pyroutes.register('summary_home', ${h.js(h.url('summary_home', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
100 | 100 | pyroutes.register('changelog_home', ${h.js(h.url('changelog_home', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
101 | 101 | pyroutes.register('files_home', ${h.js(h.url('files_home', repo_name='%(repo_name)s',revision='%(revision)s',f_path='%(f_path)s'))}, ['repo_name', 'revision', 'f_path']); |
|
102 | 102 | pyroutes.register('edit_repo', ${h.js(h.url('edit_repo', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
103 | 103 | pyroutes.register('edit_repo_perms', ${h.js(h.url('edit_repo_perms', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
104 | 104 | pyroutes.register('pullrequest_home', ${h.js(h.url('pullrequest_home', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
105 | 105 | |
|
106 | 106 | pyroutes.register('toggle_following', ${h.js(h.url('toggle_following'))}); |
|
107 | 107 | pyroutes.register('changeset_info', ${h.js(h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s'))}, ['repo_name', 'revision']); |
|
108 | 108 | pyroutes.register('changeset_home', ${h.js(h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s'))}, ['repo_name', 'revision']); |
|
109 | 109 | pyroutes.register('repo_size', ${h.js(h.url('repo_size', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
110 | 110 | pyroutes.register('repo_refs_data', ${h.js(h.url('repo_refs_data', repo_name='%(repo_name)s'))}, ['repo_name']); |
|
111 | 111 | pyroutes.register('users_and_groups_data', ${h.js(h.url('users_and_groups_data'))}, []); |
|
112 | 112 | }); |
|
113 | 113 | </script> |
|
114 | 114 | |
|
115 | 115 | <%block name="head_extra"/> |
|
116 | 116 | </head> |
|
117 | 117 | <body> |
|
118 | 118 | <nav class="navbar navbar-inverse mainmenu"> |
|
119 | 119 | <div class="navbar-header" id="logo"> |
|
120 | 120 | <a class="navbar-brand" href="${h.url('home')}"> |
|
121 | 121 | <span class="branding">${c.site_name}</span> |
|
122 | 122 | </a> |
|
123 | 123 | <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> |
|
124 | 124 | <span class="sr-only">Toggle navigation</span> |
|
125 | 125 | <span class="icon-bar"></span> |
|
126 | 126 | <span class="icon-bar"></span> |
|
127 | 127 | <span class="icon-bar"></span> |
|
128 | 128 | </button> |
|
129 | 129 | </div> |
|
130 | 130 | <div id="navbar" class="navbar-collapse collapse"> |
|
131 | 131 | <%block name="header_menu"/> |
|
132 | 132 | </div> |
|
133 | 133 | </nav> |
|
134 | 134 | |
|
135 | 135 | ${next.body()} |
|
136 | 136 | |
|
137 | 137 | %if c.ga_code: |
|
138 | 138 | ${h.literal(c.ga_code)} |
|
139 | 139 | %endif |
|
140 | 140 | </body> |
|
141 | 141 | </html> |
@@ -1,20 +1,20 b'' | |||
|
1 | 1 | #!/bin/bash -x |
|
2 | 2 | |
|
3 | 3 | # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes |
|
4 | 4 | |
|
5 |
files=`hg mani | egrep -v '/codemirror/|/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history| |
|
|
5 | files=`hg mani | egrep -v '/codemirror/|/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history|yui.2.9|jquery.dataTables)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'` | |
|
6 | 6 | |
|
7 | 7 | sed -i "s/`printf '\r'`//g" $files |
|
8 | 8 | sed -i -e "s,`printf '\t'`, ,g" $files |
|
9 | 9 | sed -i -e "s, *$,,g" $files |
|
10 | 10 | sed -i -e 's,\([^ ]\)\\$,\1 \\,g' -e 's,\(["'"'"']["'"'"']["'"'"']\) \\$,\1\\,g' $files |
|
11 | 11 | # ensure one trailing newline - remove empty last line and make last line include trailing newline: |
|
12 | 12 | sed -i -e '$,${/^$/d}' -e '$a\' $files |
|
13 | 13 | |
|
14 | 14 | sed -i -e 's,\([^ /]\){,\1 {,g' `hg loc '*.css'` |
|
15 | 15 | sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'` |
|
16 | 16 | |
|
17 | 17 | hg mani | xargs chmod -x |
|
18 | 18 | hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x |
|
19 | 19 | |
|
20 | 20 | hg diff |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed | |
This diff has been collapsed as it changes many lines, (692 lines changed) Show them Hide them |
|
1 | NO CONTENT: file was removed | |
This diff has been collapsed as it changes many lines, (3748 lines changed) Show them Hide them |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
General Comments 0
You need to be logged in to leave comments.
Login now