forked from openhouse/us-senate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
101 lines (101 loc) · 4.49 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
"name": "civil-services-us-senate",
"version": "1.2.1",
"description": "116th Congress United States Senate. Demographics, Headshots, Legislator Data & Social Media Links ( JSON, XML, CSV, SQL, XLSX & YML formats )",
"license": "MIT",
"keywords": [
"Civil Services",
"US",
"United States",
"116th Congress",
"Congress",
"Senate",
"government",
"data",
"json",
"csv",
"yml",
"sql",
"xml",
"xlsx",
"headshots",
"pictures",
"photos",
"map",
"state",
"district",
"bioguide",
"opensecrets",
"votesmart",
"fec",
"maplight",
"wikidata",
"google_entity_id",
"party",
"pronunciation",
"gender",
"ethnicity",
"religion",
"openly_lgbtq",
"date_of_birth",
"entered_office",
"term_end",
"biography",
"phone",
"fax",
"latitude",
"longitude",
"address",
"website",
"contact_page",
"facebook_url",
"twitter_url",
"photo_url"
],
"main": "us-senate/data/us-senate.json",
"homepage": "https://civilserviceusa.github.io/us-senate/",
"repository": {
"type": "git",
"url": "git+https://github.com/civilserviceusa/us-senate.git"
},
"bugs": {
"url": "https://github.com/civilserviceusa/us-senate/issues"
},
"author": {
"name": "Civil Services",
"email": "hello@civil.services",
"url": "https://civil.services"
},
"scripts": {
"update-csv": "curl -o ./source/us-senate.csv 'https://docs.google.com/spreadsheets/d/1sbkk-E9odeEa-AvmioYrrcmjgCZmOvZ_JlFlTiytzFY/export?format=csv&id=1sbkk-E9odeEa-AvmioYrrcmjgCZmOvZ_JlFlTiytzFY&gid=284703522'",
"json-to-yml": "if ( test -e ./us-senate/data/us-senate.json ); then ./node_modules/.bin/json2yaml ./us-senate/data/us-senate.json > ./us-senate/data/us-senate.yml && echo '✓ Updated us-senate/data/us-senate.yml'; else echo '\n× Missing ./us-senate/data/us-senate.json ( npm run -s convert-csv )\n'; fi",
"json-to-xml": "if ( test -e ./us-senate/data/us-senate.json ); then node ./.scripts/json-to-xml.js && echo '✓ Updated us-senate/data/us-senate.xml'; else echo '\n× Missing ./us-senate/data/us-senate.json ( npm run -s convert-csv )\n'; fi",
"csv-to-sql": "if ( test -e ./us-senate/data/us-senate.json ); then node ./.scripts/csv-to-sql.js && echo '✓ Updated us-senate/data/us-senate.sql'; else echo '\n× Missing ./us-senate/data/us-senate.json ( npm run -s convert-csv )\n'; fi",
"csv-to-json": "if ( test -e ./us-senate/data/us-senate.csv ); then ./node_modules/.bin/csvtojson ./us-senate/data/us-senate.csv > ./us-senate/data/us-senate.json && json-pretty-print ./us-senate/data/us-senate.json ./us-senate/data/us-senate.json && sed -i '' 's/\"\"/null/g' ./us-senate/data/us-senate.json && sed -i '' 's/\"true\",/true,/g' ./us-senate/data/us-senate.json && sed -i '' 's/\"false\",/false,/g' ./us-senate/data/us-senate.json && sed -i '' 's/\"district\": 0/\"district\": null/g' ./us-senate/data/us-senate.json && echo '✓ Updated us-senate/data/us-senate.json'; else echo '\n× Missing ./us-senate/data/us-senate.csv ( npm run -s convert-csv )\n'; fi",
"resize-headshots": "node ./.scripts/resize-headshots.js",
"resize-backgrounds": "node ./.scripts/resize-backgrounds.js",
"console-headshots": "node ./.scripts/console-headshots.js",
"convert-csv": "if ( test -e ./source/us-senate.csv ); then node ./.scripts/convert-csv.js; else echo '\n× Missing ./source/us-senate.csv ( see ./source/README.md )\n'; fi",
"build-images": "npm run -s resize-headshots && npm run -s resize-backgrounds && echo '\n☆ Image Conversion Complete\n'",
"build-data": "if ( test -e ./us-senate/data/us-senate.csv ); then npm run -s csv-to-json && npm run -s json-to-yml && npm run -s json-to-xml && npm run -s csv-to-sql && echo '\n☆ Data Conversion Complete\n'; else echo '\n× Missing ./us-senate/data/us-senate.csv\n'; fi",
"build-seeder": "node ./.scripts/create-seeder.js",
"build": "npm run -s convert-csv && npm run -s build-data && npm run -s build-seeder && npm run -s build-images && echo '\n☆ヽ(´▽`)ノ All Done \n'"
},
"devDependencies": {
"bluebird": "^3.4.7",
"csvtojson": "^1.1.2",
"fast-csv": "^2.3.0",
"glob": "^7.1.1",
"gm": "^1.23.0",
"htmlparser2": "^3.9.2",
"js2xmlparser": "^2.0.2",
"json-pretty-print": "0.0.4",
"json2csv": "^3.7.3",
"json2yaml": "^1.1.0",
"jsdom": "^13.1.0",
"object.values": "^1.0.4",
"parse-address": "0.0.10",
"slug": "^0.9.1",
"stream-replace": "^1.0.0"
}
}