cjoh / status-stats Goto Github PK
View Code? Open in Web Editor NEWA derivative of @segphault's status-wordcount. Displays wordcount, grade level, and Flesh-Kincaid scores, to help you write for your audience.
License: MIT License
A derivative of @segphault's status-wordcount. Displays wordcount, grade level, and Flesh-Kincaid scores, to help you write for your audience.
License: MIT License
In keymaps/status-stats.cson: Use the atom-workspace
tag instead of the workspace
class.
The context menu CSON format has changed. Please see
https://atom.io/docs/api/latest/ContextMenuManager
Uncaught TypeError: Cannot read property 'getText' of undefined
Atom Version: 0.157.0
System: Mac OS X 10.10.1
Thrown From: status-stats package, v0.1.0
At /Users/chungwenlin/.atom/packages/status-stats/lib/status-stats-view.coffee:13
TypeError: Cannot read property 'getText' of undefined
at StatusStatsView.module.exports.StatusStatsView.updateWordCount (/Users/chungwenlin/.atom/packages/status-stats/lib/status-stats-view.coffee:13:19)
at atom-workspace.<anonymous> (/Users/chungwenlin/.atom/packages/status-stats/lib/status-stats-view.coffee:1:1)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:110:34)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:156:19)
at PaneContainerView.jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:64:23)
at PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:53:19)
at /Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at /Applications/Atom.app/Contents/Resources/app/src/pane-container.js:347:34
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.setActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:250:22)
at Pane.module.exports.Pane.removeItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:375:16)
at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:443:16)
at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:422:12)
at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:604:35)
at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:643:21)
at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:284:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)
/cc @atom/core
[Enter steps to reproduce below:]
Atom Version: 0.179.0
System: Mac OS X 10.10.2
Thrown From: status-stats package, v0.1.0
Uncaught TypeError: undefined is not a function
At /Users/clint/.atom/packages/status-stats/lib/status-stats-view.coffee:13
TypeError: undefined is not a function
at StatusStatsView.module.exports.StatusStatsView.updateWordCount (/Users/clint/.atom/packages/status-stats/lib/status-stats-view.coffee:13:20)
at atom-workspace.<anonymous> (/Users/clint/.atom/packages/status-stats/lib/status-stats-view.coffee:1:1)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:110:34)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:156:19)
at PaneContainerView.jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:64:23)
at PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:53:19)
at /Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at /Applications/Atom.app/Contents/Resources/app/src/pane-container.js:347:34
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.setActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:264:22)
at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:328:21)
at Pane.module.exports.Pane.activateItemAtIndex (/Applications/Atom.app/Contents/Resources/app/src/pane.js:322:19)
at Pane.module.exports.Pane.activatePreviousItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:293:21)
at atom-pane.atom.commands.add.pane:show-previous-item (/Applications/Atom.app/Contents/Resources/app/src/pane-element.js:185:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:172:20)
-1:35.0 core:backspace (atom-text-editor.editor)
-1:34.9 core:save (atom-text-editor.editor)
-1:34.2 core:backspace (atom-text-editor.editor)
2x -1:33.9 core:save (atom-text-editor.editor)
-0:38.4 project-find:show (atom-text-editor.editor)
-0:36.5 core:confirm (atom-text-editor.editor.mini)
-0:34.9 project-find:show (atom-text-editor.editor.mini)
-0:34.6 core:confirm (atom-text-editor.editor.mini)
-0:27.1 project-find:show (atom-text-editor.editor)
-0:25.8 core:confirm (atom-text-editor.editor.mini)
-0:18.4 core:backspace (atom-text-editor.editor)
-0:15.7 core:save (atom-text-editor.editor)
-0:14.8 pane:show-previous-item (atom-text-editor.editor)
-0:05.7 core:backspace (atom-text-editor.editor)
-0:03.6 core:save (atom-text-editor.editor)
-0:02.3 pane:show-previous-item (atom-text-editor.editor)
{
"core": {
"ignoredNames": [
".git",
".svn",
".DS_Store",
".pyc"
],
"disabledPackages": [
"linter-pylint",
"python-isort",
"travis-ci-status",
"indent-guide-improved"
],
"themes": [
"atom-dark-ui",
"seti-syntax"
]
}
}
# User
Sublime-Style-Column-Selection, v1.2.3
atom-beautify, v0.21.3
atom-python-debugger, v0.2.1
git-log, v0.2.0
git-plus, v4.4.2
linter, v0.11.1
linter-python-pep8, v0.2.0
linter-python-pyflakes, v0.1.0
merge-conflicts, v1.2.10
minimap, v4.1.4
minimap-git-diff, v3.1.1
script, v2.16.0
seti-syntax, v0.3.1
status-stats, v0.1.0
virtualenv, v0.6.2
# Dev
No dev packages
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:187:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:179:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:372:14)
Hi! Thanks for maintaining the status-stats package!
In Atom v1.12, we are going to upgrade CoffeeScript to the latest version. This upgrade entails one potentially breaking change to the language:
Changed strategy for the generation of internal compiler variable names. Note that this means that @example function parameters are no longer available as naked example variables within the function body.
We think your package may be affected by this upgrade, in the following places:
Words
variable hereThese findings are based on linting packages with coffeescope
. We could be wrong about some of them. When we release v1.12 beta, please test your package against it to make sure that it works. Let me know if you have any further questions; I will be happy to help!
Atom Version: 0.181.0
System: Mac OS X 10.10.2
Thrown From: status-stats package, v0.1.0
Uncaught TypeError: Cannot read property 'length' of null
At /Users/jbrains/.atom/packages/status-stats/lib/status-stats-view.coffee:13
TypeError: Cannot read property 'length' of null
at StatusStatsView.module.exports.StatusStatsView.updateWordCount (/Users/jbrains/.atom/packages/status-stats/lib/status-stats-view.coffee:34:45)
at StatusStatsView.updateWordCount (/Users/jbrains/.atom/packages/status-stats/lib/status-stats-view.coffee:3:61)
at StatusStatsView.module.exports.StatusStatsView.attach (/Users/jbrains/.atom/packages/status-stats/lib/status-stats-view.coffee:58:19)
at StatusStatsView.module.exports.StatusStatsView.toggle (/Users/jbrains/.atom/packages/status-stats/lib/status-stats-view.coffee:65:21)
at atom-workspace.<anonymous> (/Users/jbrains/.atom/packages/status-stats/lib/status-stats-view.coffee:26:24)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:115:32)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
-0:00.8 status-stats:toggle (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"markdown-preview"
]
}
}
# User
asciidoc-preview, v0.4.0
editor-stats, v0.16.0
language-asciidoc, v0.8.0
markdown-preview-pandoc, v0.0.11
status-stats, v0.1.0
wordcount, v0.13.1
# Dev
No dev packages
Store package style sheets in the styles/
directory instead of stylesheets/
in the status-stats
package
Package.getStylesheetsPath (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:460:9)
Package.getStylesheetPaths (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:471:32)
Package.loadStylesheets (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:453:38)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:19)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:179:12)
Hi! Thanks for maintaining the status-stats package!
In Atom v1.23, we will some changes that may affect your package.
The methods TextEditor.onDidChange
and TextBuffer.onDidChange
will now call their callbacks less frequently. Previously, these callbacks would get called once for each individual change to the buffer. So if you had 5 cursors and typed a character, they would get called 5 times. Now, they will only get called once, and the event that is passed to them will contain information about all 5 of the changes that have occurred.
The same properties that have always existed on the TextBuffer.onDidChange
events (oldRange
, newRange
, oldText
, and newText
) will still be there, and they will now reflect the sum of all changes that have occurred. But now there will be an additional property called changes
, which will contain an array of more fine-grained objects describing the individual changes. We encourage you to use this property instead of the old ones.
It looks like this package calls the changed methods in the following places:
TextEditor.onDidChange
We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.
It is likely that you do not need to do anything. The old event properties will continue to work.
However, you may be able to handle changes more accurately and efficiently by using the changes
field of the events rather than the old properties. The changes
field does not exist in Atom 1.22 unless you use the TextBuffer.onDidChangeText
method. In Atom 1.23 and above though, .onDidChange
and .onDidChangeText
will become identical, having both the old properties and the new changes
property.
Please let me know if you have any questions. I would be happy to help!
Start atom from command line
Atom Version: 1.1.0
System: "Arch Linux"
Thrown From: status-stats package, v0.1.0
Failed to load the status-stats package
At Cannot read property 'prototype' of undefined
TypeError: Cannot read property 'prototype' of undefined
at __extends (/home/vially/.atom/packages/status-stats/lib/status-stats-view.coffee:5:199)
at /home/vially/.atom/packages/status-stats/lib/status-stats-view.coffee:10:5
at Object.<anonymous> (/home/vially/.atom/packages/status-stats/lib/status-stats-view.coffee:71:5)
at Object.<anonymous> (/home/vially/.atom/packages/status-stats/lib/status-stats-view.coffee:73:4)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
{
"core": {}
}
# User
color-picker, v2.0.13
emmet, v2.3.13
file-icons, v1.6.11
git-log, v0.4.1
go-plus, v3.5.1
linter, v1.9.1
minimap, v4.15.0
status-stats, v0.1.0
vim-mode, v0.62.0
# Dev
No dev packages
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.