Advertisement
here2share

*** Basic Batch Replacements

May 28th, 2015
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.31 KB | None | 0 0
  1. # basic corrections
  2. corr = '''
  3. ` = '
  4. aint = Ain't
  5. arent = Aren't
  6. cant = Can't
  7. couldve = Could've
  8. couldnt = Couldn't
  9. couldntve = Couldn't've
  10. didnt = Didn't
  11. doesnt = Doesn't
  12. dont = Don't
  13. hadnt = Hadn't
  14. hadntve = Hadn't've
  15. hasnt = Hasn't
  16. havent = Haven't
  17. hed = He'd
  18. hedve = He'd've
  19. hes = He's
  20. Id = I'd
  21. Idve = I'd've
  22. Im = I'm
  23. Ive = I've
  24. isnt = Isn't
  25. itd = It'd
  26. itdve = It'd've
  27. itll = It'll
  28. maam = Ma'am
  29. mightve = Might've
  30. mightnt = Mightn't
  31. mightntve = Mightn't've
  32. mustve = Must've
  33. mustnt = Mustn't
  34. mustntve = Mustn't've
  35. oclock = O'clock
  36. oughtnt = Oughtn't
  37. oughtntve = Oughtn't've
  38. shedve = She'd've
  39. shellve = She'll've
  40. shes = She's
  41. shouldve = Should've
  42. shouldnt = Shouldn't
  43. shouldntve = Shouldn't've
  44. thats = That's
  45. thered = There'd
  46. theres = There's
  47. theyd = They'd
  48. theyll = They'll
  49. theyllve = They'll've
  50. theyre = They're
  51. theyve = They've
  52. wasnt = Wasn't
  53. wellve = We'll've
  54. weve = We've
  55. werent = Weren't
  56. whatll = What'll
  57. whatllve = What'll've
  58. whatre = What're
  59. whats = What's
  60. whatve = What've
  61. whens = When's
  62. whenve = When've
  63. whered = Where'd
  64. wheres = Where's
  65. whereve = Where've
  66. wholl = Who'll
  67. whollve = Who'll've
  68. whos = Who's
  69. whove = Who've
  70. willve = Will've
  71. wont = Won't
  72. wontve = Won't've
  73. wouldve = Would've
  74. wouldnt = Wouldn't
  75. wouldntve = Wouldn't've
  76. yall = Y'all
  77. yalldve = Y'all'd've
  78. yallre = Y'all're
  79. yallve = Y'all've
  80. youd = You'd
  81. youdve = You'd've
  82. youll = You'll
  83. youllve = You'll've
  84. youre = You're
  85. youve = You've
  86. Jr. = Jr
  87. Sr. = Sr
  88. Mr. = Mr
  89. Mrs. = Mrs
  90. Ms. = Ms
  91. Dr. = Dr
  92. Lil{'} = Li'l
  93. &amp{;_} = and
  94. {([}ft{.} / {([}feat{.{*ur{*es/ing}} / {([}pres{.{*ent{*ing/s}}} = (feat.
  95. jpeg = jpg
  96. .mp3.mp3 = .mp3
  97. '''
  98.  
  99. # to reconfirm
  100. corr2 = '''
  101. cuz * 'Cuz
  102. hell * He'll
  103. hows * How's
  104. Ill * I'll
  105. its * It's
  106. lets * Let's
  107. shed * She'd
  108. shell * She'll
  109. whys * Why's
  110. were * We're
  111. wed * We'd
  112. well * We'll
  113. verses * vs
  114. a.k.a. * aka
  115. original
  116. {^([}no tags{^])}
  117. {^([}no{ }shout{^])}
  118. {^([}www+{^])}
  119. {^([}http+{^])}
  120. {^([}no{ }shout{^])}
  121. '''
  122.  
  123. # exclude from title formatting
  124. excl = '''
  125. 3D
  126. DJ
  127. TV
  128. USA
  129. UK
  130. vs
  131. (of
  132. (aka
  133. (feat.
  134. II
  135. III
  136. IV
  137. VI
  138. VII
  139. VIII
  140. IX
  141. XI
  142. XII
  143. XIII
  144. XIV
  145. V
  146. XV
  147. XVI
  148. XVII
  149. XVIII
  150. V
  151. XIX
  152. XX
  153. XXI
  154. XXII
  155. XXIII
  156. XXIV
  157. XXV
  158. '''
  159.  
  160. # remove year stamps
  161. remove = '''
  162. {^([}{^#}{^])}
  163. '''
  164.  
  165. # remove if line starts with...
  166. remnbr = '''
  167. {([}{^#}{.]) - }
  168. '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement