def import_law_box_case(case_path, i):
    raw_text = open(case_path).read()
    clean_html_tree, complete_html_tree, clean_html_str, body_text = get_html_from_raw_text(
        raw_text)
    citations = get_citations_from_tree(complete_html_tree, case_path)
    if not citations:
        print "******** F: %s ********" % case_path
    """
def import_law_box_case(case_path, i):
    raw_text = open(case_path).read()
    clean_html_tree, complete_html_tree, clean_html_str, body_text = get_html_from_raw_text(raw_text)
    citations = get_citations_from_tree(complete_html_tree, case_path)
    if not citations:
        print "******** F: %s ********" % case_path

    """
def import_law_box_case(case_path):
    raw_text = open(case_path).read()
    clean_html_tree, complete_html_tree, clean_html_str, body_text = get_html_from_raw_text(raw_text)
    citations = get_citations_from_tree(complete_html_tree, case_path)
    court = get_court_object(clean_html_tree, citations, case_path)
    dates = get_date_filed(clean_html_tree, citations, case_path=case_path, court=court)
    if not dates and ('review_issues' in DEBUG or 'log_bad_values' in DEBUG):
        if 'review_issues' in DEBUG:
            subprocess.Popen(['firefox', 'file://%s' % case_path], shell=False).communicate()
            raw_input("No date identified! Can we fix this and restart, or just press enter to log it? ")
        if 'log_bad_values' in DEBUG:
            # Write the failed case out to file.
            with open('missing_dates_post_focus.txt', 'a') as out:
                out.write('%s\n' % case_path)
Exemple #4
0
def import_law_box_case(case_path):
    raw_text = open(case_path).read()
    clean_html_tree, complete_html_tree, clean_html_str, body_text = get_html_from_raw_text(
        raw_text)
    citations = get_citations_from_tree(complete_html_tree, case_path)
    court = get_court_object(clean_html_tree, citations, case_path)

    if not court and 'review_court_issues' in DEBUG:
        if 'review_court_issues' in DEBUG:
            subprocess.Popen(['firefox', 'file://%s' % case_path],
                             shell=False).communicate()
            raw_input(
                "No court identified! Can we fix this and restart, or just press enter to log it? "
            )
        if 'log_bad_courts' in DEBUG:
            # Write the failed case out to file.
            with open('missing_courts_post_focus.txt', 'a') as out:
                out.write('%s\n' % case_path)