Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.

Commit 9b53c81

Browse files
move tosdr-build repo into here
1 parent 06e5460 commit 9b53c81

File tree

22,405 files changed

+2286174
-1350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

22,405 files changed

+2286174
-1350
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*~
22
node_modules
33
import/imapCredentials.js
4-
posts
4+
src/posts

.jshintrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"globalstrict": true,
3+
"node": true
4+
}

Gruntfile.js

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
// Generated on 2013-12-23 using generator-webapp 0.2.6
2+
'use strict';
3+
4+
// # Globbing
5+
// for performance reasons we're only matching one level down:
6+
// 'test/spec/{,*/}*.js'
7+
// use this if you want to recursively match all subfolders:
8+
// 'test/spec/**/*.js'
9+
10+
module.exports = function (grunt) {
11+
// Load grunt tasks automatically
12+
require('load-grunt-tasks')(grunt);
13+
14+
// Configurable paths for the application
15+
var appConfig = {
16+
src: 'src', // TODO When implementing bower, change to: require('./bower.json').srcPath || 'src'
17+
dist: 'dist',
18+
crawls: '../tosback2/crawl/',
19+
rules: '../tosback2/rules/'
20+
};
21+
22+
grunt.initConfig({
23+
24+
// Project settings
25+
conf: appConfig,
26+
27+
imagemin: {
28+
dist: {
29+
files: [{
30+
expand: true,
31+
cwd: '<%= conf.src %>/img',
32+
src: '{,*/}*.{png,jpg,jpeg,ico}',
33+
dest: '<%= conf.dist %>/img'
34+
},
35+
{
36+
expand: true,
37+
cwd: '<%= conf.src %>/logo',
38+
src: '*.{png,jpg,jpeg}',
39+
dest: '<%= conf.dist %>/logo'
40+
}]
41+
}
42+
},
43+
svgmin: {
44+
dist: {
45+
files: [{
46+
expand: true,
47+
cwd: '<%= conf.src %>/img',
48+
src: '{,*/}*.svg',
49+
dest: '<%= conf.dist %>/img'
50+
}]
51+
}
52+
},
53+
less : {
54+
all: {
55+
options: {
56+
paths: 'style/',
57+
compress: true
58+
},
59+
files: {
60+
'<%= conf.dist %>/css/custom.css': '<%= conf.src %>/style/custom.less'
61+
}
62+
}
63+
},
64+
copy: {
65+
data: {
66+
files: [
67+
{
68+
expand: true,
69+
cwd: '<%= conf.src %>',
70+
src: 'points/*',
71+
dest: '<%= conf.dist %>'
72+
},
73+
{
74+
expand: true,
75+
cwd: '<%= conf.src %>',
76+
src: 'topics/*',
77+
dest: '<%= conf.dist %>'
78+
},
79+
{
80+
expand: true,
81+
cwd: '<%= conf.src %>',
82+
src: 'services/*',
83+
dest: '<%= conf.dist %>'
84+
},
85+
{
86+
expand: true,
87+
cwd: '<%= conf.src %>',
88+
src: 'cases/*',
89+
dest: '<%= conf.dist %>'
90+
},
91+
{
92+
expand: true,
93+
src: 'comments/*',
94+
dest: '<%= conf.dist %>'
95+
},
96+
{
97+
expand: true,
98+
src: 'index/*',
99+
dest: '<%= conf.dist %>'
100+
}
101+
]
102+
},
103+
assets: {
104+
files: [
105+
{
106+
expand: true,
107+
cwd: '<%= conf.src %>',
108+
src: ['README.md',
109+
'LICENSE',
110+
'favicon.ico',
111+
'conf/{,*/}*',
112+
'blog/**/*',
113+
'bootstrap-3.1.1/**/*',
114+
'!bootstrap-3.1.1/docs',
115+
'bootstrap/**/*',
116+
'!bootstrap/docs',
117+
'1901/*',
118+
'js/*',
119+
'img/*.gif'
120+
],
121+
dest: '<%= conf.dist %>'
122+
},
123+
{
124+
expand: true,
125+
cwd: '<%= conf.src %>/style',
126+
src: ['*.css',
127+
'*.woff',],
128+
dest: '<%= conf.dist %>/css'
129+
},
130+
{
131+
expand: true,
132+
cwd: '<%= conf.src %>',
133+
src: ['*.html',
134+
'!index.html', // index.html and get-involved.html are generated by the renderPages task
135+
'!get-involved.html'],
136+
dest: '<%= conf.dist %>'
137+
}
138+
]
139+
}
140+
},
141+
// Empties folders to start fresh
142+
clean: {
143+
dist: {
144+
files: [{
145+
dot: true,
146+
src: [
147+
'<%= conf.dist %>/{,*/}*',
148+
'!<%= conf.dist %>/.git*'
149+
]
150+
}]
151+
}
152+
},
153+
concurrent: {
154+
fix: [
155+
'fixpoints',
156+
'fixservices',
157+
'fixtopics'
158+
],
159+
minify: [
160+
'less',
161+
'imagemin',
162+
'svgmin'
163+
]
164+
}
165+
});
166+
167+
// Load the scripts from the build directory
168+
grunt.loadTasks('build');
169+
170+
grunt.registerTask('render', ['concurrent:fix', 'buildIndexes', 'prettify', 'copy:data', 'copy:assets', 'generateApiFiles', 'renderPages']);
171+
172+
grunt.registerTask('build', [
173+
'clean:dist',
174+
'render',
175+
'concurrent:minify'
176+
]);
177+
178+
grunt.registerTask('default', [
179+
'build'
180+
]);
181+
};

README.md

+101-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,105 @@
1-
# Do not manually edit this repository!
1+
This is the source code for www.tosdr.org. You should
2+
find more information about the project itself on the website.
23

3-
The contents of this repository are generated by the [tosdr-build repository](https://github.com/tosdr/tosdr-build). To make modifications to the website, alter that repository, build it, and commit the results here as described in the README of the tosdr-build repository.
4+
<!--Overview
5+
========
46
5-
# Personal information
7+
We welcome other people to copy this project for other specific purposes (like a ToS;DR specific for API terms) or for country-specific (translation and national law issues). Just:
8+
9+
1. open a public mailing list for people to contribute and start translating,
10+
2. fork the code from https://github.com/tosdr/tosdr-build and translate, or adapt, etc.
11+
3. change the name and the logo, and have a look at the license (AGPL for HTML/JS/CSS and CC BY SA for JSON)
12+
13+
-->
14+
15+
The data specification is available [on the wiki][wiki].
16+
17+
[wiki]: https://github.com/tosdr/tosdr.org/wiki
18+
19+
Personal information
20+
====================
621

722
This repo might contain information that was not intended to be public. In that case, please open a PR here or send us an email at team at tosdr dot org.
23+
24+
Clone this repository
25+
=====================
26+
27+
There are git submodules in this repository. To automatically have them all, clone this repository with the `git clone --recursive` option.
28+
Alternatively, run `git submodule init` and `git submodule update` to pull in the submodules.
29+
30+
Build
31+
=====
32+
Most of the website's source files are located in the `src/` directory (although unfortunately some of it is still intermingled with the build files).
33+
34+
To build:
35+
36+
1. Make sure you have the git [submodule](http://www.git-scm.com/book/en/Git-Tools-Submodules) in the `dist/` folder and that it is up-to-date (see above).
37+
38+
The source files are used to generate the content of the [tosdr.org repository](https://github.com/tosdr/tosdr.org), generated in the `dist/` folder.
39+
40+
2. Run `npm install` in the root of this repository to make sure you have the required packages.
41+
3. Make the changes you wish to make to the source files in this repository.
42+
4. Run `grunt` or `./node_modules/.bin/grunt` in the root of this repository.
43+
5. Check whether the output in the dist/ directory is looking as intended.
44+
6. Commit and push both repositories.
45+
7. To publish the new version of the website, assuming you have 5apps set up as a remote in the `dist/` folder, run `git push 5apps master`. But be careful: this updates the live site! Ask [@hugoroy] or [@michielbdejong] if you don't have permission
46+
47+
[@hugoroy]: https://github.com/hugoroy
48+
[@michielbdejong]: https://github.com/michielbdejong
49+
50+
<!-- This should have its own README
51+
Import
52+
======
53+
To import new and/or updated threads from the Google Group:
54+
55+
* Open [import/bookmarklet.html](https://tosdr.org/import/bookmarklet.html) with Firefox, and follow instructions there; save result to `./import/newThreadSubjects.json` in your checked out local git repo
56+
* Run `node ./import/prettifyNewThreadSubjects.js`
57+
* create `./import/imapCredentials.js` from `./import/imapCredentials.js.sample`
58+
* (from the repo root:) `git pull; npm install ; cd import ; mkdir rawPosts ; cd rawPosts ; node ../searcher.js` (you may have to set 'allow less secure apps' if the imap account is a gmail account).
59+
* `cd .. ; node threadMatcher.js > ../index/threads.json`
60+
* `cd .. ; node scripts/newPointsForNewThreads.js`
61+
* `./node_modules/.bin/grunt`
62+
* `git status ; git add . ; git commit -am"import from Google Groups"; git push; git push 5apps master`
63+
64+
Curate
65+
======
66+
These scripts are what I (Michiel) currently use for curating points after import. The ideas is to integrate these into the web interface:
67+
68+
* `node scripts/curator.js` - will run a curating webinterface on http://localhost:21337/ that lets you change the (local) files on disk
69+
* `cd dist; node ../scripts/checkcases.js` - an interactive command-line tool that helps you assign cases to points that don't have one yet
70+
* `cd dist; node ../scripts/checkclasses.js` - outputs recommendations for adding/updating the class of services, based on their data points
71+
-->
72+
73+
74+
Develop other applications
75+
==========================
76+
77+
API: http://www.tosdr.org/api.html
78+
79+
Also have a look at other apps, like the browser extensions: https://github.com/tosdr
80+
81+
## Core developpers
82+
* [Chris](https://github.com/piks3l)
83+
* [Michiel](https://github.com/michielbdejong)
84+
85+
### Hosting
86+
People who have access to the hosting:
87+
* [Chris](https://github.com/piks3l)
88+
* [Ggrin](https://github.com/Ggrin)
89+
* [Hugo](https://github.com/hugoroy)
90+
* [Jan](https://github.com/jancborchardt)
91+
* [Jimm](https://github.com/JimmStout)
92+
* [Michiel](https://github.com/michielbdejong)
93+
* [Pierre](https://github.com/pierreozoux)
94+
* [Vinnl](https://github.com/Vinnl)
95+
96+
97+
98+
99+
100+
License
101+
======
102+
103+
AGPL-3.0+ (GNU Affero General Public License, version 3 or later)
104+
105+
See <https://tosdr.org/legal.html> for more details on the legal aspects of the project.

blog/a-productive-week.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/finance-2012.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/first-news-from-ian.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/grammarly-prix.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/hello-world.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/ians-april-update.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/index.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</ul>
4141
<p class="pull-right follow-us">
4242
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
43-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
43+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4444
</p>
4545
</div>
4646
</div>
@@ -55,9 +55,6 @@
5555
</div><!--hero-unit-->
5656

5757
<div class="container" id="tosdr-content" role="main">
58-
59-
<p><big><a href="http://blog.tosdr.org">This blog has moved, these are only our older posts.</a></big></p>
60-
6158
<ul id="blog-index">
6259
<!--li id="YYYY-MM-DD">
6360
<time datetime="Day DD Mmm YYYY hh:mm:ss +0100">DD Mmm YYYY</time>

blog/mykolab-com-rating.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

blog/suzanne-youtube.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
<p class="pull-right follow-us">
4040
Follow us <a href="http://twitter.com/tosdr">@tosdr</a> &nbsp;
41-
Donate: <a href="https://flattr.com/thing/3628260" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
41+
Donate: <a href="http://flattr.com/thing/821090/ToSDR" target="_blank"><img src="/img/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
4242
</p>
4343
</div>
4444
</div>

0 commit comments

Comments
 (0)