diff --git a/Change Case.alfredworkflow b/Change Case.alfredworkflow index 63faa9b..6a77348 100644 Binary files a/Change Case.alfredworkflow and b/Change Case.alfredworkflow differ diff --git a/README.md b/README.md index 001c885..d165cc2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Change Case — Workflow for Alfred -Changes the case of text selected, provided, or on the clipboard to UPPERCASE, lowercase, Title Case, CamelCase, kebab-case, or snake_case. +Changes the case of text selected, provided, or on the clipboard to UPPERCASE, lowercase, Title Case, CamelCase, kebab-case, or snake_case. Now works with diacritics. -[Download the workflow](https://github.com/gillibrand/alfred-change-case/blob/master/Change%20Case.alfredworkflow). +[Download the workflow](https://github.com/bpetrynski/alfred-change-case/releases/). + +Python 3 is required, [install it before use](https://installpython3.com/mac/). ![Screenshot](changecase.png) @@ -14,6 +16,9 @@ Optionally, any text typed after `case` will be changed instead of the clipboard ## Version History +### 4/8/2021 +- Support for diacritics by changing interpreter from Python 2 to Python 3. + ### 9/9/2018 - Added CamelCase, kebab-case, and snake_case options diff --git a/changecase.py b/changecase.py index 8393e92..ea08a92 100644 --- a/changecase.py +++ b/changecase.py @@ -5,6 +5,7 @@ from xml.sax.saxutils import escape from titlecase import titlecase + if len(sys.argv) > 1 and len(sys.argv[1].strip()): text = sys.argv[1] else: @@ -36,37 +37,37 @@ def upcase(m): } -print """ +print(""" - %(lower)s - lowercase + "%(lower)s" + Transform text to `lowercase` lowercase.png - %(upper)s - UPPERCASE + "%(upper)s" + Transform text to `UPPERCASE` uppercase.png - %(title)s - Title Case + "%(title)s" + Transform text to `Title Case` titlecase.png - %(camel)s - CamelCase + "%(camel)s" + Transform text to `CamelCase` camelcase.png - %(kebab)s - kebab-case + "%(kebab)s" + Transform text to hyphenated `kebab-case` kebabcase.png - %(snake)s - snake_case + "%(snake)s" + Transform text to `snake_case` snakecase.png -""" % variations +""" % variations)