Giter Club home page Giter Club logo

better-word-count's People

Contributors

bakuzan avatar chrisgrieser avatar davisriedel avatar leoccyao avatar lukeleppan avatar mgmeyers avatar minermaniac447 avatar noxellar avatar nullcub3 avatar simondoesstuff avatar thek3nger avatar turnage avatar yukigasai avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

better-word-count's Issues

Bug - Can't find global file /word count

I can no longer find the global (vault-wide) file and word count, even when in graph view. I'm on the latest version of the plugin (0.8.1) and latest version of obsidian (0.14.15)

Failure to load resource

For some reason, I kept getting this error when I update your plugin.

Failed to load resource: the server responded with a status of 404 ()

I then uninstalled the plugin and tried reinstalling, then I received this error

Better Word Count: styles.css not found

This is definitely a non-issue but I just thought I'd let you know 😊

Screen Shot 2021-07-17 at 11 07 43 AM

Global Stats Missing?

The plugin says it offers stats for the entire vault but I've never seen those and have no idea where to find that data. When I close out a page and have no file open it doesn't show any stats at all.

How to view day's word count in a daily note?

Is it currently possible to view the day's word count inside a note rather than in the status bar only? For example, I'd like to have a section on each daily note which displays the words written that day, and then be able to look back on different day's notes and see the various word counts for each day.

Bug: Apostrophe issue not resolved?

Thanks for the plugin! I use it for the overall word count and the word count in the selected text. But I noticed that words with apostrophes continue to count as two words instead of one. They have fixed this problem in the core plugin. It would be great if you could fix it too. Thanks.

[Feature]: better characters per day option

It would be nice if the counting of characters written per day was not for all files, but for each one separately. To understand how much I wrote in a particular file.

Perhaps add the ability to include / exclude a list of files. Is it realizable?

[Feature Request] Exclude folders from total files, words, characters stats

Hi @lukeleppan,
I really like your plugin that's why I have a feature request. Let me know if you need more info.

Suggested Addition

A setting where you can specify folders that should be excluded from the statistics. This could be implemented with a comma separated list of paths.
E.g.: path/to/folder1, path/to/folder2 -> Excluding folders folder1 and folder2 at path/to

Use case

A user might have a folder with notes which were not written by the user. The notes purpose could be to reference them with links in other notes. An example would be to have the whole bible imported as markdown files to reference them when doing bible studies.

To get accurate statistics these reference notes should be excluded.

Feature request: ignore comment

Obsidian allows comments.

Under normal circumstances, I don't want to count these in my word count. Just as formatting is not counted either; ## does not count as a word. Strange that --- is counted, also in Obsidian.

Would be nice to have this as a setting:

  • count or ignore comments
  • count or ignore MD stuff
  • count or ignore yaml

Feature request: Line count

It's really useful especially when working with list items to get a quick count of the number of items by selecting them.

Feature request: Count only text shown in preview

Now if you use a link like this text what is counted is everything including brackets and the link in the brackets itself. It would be really useful, if there was an option to show only the count of characters of "text", since only it is shown in preview.

Update fails to install

In Obsidian 0.9.13 when I try to update the plugin from the community plugin page from version 0.3.0 to 0.3.2 it fails to update.

Looking at the console, clicking on update throws a 404 error, it doesn't find manifest.json.

In your releases on Github the newest version is 0.3.1

[Feature Request] Custom word/[*]-counting algorithm

Custom counting algorithm

Intro

There is a whole world of word-counting algorithms! Particularly I'm interested in the one from 750Words because I import my ... words... words... from there into my dailies, and would like the word-count to match. I could, however, imagine that others have their own varied word-counting-wishes. To that end...

Suggestion

Create a settings page for the plugin with a blank text area. Allow a javascript function in that text area to serve as a customised algorithm for displaying word-counts. Possibly add a list of common variants to pre-fill.

Function Specification:

Inputs:

  • The text, sanitised / stripped of formatting
  • The text, raw markdown
  • Just the selected text, sanitised / stripped of formatting
  • Just the selected text, raw markdown
  • The start offset of selection
  • The end offset of selection
  • The start line/pos of selection
  • The end line/pos of selection

Output: Object containing any one or more of the following:

  • word count
  • character count
  • line count
  • letter count
  • digit count
  • link count
  • [something else] count

OR just a plain integer representing the word-count for super simple variants.

Conclusion

With this, the user can supply whatever count-information they want for the selected text, and have it show up in the status bar!

Also suggest adding an easter-egg where if someone outputs an object containing 'countDracula' it shows it with a bat or vampire emoji 😝

Better Word Count not working in legacy editor

Hello, using version 0.13.23 and better word count stopped working. I've tried switching to the Legacy Editor but it still isn't working. Is there any other way or can I no longer use better word count? Thanks!

Feature request: Word count of current block

My most frequent action is to select a block (paragraph) to asses what its word count is. I'd like to see an option that displays two word counts side by side in the status bar:

  1. The current line word count OR selected text word count
  2. The total word count

Not working with multiple files open in preview

Using version 0.7.7
Default general & status bar settings
Obsidian v.0.12.11

When I have multiple files open in preview, the status bar word & character counts do not update when I change focus from one pane to another.

High CPU usage

Hi! Coincidentally I just updated to Better Word Count 0.7.2 (I think I was on 0.6.1 before) and I noticed that CPU usage spiked and remained between 100% or 300%; normally, CPU usage is no higher than 50%. The issue goes away when I disable the plugin, so I imagine the problem must have something to do with the latest version.

Alternative status bar text

It's more of a question than an issue, but I don't see the "alternative status bar" showing. Or I should say, I don't know when and where it is supposed to show the alternative version. On clicking or hovering the status bar text, nothing happens for me.

Cannot get plugin to work

I am on 013.12 (installer 0.12.19). with BWC loaded and enabled (Obs core word count turned off) but nothing of BWC is showing up in the status bar. I have checked this with the help vault, and a vanilla test vault.

Feature request: Also count number of sentences (sentence count)

I'm wondering if this feature request is doable. Would it be possible to also show the number of sentences present in a note as well as the number of sentences present under text selection? I've seen from the Extract Highlights plugin that you could use a hotkey to highlight a sentence without selecting, so I guess that means it's possible to detect sentences in text and thus be able to have a sentence count as well. Hope you'd consider this request, thanks :)

Flickering

The word count text does a flickering effect depending on the number of notes I've opened since running Obsidian. It flashes between the different word counts for the notes I've been opening.

ezgif com-gif-maker

Have wanted this feature in Obsidian in a while and am glad there's finally an option, so thank you for making it! Hoping for further improvement :)

Status bar templates showing incorrect results

I'm using 0.7.3.

When I have no files open, or I've got a non markdown pane (eg a graph view or image or PDF), in the past the plugin would show me the total files and words across my vault.

Now it shows me files files total_words words total_characters characters in the status bar. The 'alternative status bar text' template string in the settings is the default and has {} in the right places. When I have a markdown file open the word count is correct

Feature Request: Custom Reading/Speaking Time

It would be great if I could enter my personal speaking time, say 100 words per minute and then the selected text shows the amount of time (4m 27s) I would need for that in a speech.

Won't load after update

I just updated the plugin, since I saw you had a new commit (release?) 3434a4f

But now the plugin won't load at all, and get the error Failed to load Plugin and this is in the console:
image

I'm on Linux Mint, Obsidian v0.13.23 (Installer v0.12.15)

Thanks :)

Feature request: Word count for all notes in the containing folder

Hello! Thanks for the plugin. I'm using folders to organize notes that will eventually be stitched together into very very long files, probably in software outside Obsidian. As such, I'm interested in knowing the number of words in all files in a given folder (plus the various associated stats, e.g. count deltas on those folders, etc.).

Is such an addition possible?

Does this work on iOS/iPad OS?

I don’t know where to find the word count on the iOS/iPad OS version of Obsidian. There doesn't seem to be a status bar and better word count doesn't show up in the right slidebar (where the core word count plugin shows up).
Is there some settings I need to change?

bug: no longer counts words?

I am not sure if this is related to live preview, but the plugin no longer seems to count words in a file or selected:
here are my settings

files: {file_count} | wds: {word_count} | chs: {character_count} | tchs: chs: {total_character_count}

image

Feature Request: Countable Blocks

Often I want to find the word count of a specific section of a document. i.e. if I'm planning out word restricted questions in obsidian. This plugin really helps as you can highlight the words you want to submit but unfortunately this includes highlighting the whole section every time. Would it be possible to implement some functionality where you could put some markers at the start and end of a section and at the end of that section it would display the word count below the block in the preview section? This could be in the status bar or shown in preview mode. This would allow you to keep track of word count whilst you edit that specific section. Thank you!

[BUG] Error Occurs on Chinese Word Counting

I have near 34 words in a note, and Obsidian word counts works well, however, better word count only counts it to 4

image

And here is what I wrote in it, you can use it to test if you want.

测试
测试
测试
测试
测试
测试
测试我的测试,这是我的测试,这是我的测试

Markdown-oriented word counts?

My documents often have a fair bit of markdown, which is currently increasing my word-count by a good amount, even though it's not displayed, such as dash-bullets. Would it be possible to allow only considering words to be non-spaced-character strings with at least one alpha-numeric character?
Thanks for your work on this!

Word count inaccurate for longer documents

I haven't been able to pinpoint any particular reason this is happening, but I'm finding that this plugin is generally over-counting by a few percent in the total word count.

For example, a document listed at 6,959 words with your plugin is only 6,812 in other editors. One that is 14,817 words in Obsidian is only 14,220 in other editors.

This is an issue for me, since I write fiction which is usually targeted at specific word limits. I worked really hard to get that 6,959 word story under 7,000 words, only to discover that I could have kept about 200 words more than I ended up cutting, since the actual count was really 6,812.

I'm happy to share one of the documents in question, if that will help with troubleshooting.

Wordcount Inaccurate for Preview

If I embed a bunch of prose files into one file and then try to look at the preview, the wordcount will show as something tiny like 27 words even though there are several thousand words actually on the screen. Is it possible to fix this so that the wordcount is accurate for preview instead of pulling only from the raw markdown on edit view?

Perf: Use `vault.cachedRead` instead of `read`

Hi, I noticed a couple of issues in regards to performance in your plugin. Hope you don't mind!

  • if ((file.basename = activeLeaf.getDisplayText())) { This should probably be ===.
  • You're using vault.cachedRead in some spots, but not everywhere.
  • The default wordcount plugin uses a background worker to calculate the word count. You might want to consider doing the same to avoid any performance lockups.
  • Maybe instead of trigger an update every 500ms, just listen to the vault modify event?

semi space seprate character

Thanks for the plugin.
It counts semi space as a seprate character in right to left languages.
Example:

می‌باشد: is a one word in persian. but the pluging counts it as two word. It's beacause of semi space between می and باشد.

Better Word Count Not Working in Live Preview

Better Word Count Not Working in Live Preview

Steps to Reproduce:

Download the latest build of obsidian, turn off safe mode then download and enable Better Word Count, enable live preview, and make a file. Better word count won't count the words in the file.

Resource intensivity

Got a few reports on this plugin consuming CPU cycles (similar to #14 )

A quick investigation leads to these few lines:

const files = this.vault.getFiles();

I believe you need to filter for file.extension === 'md', or otherwise you'll be reading every single file into memory, including attachments and unsupported files.

Same for getTotalCharacterCount and getTotalSentenceCount.

Total word count not always showing

Hey, I have the issue that the total word count is not showing up when I'm in a normal Markdown note (then it just says "0" as the count). It does however show up when I'm not on a Markdown file, e.g. a Kanban board or a PDF, and the alternative status bar us used.

I have the following settings:

Status Bar Text:
{word_count} words · {total_word_count} total · {file_count} notes

Alternative Status Bar Text:
{total_word_count} total · {file_count} notes

I deactivated "collect statistics" and activated "Don't count comments".

This is my .vault-stats file:

{"2021-08-16":{"files":301,"modifiedFiles":{},"words":0,"characters":0,"sentences":0,"totalWords":61421,"totalCharacters":443368,"totalSentences":2843},"2021-08-17":{"files":301,"modifiedFiles":{},"words":0,"characters":0,"sentences":0,"totalWords":61325,"totalCharacters":442553,"totalSentences":2838},"2021-08-18":{"files":0,"modifiedFiles":{},"words":0,"characters":0,"sentences":0,"totalWords":0,"totalCharacters":0,"totalSentences":0},"2021-08-19":{"files":0,"modifiedFiles":{},"words":0,"characters":0,"sentences":0,"totalWords":0,"totalCharacters":0,"totalSentences":0},"2021-08-20":{"files":0,"modifiedFiles":{},"words":0,"characters":0,"sentences":0,"totalWords":0,"totalCharacters":0,"totalSentences":0},"2021-08-21":{"files":0,"modifiedFiles":{},"words":0,"characters":0,"sentences":0,"totalWords":0,"totalCharacters":0,"totalSentences":0}}

[Feature Request] Ignore word count in the links

Hi thank you for creating this helpful plugin, I am still using this for counting how many words I have in my notes.

I noticed the plugin counts all the links as words as well, would it be possible for it to ignore the words from the links in the next update?

thank you very much for the plugin!
-Jethoof

Heat map to view statics

it would be amazing to have different points of view for statistics. I would like to have a heatmap type view.

Word/character count showing up double

It seems that for me the word and character count is showing up twice. Once from the plug-in, once from Obsidian itself. I can't figure out how to turn it off for Obsidian, or if that's even possible.

Any ideas?
Thanks!

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.