home *** CD-ROM | disk | FTP | other *** search
- : FOL_NUM2.FSR
- : FSR for converting the US Constitution to 3.0 Flat File format
- :
- : Use FOL_NUM2.DEF as the Definition File
- :
- :
- :1 Strip out Tabs
- : Search for \t and replace with ""
- "\t" "" -c
- :
- :2 Add Records
- : Insert <RD> code after all CRLFs followed by a captital letter
- "\r\n{[A-Z]}" "\r\n<RD>{1}" -c
- :
- :3 Add Levels
- : To Constitution
- : Search for <RD> followed by THE CONSTITUTION
- "<RD>THE CONSTITUTION" "<RD:Constitution>THE CONSTITUTION" -c
- :
- : To Sections
- : Search for <RD> followed by ARTICLE # - Section # (Article is Roman,
- : Section is Arabic)
- "<RD>{ARTICLE [IVX]+ - Section [1-9]+}" "<RD:Section>{1}" -c
- :
- : To Articles
- : This was put off to the end to avoid conflicts with the Sections (which
- : start with 'ARTICLE')
- : Search for <RD> followed by ARTICLE.
- "<RD>ARTICLE" "<RD:Article>ARTICLE" -c
- :
- :4 Add Paragraph Styles
- : To Preamble
- : Search for <RD> followed by 'We the People of the United States'
- : and insert <PS:Preamble> in front of it.
- "<RD>{We the People of the United States}" "<RD><PS:Preamble>{1}" -c
- :
- :5 Add Fields
- : To Preamble
- : Search for the Preamble PS style followed by everything up to a CRLF;
- : add <FD:Preamble> to beginning and </FD:Preamble> to the end
- "<PS:Preamble>{[^\r\n]+}\r\n" "<PS:Preamble><FD:Preamble>{1}</FD:Preamble>" -c
- :
- : Presidential Powers
- : Search for CRLF followed by anything which is not a CRLF up to 'President'
- : followed by anything which is not a CRLF up to a CRLF. Insert
- : <FD:"Pres Powers"> after 1st CRLF and </FD:"Pres Powers"> before 2nd CRLF
- "\r\n{[^\r\n]*President[^\r\n]*}\r\n" "\r\n<FD:\"Pres Powers\">{1}</FD:\"Pres Powers\">\r\n" -c
- :
- : Remove incorrect fields
- : Search for <FD:"Pres Powers"> followed by anything which is not a CRLF
- : up to either Vice President or President pro tempore followed by
- : everything which is not a CRLF up to </FD:"Pres Powers"> followed by a CRLF. Replace
- : text only; remove FD and /FD codes
- :
- "<FD:\"Pres Powers\">{[^\r\n]*(Vice President|President pro tempore)[^\r\n]*}</FD:\"Pres Powers\">\r\n" "{1}" -c
- :
- : Swap order of FD code and RD codes
- : Search for <FD:"Pres Powers"> followed by <RD>.
- : Invert the order in the replace string
- :
- "<FD:\"Pres Powers\"><RD>" "<RD><FD:\"Pres Powers\">" -c
- :
- :6 Add Popup Notes
- : All searches for Popup text are essentially the same. Search for the
- : archaic spelling, and then replace the spelling with the Popup codes
- : around it. Part of the Popup code will contain the correct spelling.
- :
- : To Behaviour
- "{ Behaviour| behaviour}" "<PW:Popup,2,1>behavior<LT>{1}</PW>" -c
- :
- : To Carying
- "{ Carying| carying}" "<PW:Popup,2,1>carrying<LT>{1}</PW>" -c
- :
- : To Controul
- "{ Controul| controul}" "<PW:Popup,2,1>control<LT>{1}</PW>" -c
- :
- : To Chuse
- "{ Chuse| chuse}" "<PW:Popup,2,1>choose<LT>{1}</PW>" -c
- :
- : To Chusing
- "{ Chusing| chusing}" "<PW:Popup,2,1>increased<LT>{1}</PW>" -c
- :
- : To Encreased
- "{ Encreased| encreased}" "<PW:Popup,2,1>increased<LT>{1}</PW>" -c
- :
- : To Labour
- "{ Labour| labour}" "<PW:Popup,2,1>labor<LT>{1}</PW>" -c
- :
- : To Offenses
- "{ Offenses| offenses}" "<PW:Popup,2,1>offences<LT>{1}</PW>" -c
- :
- :7 Add Bookmarks
- : Search for ARTICLE followed by a Roman Numeral followed by anything
- : which is not a CRLF. Store all except CRLF in a variable, replace inside of the
- : Bookmark code <BK:"[bookmark]"> and after the BK code. Add CRLF
- : to end
- "{ARTICLE [IVX]+[^\r\n]+}\r\n" "<BK:\"{1}\">{1}\r\n" -c
-