home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0200 - 0209 / ibm0200-0209 / ibm0200.tar / ibm0200 / FOLIO318.ZIP / FOL_NUM2.FS_ / FOL_NUM2.FS
Encoding:
Text File  |  1993-05-19  |  3.6 KB  |  98 lines

  1. :   FOL_NUM2.FSR
  2. :   FSR for converting the US Constitution to 3.0 Flat File format
  3. :
  4. :    Use FOL_NUM2.DEF as the Definition File
  5. :
  6. :
  7. :1  Strip out Tabs
  8. :    Search for \t and replace with ""
  9.     "\t" "" -c
  10. :
  11. :2  Add Records
  12. :    Insert <RD> code after all CRLFs followed by a captital letter
  13.     "\r\n{[A-Z]}" "\r\n<RD>{1}" -c
  14. :
  15. :3  Add Levels
  16. :    To Constitution
  17. :     Search for <RD> followed by THE CONSTITUTION
  18.     "<RD>THE CONSTITUTION" "<RD:Constitution>THE CONSTITUTION" -c
  19. :
  20. :    To Sections
  21. :     Search for <RD> followed by ARTICLE # - Section # (Article is Roman,
  22. :     Section is Arabic)
  23.     "<RD>{ARTICLE [IVX]+ - Section [1-9]+}" "<RD:Section>{1}" -c
  24. :
  25. :    To Articles
  26. :     This was put off to the end to avoid conflicts with the Sections (which
  27. :     start with 'ARTICLE')
  28. :      Search for <RD> followed by ARTICLE.
  29.     "<RD>ARTICLE" "<RD:Article>ARTICLE" -c
  30. :
  31. :4  Add Paragraph Styles
  32. :    To Preamble
  33. :     Search for <RD> followed by 'We the People of the United States'
  34. :     and insert <PS:Preamble> in front of it.
  35.     "<RD>{We the People of the United States}" "<RD><PS:Preamble>{1}" -c
  36. :
  37. :5  Add Fields
  38. :    To Preamble
  39. :     Search for the Preamble PS style followed by everything up to a CRLF;
  40. :     add <FD:Preamble> to beginning and </FD:Preamble> to the end
  41.     "<PS:Preamble>{[^\r\n]+}\r\n" "<PS:Preamble><FD:Preamble>{1}</FD:Preamble>" -c
  42. :
  43. :    Presidential Powers
  44. :     Search for CRLF followed by anything which is not a CRLF up to 'President'
  45. :     followed by anything which is not a CRLF up to a CRLF. Insert
  46. :     <FD:"Pres Powers"> after 1st CRLF and </FD:"Pres Powers"> before 2nd CRLF
  47.     "\r\n{[^\r\n]*President[^\r\n]*}\r\n" "\r\n<FD:\"Pres Powers\">{1}</FD:\"Pres Powers\">\r\n" -c
  48. :
  49. :     Remove incorrect fields
  50. :      Search for <FD:"Pres Powers"> followed by anything which is not a CRLF
  51. :      up to either Vice President or President pro tempore followed by
  52. :      everything which is not a CRLF up to </FD:"Pres Powers"> followed by a CRLF. Replace
  53. :      text only; remove FD and /FD codes
  54. :
  55.     "<FD:\"Pres Powers\">{[^\r\n]*(Vice President|President pro tempore)[^\r\n]*}</FD:\"Pres Powers\">\r\n" "{1}" -c
  56. :
  57. :     Swap order of FD code and RD codes
  58. :      Search for <FD:"Pres Powers"> followed by <RD>.
  59. :      Invert the order in the replace string
  60. :
  61.     "<FD:\"Pres Powers\"><RD>" "<RD><FD:\"Pres Powers\">" -c
  62. :
  63. :6  Add Popup Notes
  64. :     All searches for Popup text are essentially the same. Search for the
  65. :     archaic spelling, and then replace the spelling with the Popup codes
  66. :     around it. Part of the Popup code will contain the correct spelling.
  67. :
  68. :      To Behaviour
  69.     "{ Behaviour| behaviour}" "<PW:Popup,2,1>behavior<LT>{1}</PW>" -c
  70. :
  71. :      To Carying
  72.     "{ Carying| carying}" "<PW:Popup,2,1>carrying<LT>{1}</PW>" -c
  73. :
  74. :      To Controul
  75.     "{ Controul| controul}" "<PW:Popup,2,1>control<LT>{1}</PW>" -c
  76. :
  77. :      To Chuse
  78.     "{ Chuse| chuse}" "<PW:Popup,2,1>choose<LT>{1}</PW>" -c
  79. :
  80. :      To Chusing
  81.     "{ Chusing| chusing}" "<PW:Popup,2,1>increased<LT>{1}</PW>" -c
  82. :
  83. :      To Encreased
  84.     "{ Encreased| encreased}" "<PW:Popup,2,1>increased<LT>{1}</PW>" -c
  85. :
  86. :      To Labour
  87.     "{ Labour| labour}" "<PW:Popup,2,1>labor<LT>{1}</PW>" -c
  88. :
  89. :      To Offenses
  90.     "{ Offenses| offenses}" "<PW:Popup,2,1>offences<LT>{1}</PW>" -c
  91. :
  92. :7  Add Bookmarks
  93. :     Search for ARTICLE followed by a Roman Numeral followed by anything
  94. :     which is not a CRLF. Store all except CRLF in a variable, replace inside of the 
  95. :     Bookmark code <BK:"[bookmark]"> and after the BK code. Add CRLF
  96. :     to end
  97.     "{ARTICLE [IVX]+[^\r\n]+}\r\n" "<BK:\"{1}\">{1}\r\n" -c
  98.