It seems that you're not describing an algorithmic transformation (eg first letter, last letter, word boundaries, etc) but rather an arbitrary capitalization scheme in the context of known words.
As such, you'll probably want a permutation of the following using replace:
with open("capitalize.txt") as f:
for line in f:
print line.replace("javascript", "JavaScript")
If you've got a known set of words, then you can make it fancier, such as creating a dict {'javascript': 'JavaScript'} and then looping through the keys replacing each key with its value, but the basic approach will be more manual than you're envisioning.