A little program to automate reformatting edX video transcript files more nicely

by Patrick Lee on 17 May 2019 in categories actuarial BigData tech with tags edX lifelong learning

Further to my previous post with tips about doing online edX courses,  where I recommended downloading the transcript files of key course videos, you will usually find that by default when you copy and paste the content of the text (.txt) files into your (OneNote) notes, they aren't formatted very nicely.

In particular there will often be far too many carriage returns, leading to a large number of rather narrow lines.

You can improve the formatting by hand by going through and removing the unnecessary carriage returns, but this is tedious and time consuming.

I wrote a small C# WPF (Windows Presentation Foundation) program to do this for me. You can download the code  for this (for use free of charge, at your own risk, using say Microsoft Visual Studio) from this Github repository(Github is a place where software developers can share and collaborate on code).

To use this program

In the edX course, click on the .txt file link for the video. This will normally put the transcript file (e.g. VideoTranscript.txt) in your downloads folder.

Run the WpfTextEditor project (in debug mode will do). The following window should appear:

WpfTextEditor1.jpg

Click the Run button.

Use the common dialog box that appears to navigate to the .txt file that you wish to reformat the contents of more neatly (e.g.Downloads\VideoTranscript.txt).

WpfTextEditorSelectFile.jpg

Select the desired transcript file (e.g. VideoTranscript.txt) file and click the Open button.

The program should read in the contents of the text file, reformat it more neatly and put the results into the Output text box of the program's window:

WpfTextEditor2.jpg

Click somewhere inside the Output text box then (on a Windows machine) press Ctrl+A (to select all the text):

WpfTextEditorSelectAllOutputText.jpg

Then type Ctrl+X (to cut all the text). You should then be able to paste (Ctrl+V) the formatted video transcript text into the relevant place (e.g. the relevant part of your OneNote page for the module containing the video).

Conclusion

This should make your notes of the videos in the course more readable. I also recommend taking screenshots of key parts of the videos and pasting them at the relevant places in your transcript notes.