Skip to content

SSoggy-Group/Character-Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

character counter

a cool python script and desktop utility to count characters, words, sentences, lines, paragraphs, and estimated pages. features a rich, multi-tab tkinter gui with advanced text metrics and full cli support.

features

1. advanced text metrics

  • readability indices: flesch reading ease & flesch-kincaid grade level with educational grade interpretations.
  • speech & timing estimates: reading time (at 200 wpm) and speaking time (at 130 wpm) formatted nicely.
  • keyword density analysis: lists top 5 content-bearing keywords (excluding common english stopwords).
  • character frequency distribution: tracks the most frequently used alphanumeric characters.

2. redesigned gui (tkinter)

  • multi-tab notebook layout:
    • overview: standard grid of layout cards showing basic counts and page estimations.
    • readability & timing: detailed cards for reading ease levels and verbal/silent time tracking.
    • keywords: lists the top keywords side-by-side with a dynamic, custom canvas-drawn density bar chart.
    • character frequency: displays top characters side-by-side with a dynamic frequency bar chart.
  • dark mode toggle: instantly switch between high-contrast light and low-strain dark themes.
  • text formatting toolbar: selection-aware uppercase, lowercase, title case, sentence case, and whitespace cleaning converters.

3. command-line interface

  • json formatting: output all metrics as structured json using --json or -j.
  • specific metric filtering: filter output to print only words, characters, readability, or sentences.
  • regex querying: search for and count custom strings or regular expressions via --query / -q.

installation

you can easily install the app via pip:

pip install character-counter-maaren

(you may need to use pipx or a virtual environment depending on your system)

alternatively, you can download the source files directly from github releases.


usage

once installed, the charcount command will be available globally in your terminal.

gui mode

run the command with no arguments to open the gui:

charcount

cli mode

the tool will automatically run in the terminal if you pass a file or use the --cli or -c flags:

charcount --cli

examples:

  • analyze a file:
    charcount path/to/file.txt
  • pipe text directly:
    echo "some text to analyze" | charcount
  • get json output:
    charcount --json path/to/file.txt
  • extract only specific metrics (e.g. words & lines):
    charcount --words --lines path/to/file.txt
  • count regex pattern occurrences:
    charcount --query "[a-z]+ing" --regex path/to/file.txt

requirements

  • python 3
  • tkinter (built-in)
  • collections, json, math, re, argparse (built-in standard library)

About

I know there are probably a lot of these out there I just wanted to share it because its my first ever python script

Resources

License

Stars

Watchers

Forks

Contributors

Languages