Giter VIP home page Giter VIP logo

middleman-spellcheck's People

Contributors

minivan avatar olds22 avatar vledniov avatar wkoszek avatar zealot128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

middleman-spellcheck's Issues

[rfc] some notes on development

I wanted to add some unit tests, and my understanding is that "rake" should do most of the necessary setup and configuration for me, but when I typed rake it gets stuck at the issue from below.

I'd like to understand if it all should just work, or whether I need to modify something.

wk:/w/repos/middleman-spellcheck> bundle
Fetching git://github.com/middleman/middleman.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Operation timed out

Retrying git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet` in directory /w/repos/middleman-spellcheck has failed.
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Operation timed out

Retrying git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet due to error (3/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet` in directory /w/repos/middleman-spellcheck has failed.

fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=Operation timed out

Retrying git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet` in directory /w/repos/middleman-spellcheck has failed.
^Cwk:/w/repos/middleman-spellcheck>

[feature request] Support exclude-tags parameter

My site has a lot of source code-like things like PredicateFactory that are being picked up by the spell checker. I would like to be able to do:

activate :spellcheck, exclude-tags: [:code, :pre]

to cause the spell checking to avoid checking these elements that cause lots of spurious errors.

[feature request] Generate list of misspelled words

It would be convenient if middleman-spellcheck also generated at the end a deduplicated list reporting all the words that had been flagged as misspelled. Say you used "Heroku", "PredicateFactory", and "changeListener" throughout your pages and these are words you'd like to skip, but you also had a few words you genuinely misspelled.

["Heroku","PredicateFactory","changeListener","signifigant"]

I then take my list, prune any genuine misspellings, and add the rest to my allow: list in config.rb. This is the equivalent of doing something like:

bundle exec middleman build | grep "misspell" | sort | uniq | cut -d"'" -f2 | sed 's/\(.*\)/\"\1\"/' | tr "\\n" "," | sed 's/\(.*\),$/[\1]/'

Words with single quotes before or after are being marked misspelled

Here is a few examples,
spellcheck Running spell checker for /templates/development-helpers/ misspell The word ''Name' is misspelled
misspell The word ''data' is misspelled
misspell The word ''none'' is misspelled

I can work on this. Any guesses on where to start looking?

Could it be related to this?
https://github.com/minivan/middleman-spellcheck/blame/e3a85d910fd99d92e9d17480ce72154118050af7/lib/middleman-spellcheck/spellchecker.rb#L80

[feature request] per-blog-post whitelist for words

After I made fixes to middleman-spellcheck it's almost right.

https://circleci.com/gh/wkoszek/me

But I didn't bother to fix anything, since I've noticed some bugs in some articles are features in another. I need per-article whitelist for words which I know are fine.

The global list I'd just keep for things that repeat, such as names, acronyms etc..

Summary: we need per-page section, somewhere in front-matter, where I could say:

spellcheck:
- good: SEO, CEO, Toyota
- good: IBM, Twitter, GitHub

Getting: undefined method `strip' for nil:NilClass (NoMethodError)

I'm getting this trace from my attempt to build a Dockerfile for my home website.

This is Ubuntu 15.04 with Ruby 2.2.4 built via RVM.

We'll have to debug this guy.

  spellcheck  Running spell checker for /blog/2012/02/02/book-secret/
/nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/spellchecker.rb:57:in `block (2 levels) in query': undefined method `strip' for nil:NilClass (NoMethodError)
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/spellchecker.rb:51:in `each'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/spellchecker.rb:51:in `block in query'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/spellchecker.rb:48:in `popen'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/spellchecker.rb:48:in `query'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/spellchecker.rb:87:in `check'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/extension.rb:110:in `run_check'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/extension.rb:104:in `spellcheck_resource'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/extension.rb:31:in `block in after_build'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/extension.rb:29:in `each'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-spellcheck-0.9.2/lib/middleman-spellcheck/extension.rb:29:in `after_build'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-core-3.3.12/lib/middleman-core/extension.rb:159:in `block in bind_after_build'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/uber-0.0.15/lib/uber/options.rb:96:in `instance_exec'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/uber-0.0.15/lib/uber/options.rb:96:in `proc!'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/uber-0.0.15/lib/uber/options.rb:82:in `evaluate_for'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/uber-0.0.15/lib/uber/options.rb:60:in `call'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/hook.rb:59:in `evaluate_callback'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/hook.rb:55:in `execute_callback'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/hook.rb:40:in `block in run'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/hook.rb:39:in `each'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/hook.rb:39:in `inject'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/hook.rb:39:in `run'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks.rb:55:in `run_hook_for'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/hooks-0.4.1/lib/hooks/instance_hooks.rb:6:in `run_hook'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-core-3.3.12/lib/middleman-core/cli/build.rb:72:in `build'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-core-3.3.12/lib/middleman-core/cli.rb:72:in `method_missing'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-core-3.3.12/lib/middleman-core/cli.rb:20:in `start'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/gems/middleman-core-3.3.12/bin/middleman:18:in `<top (required)>'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/bin/middleman:23:in `load'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/bin/middleman:23:in `<main>'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/bin/ruby_executable_hooks:15:in `eval'
    from /nonexistent/.rvm/rubies/ruby-2.2.4/lib/ruby/gems/2.2.0/bin/ruby_executable_hooks:15:in `<main>'
makefile:4: recipe for target 'render' failed
make: *** [render] Error 1

Middleman 4?

Even the 0.9.2 gem declares a dependency on middleman-core ~> 3.2, so cannot be used with Middleman 4.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.