• Stars
    star
    102
  • Rank 325,805 (Top 7 %)
  • Language
    HTML
  • Created about 10 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

縣市長 / 議員 投票指南

councilor-voter-guide

議員投票指南
文件

原則 Principle

  • 預設皆開源
    Open source by default.

  • 不做家長式的媒體,不做議題上的價值高下判斷、排名
    No paternalism.

  • 如要引入非政府公開資訊,必需是全民可參與編輯協作的或是候選人、民代、政黨自行編輯的
    There is a necessary requirement to include nonofficial data:

    • All citizen could cooperate these data.
    • These data are publish by candidates, councilors themself.

Project Layout

In Ubuntu 14.04 LTS

Website (Python/Django)

0.1 install basic tools

sudo apt-get update
sudo apt-get upgrade
sudo reboot
sudo apt-get install git python-pip python-dev python-setuptools postgresql libpq-dev
sudo easy_install virtualenv

0.2 set a password in your database(If you already have one, just skip this step)

sudo -u <username> psql -c "ALTER USER <username> with encrypted PASSWORD 'put_your_password_here';"

e.g.

sudo -u postgres psql -c "ALTER USER postgres with encrypted PASSWORD 'my_password';"

Clone source code from GitHub to local

It is quite big now. please be patient. don't use command like git --depth

git clone https://github.com/g0v/councilor-voter-guide.git       
cd councilor-voter-guide/voter_guide/

Start virtualenv and install packages

