Lately, I've been mostly playing around with rust (sometimes on codingame), nix and github actions.
Sometimes I leave notes on my old-school home page at http://www.lpenz.org/ (repository).
Command-line interface for After the Deadline language checker
License: BSD 3-Clause "New" or "Revised" License
Lately, I've been mostly playing around with rust (sometimes on codingame), nix and github actions.
Sometimes I leave notes on my old-school home page at http://www.lpenz.org/ (repository).
Hello,
I'm attempting to install this on OS X.
When I type "pip3 search atdtool", I get:
atdtool - After the Deadline command-line tool
When I type "pip3 install atdtool", I get:
Collecting atdtool
Could not find a version that satisfies the requirement atdtool (from versions: )
No matching distribution found for atdtool
Any ideas?
Thanks.
P.S. Below is a more detailed output with -vvv:
pip3 -vvv install atdtool
Collecting atdtool
1 location(s) to search for versions of atdtool:
On Windows 7 and OSX when I use atdtool in gVim as the makeprg
I get the
following error with the text "my resume".
test.txt|19 col 1| Diacritical Marks "my resume"
|| Traceback (most recent call last):
|| File "C:\bin\atdtool", line 227, in <module>
|| main()
|| File "C:\bin\atdtool", line 220, in main
|| showerrs(filename, fd, errs)
|| File "C:\bin\atdtool", line 175, in showerrs
|| print(' suggestions: %s' % ', '.join(e.suggestions))
|| UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 19: ordinal not in range(128)
Atdtool is trying to tell me to use "Diacritical Marks" and make convert
resume
to résumé
Looking at this stack overflow answer I found a snippet that fixes the problem. The answerer to the question also explained that this snipped isn't Python 3 compatible and after a little more searching I found it's pretty common place but also consider a hack that can mess things up.
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
I also found this that also works but might be less hacky
#!/usr/bin/python -S
import sys
sys.setdefualtencoding("utf-8")
import site
Also here is a work around if you just want to e
s not é
s you can replace this line:
print(' suggestions: %s' % ', '.join(e.suggestions))
with this:
print repr(' suggestions: %s' % ', '.join(e.suggestions))
The most accepted solution is to creating an environmental variable named PYTHONIOENCODING and setting it equal to 'utf-8'.
environmental variables mac osx
environmental variables windows
After finding the environmental variable solution I don't think the code needs to be changed, but this issue can help people that might have the same problem in the future.
On this sample text:
_ _ _ _ englich _ _ writted _ _
atdtool reports:
$ atdtool /tmp/english-sample.txt
/tmp/english-sample.txt:1:8: Spelling "englich"
suggestions: english, English, enrich, Anglice
/tmp/english-sample.txt:2:1: (?) Spelling "englich"
suggestions: written, writhed, witted, gritted
The first report says that is in column 8 but it is on the number 9, so 1:9
The second one says that is the first column of the second line, but we still on the first line, and in column 21, so 1:21
This makes atdtool uncompatible with other external tools, like the atdtool checker in the vim plugin "syntastic"
I do not know if I didn't install the package correctly but, when I run it, the XML is not parsed and there are traceback errors. This was when it was run on the file "hellop world"
<results>
<error>
<string>hellop</string>
<description>Spelling</description>
<precontext></precontext>
<suggestions>
<option>hello</option>
</suggestions>
<type>spelling</type>
</error>
</results>
Traceback (most recent call last):
File "/usr/local/bin/atdtool", line 85, in <module>
main()
File "/usr/local/bin/atdtool", line 75, in main
errs = atdtool.checkDocument(cfg, fd)
File "/usr/local/lib/python2.7/dist-packages/atdtool/__init__.py", line 47, in checkDocument
et = ElementTree.fromstring(response.read())
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
return parser.close()
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Cheers!
Hi,
I have found a small bug which should be caused probably by recyclating variables (not cleanup them in each loop, not using them as local, etc...)
In a sample text file that looks like this:
_ _ _ _ englich _ _ writted _ _
You get this report by atdtool:
$ atdtool /tmp/english-sample.txt
/tmp/english-sample.txt:1:8: Spelling "englich"
suggestions: english, English, enrich, Anglice
/tmp/english-sample.txt:2:1: (?) Spelling "englich"
suggestions: written, writhed, witted, gritted
Notice that "Spelling englich" is referenced 2 times but only used one time, the second report is about a different word, not "englich"
My goal was to be able to use atdtool from cmd like this atdtool [filename]
were [filename]
is a file to run atdtool on. I am able to do this by running the following batch script that is in my PATH.
@echo off
python C:\atdtool\atdtool %1
I was wondering if there is different preferred method for doing this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.