smartypants — это Python-порт оригинального инструмента SmartyPants, предназначенный для интеллектуального преобразования типографики в тексте: кавычек, тире, многоточий и т.д.
Пример:
import smartypants
text = '"SmartyPants" is smart, so is <code>smartypants</code> -- a Python port'
print(smartypants.smartypants(text))
Результат:
“SmartyPants” is smart, so is <code>smartypants</code> — a Python port
#Python #SmartyPants #smartypants #PyPI #CLI #TextFormatting #OpenSource #PythonTools #GitHubActions #DevTools #Repology #CI #CodeQuality
https://github.com/justinmayer/smartypants.py
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - justinmayer/smartypants.py: Translate plain ASCII quotation marks and other characters into “smart” typographic HTML entities.
Translate plain ASCII quotation marks and other characters into “smart” typographic HTML entities. - justinmayer/smartypants.py
1 3👍2 2