Skip to content

Instantly share code, notes, and snippets.

@nivaca
Created August 1, 2021 20:40
Show Gist options
  • Select an option

  • Save nivaca/86c2e7fce03b62ba7d4c8fe3f9b4c1b0 to your computer and use it in GitHub Desktop.

Select an option

Save nivaca/86c2e7fce03b62ba7d4c8fe3f9b4c1b0 to your computer and use it in GitHub Desktop.
Converts to smart title case a text in the clipboard and stores it again in it
import pyperclip
from titlecase import titlecase
inputtext = pyperclip.paste()
outputtext = titlecase(inputtext)
pyperclip.copy(outputtext)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment