I want to convert all text files in a directory to one csv file. I want the input to the csv to be the text in the text file labeled by the author of the text file found in the filename. For reference, this is what some filenames look like:
'Winston Churchill___The Crisis, Complete.txt' 'Winston Churchill___The Crossing.txt' 'Winston Churchill___The Dwelling Place of Light, Complete.txt' 'Winston Churchill___The Inside of the Cup, Complete.txt' 'Zane Grey___Betty Zane.txt' 'Zane Grey___Desert Gold.txt' 'Zane Grey___Riders of the Purple Sage.txt'
Example output would be:
column1 column2 Author1 text written by author 1...... Author1 text written by author 1...... Author2 text written by author 2...... Author2 text written by author 2......
Edit: test text.... entails 1000 characters of text written by the author in the corresponding column.