summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2014-03-31 14:09:02 +0000
committerNathan Kinkade <nath@nkinka.de>2014-03-31 14:09:02 +0000
commitb5f0804602055fd2637c784bb66cfe559fc80525 (patch)
treea35b421bbc2f898a59189441272a1911fc1bc85c
parent51b39b9d0074b62ef42cf3fbb7db15a053aa2c37 (diff)
Break name out into a first and last field in the database as well as the search interface.
-rwxr-xr-xmiami_dade_clerk_courts.py4
-rw-r--r--search.php4
2 files changed, 8 insertions, 0 deletions
diff --git a/miami_dade_clerk_courts.py b/miami_dade_clerk_courts.py
index 4819e04..5ec4353 100755
--- a/miami_dade_clerk_courts.py
+++ b/miami_dade_clerk_courts.py
@@ -55,6 +55,8 @@ class Case(Base):
court_case_no = Column(String(30))
state_case_no = Column(String(30))
name = Column(String(100))
+ first_name = Column(String(50))
+ last_name = Column(String(50))
date_birth = Column(Date)
date_filed = Column(Date)
date_closed = Column(Date)
@@ -293,6 +295,8 @@ def parse_case(case_soup):
court_case_no = case_values['court_case_no'],
state_case_no = case_values['state_case_no'],
name = case_values['name'],
+ first_name = case_values['name'].split(',')[1].strip(),
+ last_name = case_values['name'].split(',')[0].strip(),
date_birth = format_date(case_values['date_birth']),
date_filed = format_date(case_values['date_filed']),
date_closed = format_date(case_values['date_closed']),
diff --git a/search.php b/search.php
index 14ac1d3..6aadeef 100644
--- a/search.php
+++ b/search.php
@@ -22,6 +22,8 @@ $database_fields = array(
'court_case_no',
'state_case_no',
'name',
+ 'first_name',
+ 'last_name',
'date_birth',
'date_filed',
'date_closed',
@@ -356,6 +358,8 @@ if ( $st->execute() ) {
</th>
<th>State Case No.</th>
<th>Name</th>
+ <th>First name</th>
+ <th>Last name</th>
<th>Date of Birth</th>
<th>
Date Filed <br />