-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Script Word Count Feature #141
Comments
In the new-syntax branch I build a tokenizer that can be used to count tokens, so should be very easy to implement a word counter there. I do wonder what would be the purpose of this and if this would be something others could benefit from. If me or @LuqueDaniel see a good purpose, we would be more then happy to accept your suggestion. Thanks for the interest in helping us improve the plugin. |
I tend to write out a lotta my scenes right into Ren'Py, and since I use quite a few one-off ATL animations combined with large amounts of 2-4 arg layeredimage names it's hard to get an accurate word count on a per-script basis with existing tools. I figured maybe others had this problem but maybe I just do things weird. Edit: Example of what I mean, for one of my scenes the word count for just dialog is 695, whereas when you check the word count on the script with all the additional coding you get 2240. |
Ah I see, so what you're saying is you would like to know specifically, the dialog word count? I can see a use for that, if we make a tiny status bar field like the Ln x, Col x and Spaces: x. @LuqueDaniel What do you think? FYI: If you do start working on this, let me know if you come across any issues using the tokenizer. Currently the tokens are placed in a one D array (sorted by start index), but I was thinking it might be better to group the tokens in a node graph. That would be a lot easier when trying to figure out what token goes where. |
@JelleInfinity I was just typing my reply and your last comment popped up 😂 . You have said almost everything I was going to comment on. I agree with the way to implement it, a counter in the status bar and make it a feature that can be disabled through settings (there will be users who don't want to have more labels in the status bar). I think it could be useful. If someone wants to implement it, go ahead. But first I would like to merge the PR #76 . |
Was wondering if there was any interest in adding something like other VSCode word counter extensions but specifically for Ren'Py scripts, since the more general ones count keywords, character names, etc., and Ren'Py linting only counts the project total (AFAIK). I'm willing to do it, but since I'm not personally familiar with TypeScript or extension development I wanna make sure it's feasible/desired before I start investing the time into it.
The text was updated successfully, but these errors were encountered: