Comments (4)
Same problem. I don't see a setting, so I assume it's a bug.
from better-word-count.
Hi thanks for raising the issue. Mobile versions don't have a status bar. So displaying the word count in that way is not possible. However, the statistic collection function is still functional and will detect writing stats over all your devices. In the future you will be able to view your statistics on mobile too.
from better-word-count.
Until this feature is officially supported, here is a workaround for iOS/iPadOS 15 (should also work on MacOS Monterey but I haven't tested that yet).
This is my setup, which assumes you want to exclude comments from the count, but only excludes HTML-style comments (which I use for wider compatibility, along with text replacement to make typing them easier). Adjust as needed.
In the Shortcut Launcher community plugin, create a new launcher:
- Command Name
: Word count minus comments
Shortcut name
:Obsidian Word Count Minus Comments
Input Type
:Multiple
Input Type #1
:Selected Text
Input Type #2
:Entire Document
Separator
:%%OSL%%
Install my Obsidian Word Count Minus Comments shortcut or make a similar one. Obsidian Word Count Minus Comments does the following:
Split Shortcut Input by Custom %%OSL%%
// The “_” here stands for a blank field in Shortcuts.
Replace (?=<!--)([\s\S]*?)--> with _ in Split Text
Get First Item from Updated Text
Set variable SelectionText to Item from List
Get Last Item from Updated Text
Set variable DocumentText to Item from List
Count Words in SelectionText
Set variable SelectionCount to Count
Count Words in DocumentText
Set variable DocumentCount to Count
// The space between “SelectionCount” and “Document” here stands for a newline in Shortcuts.
Show Selection: SelectionCount Document: DocumentCount
The comment exclusion in my shortcut isn't perfect. If you have malformed comments like
<!--Comment 1, which I forgot to close
<!--
Comment 2
-->
it will count all of those words.
On mobile you can’t pull down to summon the command palette when text is selected, but you can add the command palette button or your new “Word count minus comments” command to the mobile toolbar.
from better-word-count.
Since there is no mobile status bar mobile support will come in the form of a separate view, in note statistic rendering and maybe some commands like the work around you have shown. Closing this for now.
from better-word-count.
Related Issues (20)
- Status not showing initially
- Only display rounded statistics HOT 1
- Feature request: Character count of current section HOT 5
- Sometimes on New Notes, Daily Word Count does not increment, even while other words counts do increment
- Showing status bar on a new window
- List item prefixes are counted as words
- exclude whitespace HOT 1
- Feature Request: count of current section sticky on the screen
- [Feature Request] Ability to format numbers to show thousand separators
- Setting text fields to nothing in plugin options breaks plugin
- Straight single quote `'` and closing curly quote `’` are counted as one extra word after any dot punctuation `.?!`
- Feature Request: Add support for daily metric in the current note
- Feature Request: Add command to copy the current statistics
- Feature request: Line count
- Feature Request: Print section word-count in PDF export
- stopped working HOT 2
- Suggestion for mobile: Create a command that can be added to ribbon using Commander
- Plugin doesn't update upon viewing a file in Reader View
- Section Word Count, less words.
- Follow developer guidelines for headings in plugin settings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from better-word-count.