CotEditor



CotEditor

CotEditor is arguably the best looking of the bunch if what you want is an app that uses native Mac controls. It’s the only editor on my list whose UI updated for Big Sur. It is Mac-assed to its core — it even supports versions (remember that?). It’s an outstanding text editor. CotEditor is a text editor for macOS. Discover CotEditor alternatives, reviews, features and functionalities.

CotEditor
  • Dec 22, 2020 CotEditor is not available for Windows but there are plenty of alternatives that runs on Windows with similar functionality. The most popular Windows alternative is Visual Studio Code, which is free.
  • CotEditor is a pure document-based Cocoa application written in Swift.
  • 8 alternative and related products to CotEditor. The free plain-text editor for OS X. Full-featured Cloud IDE for developers and teams. 8 Alternatives to CotEditor. The modern & hackable text.
Count number of characters without HTML tags on CotEditor
CotEditor

Coteditor

Count Characters without Tags.py

Coteditor Windows

#!/usr/bin/env python
''Count Characters w/o Tags for CotEditor
Count number of characters without HTML tags on CotEditor
and display it in an alert window.
This is a CotEditor script.
%%%{CotEditorXInput=Selection}%%%
''
__version__='1.1'
__date__='2013-04-26'
__author__='1024jp <http://wolfrosch.com/>'
__license__='Creative Commons Attribution-NonCommercial 3.0 Unported License'
importre
importsys
fromsubprocessimportPopen, PIPE
# main --------------------------------------------------------------
defrun_osascript(script):
''Run osascript.''
p=Popen(['osascript', '-'], stdin=PIPE, stdout=PIPE)
stdout, stderr=p.communicate(script)
returnstdout.rstrip()
defdisplay(text, title=None, app='CotEditor'):
''Display dialog.''
text=text.replace('', '')
script='tell application '{}' to display dialog '{}'.format(app, text)
script+=' with icon note buttons {{'OK'}} default button 1'
iftitle:
script+=' with title '+title+''
run_osascript(script)
defcount_chars(text):
''Return number of charactors without tags.''
text=re.sub('[nt]', ', text)
text=re.sub(' +', ' ', text)
text=re.sub('<(head|script|style)[ >].+</1>', ', text)
text=re.sub('<[^>]+>', ', text)
returnlen(unicode(text, 'utf-8'))
if__name__'__main__':
text=sys.stdin.read()
length=count_chars(text)
display(str(length) +' characters', 'Number of Characters without Tags')
Textmate

Coteditor Windows

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment




Comments are closed.