Text file name normalizer now removes punctuation from titles

This commit is contained in:
Robert Miles 2018-08-03 01:26:39 -04:00
parent 8084233c64
commit 05ba1d01f6
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import requests, re
import requests, re, string
from jsonpath import jsonpath
from urllib.parse import quote as raw_quote
import argparse
@ -29,7 +29,7 @@ def processTranscript(r,dir_style=1):
return "\n".join(text)
def normalize(t):
return t.lower().replace(" ","_")
return "".join(filter(lambda x: not x in string.punctuation,t.lower())).replace(" ","_")
if __name__=="__main__":
parser = argparse.ArgumentParser(description="Grabs transcripts.")