nycapitolcamp / legislative-apps

Apps providing new visualizations to Open Legislation data.
http://nycapitolcamp.github.com/legislative-apps/
9 stars 3 forks source link

New Line Mania! #9

Closed GraylinKim closed 11 years ago

GraylinKim commented 11 years ago

Because bills follow a fixed character width rule when the text changes, all the new lines in the paragraph shift as well. This leads to a lot of choppy new line display in the diff that we need to figure out.

Example from S39-2011

(SUCH AS "DAY-GLO" INK). THE NOTICE SHALL SPECIFY THE APPLICATION DATE,
THE TYPE OF LICENSE, THE
IDENTIFICATION NUMBER AND HOW TO CONTACT THE
STATE LIQUOR AUTHORITY TO
GIVE A RESPONSE TO THE APPLICATION. THE
APPLICANT SHALL MAKE REASONABLE
EFFORTS TO INSURE SUCH NOTICE SHALL
REMAIN POSTED THROUGHOUT THE PENDEN-
CY OF SUCH APPLICATION. ADDI-
TIONALLY, WITHIN TEN DAYS OF THE APPLI-
CANT'S RECEIPT OF A WRITTEN
REQUEST FROM THE AUTHORITY, THE APPLICANT
SHALL RE-POST SUCH NOTICE.
THE AUTHORITY MAY ADOPT SUCH RULES AS IT MAY
DEEM NECESSARY TO CARRY OUT
THE PURPOSE OF THIS PARAGRAPH.
rcbarnes commented 11 years ago

I ported some changes between branches that should mostly take care of the newlines. Diffs now include a pass through clean_line_formatting which wraps around some regexen I suggested (replace all multiple spaces with a single space, and delete all space-padded numbers up to 6 digits long at the start of a line), a conversion of empty lines to <br>, and some logic to strip page footers (that seems to miss them at the moment).

rcbarnes commented 11 years ago

(I'm closing this for now since I think the problem is solved, but if the current version doesn't fix the problem, feel free to reopen the issue.)

GraylinKim commented 11 years ago

Reopening because the example I gave when I opened the issue still isn't solved.

GraylinKim commented 11 years ago

This specific issue has now been resolved but there are other weird new line issues around.

The extra new-lines in the beginning of S7033 are one such example. Likely there are others as well.

GraylinKim commented 11 years ago

Hmm, it actually seems like the S7033 example went away at some point. I guess I'll close this.