(if you don' mind packages installed into your local environment, just pip install -r requirements.txt)

virtualenv --no-site-packages venv      
. venv/bin/activate        
pip install -r requirements.txt     

Create db & restore data

We use Postgres 9.5, please set your database config in voter_guide/local_settings.py.
Please create a database(e.g. voter_guide), below will use voter_guide for example

createdb -h localhost -U <username> voter_guide
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U <username> -d voter_guide local_db.dump

runserver

python manage.py runserver

Now you should able to see the web page at http://localhost:8000

Dumpdata(optional)

python manage.py dumpdata --exclude auth.permission --exclude contenttypes > db.json

Mac Related Instructions

Prepare Compiler

There are some python package written in C or C++ such as lxml. so a compiler is required. you can install a compiler via the following command:

xcode-select --install

Prepare PostgreSQL

You can install the packaged app here. put the app in your Application folder and click it to start.

And please add the following line to your ~/.bash_profile

export PATH=/Applications/Postgres.app/Contents/Versions/9.3/bin/:$PATH

please change the version number 9.3 if you download a different version of PostgreSQL.

after you add the PATH environment variable, source it.

source ~/.bash_profile

if you don't add the PATH variable, installation of psycopg2 will not success.

Web Docker c3h3 / g0v-cvg-web

How to use this images

First Step: Download and Extract pgdata

git clone https://github.com/c3h3/g0v-cvg-pgdata.git && cd g0v-cvg-pgdata && tar xfzv 47821274c242ce68f2d8d18d4bb0d050d6481311.tar.gz
  • After that, you will get pgdata dir.
  • Assume pgdata's absolute path is "your_pgdata"

Second Step: RUN postgres with pgdata

docker run --name pgdb -v your_pgdata:/var/lib/postgresql/data postgres:9.3

If you want to use pgadmin connect with your db, you could also forwarding the port out ... with command ...

docker run --name pgdb -p 5432:5432 -v your_pgdata:/var/lib/postgresql/data postgres:9.3
  • "your_pgdata" is pgdata's absolute path in previous step.

Third Step: RUN web linked with pgdb

docker run --name g0v-cvg-web --link pgdb:postgres -p port_on_host:8000 -d c3h3/g0v-cvg-web

Crawler Docker c3h3 / g0v-cvg-crawler

How to use this images

Run Scarpy Server:

docker run --name g0v -p forward_port:6800 -v outside_items:/items -v outside_logs:/logs -d c3h3/g0v-cvg-crawler
  • "forward_port" is the port you want to forward into docker image (EXPOSE 6800)
  • "outside_items" is the directory you want to mount into docker image as /items
  • "outside_logs" is the directory you want to mount into docker image as /logs

Link Scarpy Server for Deploy and Submit Job:

docker run --link g0v:g0v -it c3h3/g0v-cvg-crawler /bin/bash

Example of Deploy ttc:

in a running docker instance which linked with g0v (Scarpy Server), you can use the following command to deploy tcc crawler to server:

cd /tmp/g0v-cvg/crawler/tcc && python deploy.py

Example of Crawl ttc.bills :

in a running docker instance which linked with g0v (Scarpy Server), you can use the following command to deploy tcc crawler to server:

cd /tmp/g0v-cvg/crawler/bin && python crawl_tcc_bills.py

CC0 1.0 Universal

CC0 1.0 Universal
This work is published from Taiwan.

More Repositories

1

moedict-webkit

萌典網站
Objective-C
586
star
2

twgeojson

geojson data for Taiwan
LiveScript
181
star
3

g0v.tw

g0v.tw site
Pug
177
star
4

itaigi

新台語·運動
JavaScript
166
star
5

dev

dev.g0v.tw
HTML
147
star
6

tw-rental-house-data

Collection of Taiwan Rental House Data from Public Website
Python
140
star
7

moedict-data

教育部重編國語辭典 資料檔; 若有建議或 bug 請在 moedict-process 反應
118
star
8

newshelper-extension

協助您判別含有誤導資訊的新聞
JavaScript
105
star
9

moedict-data-csld

中華大辭典
Perl
99
star
10

awesome-g0v

A curated list of g0v projects
LiveScript
91
star
11

2020voting-guide

收集候選人資料,幫助作為投票的判斷依據
TypeScript
83
star
12

vue.vtaiwan.tw

數位經濟法規線上諮詢系統 界面 3.0 - https://vtw.link/
Vue
73
star
13

moedict-data-twblg

臺灣閩南語常用詞辭典 資料檔
Perl
72
star
14

twly-voter-guide

立委投票指南
HTML
65
star
15

ly.g0v.tw

ly.g0v.tw - Congress Matters / 國會大代誌
HTML
53
star
16

twangry

政誌 - Angry event made in Taiwan.
JavaScript
52
star
17

labor-standards-tw

台灣勞動基準法函式庫, Taiwan Labor Standards Act Library
TypeScript
52
star
18

twbudget

twbudget hacks for yahoo hackday tw 2012
LiveScript
50
star
19

moedict.tw

Static API serving for moedict
Perl
47
star
20

workweek

勞基法計算機
JavaScript
43
star
21

referendum_report

HTML
33
star
22

react-native-sample

Objective-C
33
star
23

vaccinate

vaxx.tw is a tool to find COVID-19 Vaccine Appointments near you
HTML
33
star
24

moedict-process

教育部重編國語辭典 資料處理
Python
32
star
25

koktai

吳守禮《國臺對照活用辭典》電子化
HTML
32
star
26

react.vtaiwan.tw

行政院法規線上諮詢系統 界面 2.0
JavaScript
31
star
27

kuansim

鄉民關心你 - 事件追蹤分析系統
Ruby
31
star
28

er.mohw

ER information
Python
30
star
29

moedict-app

Stand-alone MoeDict app snapshot
Java
29
star
30

posland

台灣地址、地號經緯度查詢
LiveScript
27
star
31

tw-shift-schedule

班表小幫手
JavaScript
27
star
32

shelter

JavaScript
26
star
33

newshelper-backend

新聞小幫手網站及 API server
HTML
26
star
34

moedict-data-hakka

臺灣客家語常用詞辭典 資料檔
LiveScript
25
star
35

news-diff

A news crawler, parser and diff engine
Python
24
star
36

twlyparser

parse TW congress logs
LiveScript
24
star
37

twly_crawler

Crawl Taiwan Congress Data by Scrapy
Python
24
star
38

zh-stroke-data

常用國字標準字體筆劃 XML 資料檔
JavaScript
23
star
39

z0y

零時字引-部件筆劃查字
JavaScript
23
star
40

moedict-epub

萌典一書
HTML
21
star
41

partyvote2016

JavaScript
21
star
42

nowin_core

Nowin core library
Python
20
star
43

amis-moedict

阿美語萌典網站
JavaScript
18
star
44

OneButton

OneButton is a one-click solution for ipa to finish all hackathon duties at once.
JavaScript
18
star
45

blood

JavaScript
17
star
46

people-in-news

公眾人物新聞的追蹤
Perl
17
star
47

archive-summit.g0v.tw

g0v summit 2016 website archive
JavaScript
16
star
48

addressbook.parser

Taiwan government addressbook parser
Python
16
star
49

laweasyread

API for Taiwan Law
JavaScript
16
star
50

aray

貢獻者與學習者時數平台
JavaScript
15
star
51

api.ly

api.ly.g0v.tw - ly api endpoint
LiveScript
14
star
52

style-guide

G0V style guilde
HTML
14
star
53

env.g0v.tw

Taiwan Environment Dashboard
LiveScript
14
star
54

awesome-tw-openagri

整理農業開放資料相關資源與專案
14
star
55

search-g0v

基礎建設 - 更快搜尋 g0v 社群內的工具
Python
13
star
56

grants-landing-template

landing page template for g0v grants awardee projects
HTML
13
star
57

hyob

Hack Your Own Body
13
star
58

timemap

the source of timemap.kuansim.com
JavaScript
13
star
59

askkk

wethepeople.tw codebase
JavaScript
13
star
60

twlaw

Organize Taiwan laws
LiveScript
12
star
61

esmoe

Perl
12
star
62

landing-page

HTML
12
star
63

ly-gazette

parsed gazettes
12
star
64

ppt

政治承諾追蹤網 Political Promise Tracker
JavaScript
11
star
65

jothon-net

揪松網 - 零時政府黑客松入口網站
JavaScript
11
star
66

pdf-text-cutter

從 pdf 中切字出來的工具
Perl
11
star
67

tisa-map

trade in service agreement map.
JavaScript
11
star
68

abroadplay

公務員出國考察追蹤網
PHP
11
star
69

g0ver-box

g0v 專案與技能媒合工具
JavaScript
10
star
70

magic-mirror

定時 mirror *.gov.tw 上有時效性的資料到 git repository.
Perl
10
star
71

2d-online-chat

JavaScript
10
star
72

roadpin

g0v 路見不平專案
Python
10
star
73

wardns

戰時網路模擬器
Python
9
star
74

domain

9
star
75

govfeeds

collection of rss links found on gov.tw pages
LiveScript
9
star
76

vtaiwan.tw

[舊版] 行政院法規線上諮詢系統
HTML
9
star
77

moedict-data-terms

開放語料庫專案
Python
8
star
78

wiselike

自己的 wiselike 自己救
Vue
8
star
79

HackStory

HackTimeline共筆時間軸 (prototype)
JavaScript
8
star
80

addressbook-iOS

政府公開通訊錄 iOS 版
Objective-C
8
star
81

g0vre

Generic Reader/Extractor service for *.gov.tw URLs
LiveScript
8
star
82

ivod.ly.g0v.tw

CSS
8
star
83

ly-tel

立委聯絡資訊
JavaScript
8
star
84

goban

hackfoldr修改版-有脈絡的大量網址分享器
Vue
8
star
85

TWControlYuanData

砍台灣監察院資料
Python
7
star
86

twstat

Taiwan National Statistics Data
Groff
7
star
87

npratio

台灣護病比查詢
JavaScript
7
star
88

hakka_elearning

客語能力認證 資料檔
Python
7
star
89

react-zh-stroker

A stroke drawing React component for zh-stroke-data.
JavaScript
7
star
90

ggv

Repo for GGV
7
star
91

info.vtaiwan.tw

SCSS
7
star
92

g0v.asia

g0v.asia landing page
HTML
7
star
93

gitbook-plugin-discourse

JavaScript
6
star
94

HackingMap

HackingMap 是個即時共編的黑客松專案地圖,讓 g0v 大松現場的坑主、新參者在 g0v 大松徵人、跳坑更容易!
Vue
6
star
95

sunshine.cy

金錢報 - 公職人員財產申報
HTML
6
star
96

sch001-net

sch001 landing page
HTML
6
star
97

election-village

crawler for 2010 borough chief election candidate list and result
JavaScript
6
star
98

g0v-intro

g0ver introduction
PHP
6
star
99

summit2018

g0v summit 2018 | 零時政府高峰會
Vue
6
star
100

kuansim-frontend

鄉民關心你
CSS
6
star