Squirrel - A cli program to track writing progress

Overview

squirrel-output

Squirrel

Very much a WIP project

squirrel is a command line program that tracks you writing progress and gives you useful information and cute and pictures of squirrels.

How it works

Squirrel's design was inspired by git's design (from a user perspective at least). To start a project, you have to initialize a new project in your directory of choice which will create a .squirrel folder structure in your directory similar to .git directories. And that folder will hold information about the project in general and the word counts. However squirrel is not a static program otherwise we wouldn't be able to track progress without explicit input of the user. That's why we need to have a watch command that will listen to any changes and update the appropriate information.

Plugins or Project Types

As many writing project use many file formats and programs, squirrel has a plugin architecture to have many ways to count words. Which plugin will used depends on the project-type field. Here are the plugins available now:

  • text

hmm, haven't found your project type? you can write Python code? Please make a pull request :)

Installation

Users

Coming soon

Devs

Grab the repo, install dependencies, and voila.

git clone https://github.com/squirrel-writer/squirrel
cd squirrel
pipenv install && pipenv shell
python -m squirrel init

Usage

There 4 main verbs to interact with squirrel:

  • init
  • watch
  • set
  • overview

You can about their options with -h or --help option. (e.g squirrel init -h, etc.)

Init

squirrel init -n Assay --project-type text

Set

Set can be used after init to change or set fields.

squirrel set --name "English Assay" --goal 10000 -due 05/01/2022

Watch

Run this command to tell squirrel to watch your writing.

squirrel watch start --daemon
squirrel watch status
squirrel watch stop
Comments
  • Watchdog

    Watchdog

    closes #3

    Check if it's something that can be used. It works on my machine I have made WatchDog check for *.txt files in this version, but as you can see in the comment I have an idea about reading the file types from project xml.

    enhancement compatibility 
    opened by h-leth 35
  • Added python3.8 support

    Added python3.8 support

    #12

    First contribution to a project, thought I would take a swing at this one. Took indent() from 3.9 and created its own function so 3.8 would pass.

    Tox is passing with 3.8, 3.9, and 3.10:

    Untitled

    enhancement python-versions 
    opened by Bchass 8
  • New Plugin Manager implementation

    New Plugin Manager implementation

    The motivation of this PR is to improve the way we import plugins so that we are able to handle plugins that use third party modules correctly (e.g verify that the modules are available if not display a useful message to the user).

    ̶W̶i̶t̶h̶ ̶t̶h̶i̶s̶ ̶P̶R̶,̶ ̶t̶h̶e̶ ̶p̶l̶u̶g̶i̶n̶ ̶m̶a̶n̶a̶g̶e̶r̶ ̶w̶i̶l̶l̶ ̶e̶x̶p̶e̶c̶t̶ ̶p̶l̶u̶g̶i̶n̶s̶ ̶t̶o̶ ̶h̶a̶v̶e̶ ̶a̶ ̶̶P̶l̶u̶g̶i̶n̶̶ ̶c̶l̶a̶s̶s̶.̶ ̶T̶h̶e̶ ̶p̶l̶u̶g̶i̶n̶ ̶c̶l̶a̶s̶s̶ ̶w̶i̶l̶l̶ ̶a̶l̶s̶o̶ ̶p̶r̶o̶v̶i̶d̶e̶ ̶u̶s̶e̶f̶u̶l̶ ̶i̶n̶f̶o̶r̶m̶a̶t̶i̶o̶n̶ ̶a̶b̶o̶u̶t̶ ̶t̶h̶e̶ ̶p̶l̶u̶g̶i̶n̶ ̶(̶n̶a̶m̶e̶,̶ ̶d̶e̶s̶c̶r̶i̶p̶t̶i̶o̶n̶,̶ ̶e̶t̶c̶)̶.̶ ̶̶̶̶P̶y̶t̶h̶o̶n̶ ̶c̶l̶a̶s̶s̶ ̶P̶l̶u̶g̶i̶n̶:̶ ̶ ̶ ̶n̶a̶m̶e̶ ̶=̶ ̶.̶.̶.̶ ̶ ̶ ̶d̶e̶s̶c̶r̶i̶p̶t̶i̶o̶n̶ ̶=̶ ̶.̶.̶.̶ ̶ ̶ ̶r̶e̶q̶u̶i̶r̶e̶s̶ ̶=̶ ̶(̶ ̶'̶a̶n̶y̶ ̶n̶o̶n̶ ̶b̶u̶i̶l̶t̶i̶n̶ ̶p̶l̶u̶g̶i̶n̶'̶,̶ ̶)̶ ̶ ̶ ̶ ̶d̶e̶f̶ ̶g̶e̶t̶_̶c̶o̶u̶n̶t̶(̶f̶i̶l̶e̶s̶)̶ ̶-̶>̶ ̶i̶n̶t̶:̶ ̶ ̶ ̶ ̶ ̶ ̶.̶.̶.̶ ̶̶̶̶ ̶A̶n̶y̶ ̶m̶o̶d̶u̶l̶e̶ ̶t̶h̶a̶t̶ ̶i̶s̶ ̶d̶e̶c̶l̶a̶r̶e̶d̶ ̶i̶n̶ ̶̶r̶e̶q̶u̶i̶r̶e̶s̶̶ ̶w̶i̶l̶l̶ ̶b̶e̶ ̶l̶o̶a̶d̶ ̶g̶l̶o̶b̶a̶l̶l̶y̶ ̶a̶n̶d̶ ̶w̶i̶l̶l̶ ̶b̶e̶ ̶a̶v̶a̶i̶l̶a̶b̶l̶e̶ ̶t̶o̶ ̶̶g̶e̶t̶_̶c̶o̶u̶n̶t̶̶.̶ ̶A̶ ̶m̶o̶r̶e̶ ̶e̶x̶t̶e̶n̶s̶i̶v̶e̶ ̶e̶x̶a̶m̶p̶l̶e̶ ̶c̶a̶n̶ ̶b̶e̶ ̶f̶o̶u̶n̶d̶ ̶i̶n̶ ̶̶p̶l̶u̶g̶i̶n̶_̶e̶x̶a̶m̶p̶l̶e̶.̶p̶y̶̶.̶

    New changes

    Plugins will have to include a .yaml config file that has all the metadata about the plugin (name, descriptions, etc) as well as any dependencies that are needed (there is a distinction between pip and system deps). Additionally, plugins will now be put in their own directories inside squirrel/plugins.

    As before, .py modules of plugins will contain the get_count function.

    Example

    name: example
    authors:
      - squirrel,<[email protected]>
    description: description of the example plugin
    version: 0.0.0
    deps:
      sys:
        - command
      pip:
        - python_package
    

    I̶'̶m̶ ̶t̶a̶g̶g̶i̶n̶g̶ ̶t̶h̶i̶s̶ ̶a̶s̶ ̶a̶ ̶d̶r̶a̶f̶t̶ so any suggestions are very welcomed :)

    enhancement Plugins 
    opened by zeddo123 7
  • Squirrel artist credit

    Squirrel artist credit

    I found the original artist for the squirrel art that is displayed when you run squirrel overview: Joan G. Stark.

    She's known in the ASCII world with the initials jgs.

    Resources:

    • http://www.ascii-art.de/ascii/s/squirrel.txt
    • http://www.ascii-art.de/ascii/uvw/who_is_who.txt

    Her website is no longer active, but an archived link exists on the wiki.

    opened by Bchass 5
  • Support for python3.8

    Support for python3.8

    After some issue I had with tox and multiple versions of pythons, it turns out squirrel is not compatible with python3.8 due to:

    AttributeError: module 'xml.etree.ElementTree' has no attribute 'indent'
    

    I will be dropping support of python3.8 until we find a replacement for indent.

    good first issue help wanted python-versions 
    opened by zeddo123 4
  • Fixed indent function

    Fixed indent function

    Updated indent function, it's working correctly outside the project when tested against a tree and inside the project. Drafting the PR until we can confirm it's working correctly with someone else.

    bug 
    opened by Bchass 3
  • Fixed format error and some spelling

    Fixed format error and some spelling

    When trying to use the squirrel overview command, I used to get the following error: ValueError: Cannot specify ',' with 's'. I fixed that bug, corrected some spelling and added some consistency to the command help texts.

    bug Typo/formatting 
    opened by gasupidupi 1
  • Squirrel artist credit

    Squirrel artist credit

    Added the artist's initials for var.py and upaded squirrel_art to a raw string.

    Normally with tox it would throw: DeprecationWarning: invalid escape sequence '\ ' squirrel_art = """

    Closed #26 by accident when I removed the commit from the PR.

    documentation enhancement Typo/formatting 
    opened by Bchass 1
  • Wrong dependency check in the PluginManager

    Wrong dependency check in the PluginManager

    https://github.com/squirrel-writer/squirrel/blob/f2a93cbcde9b570acecd535b156c635cebd33e47/squirrel/plugin.py#L95-L99

    - if not pip_satisfied:
    + if not sys_satisfied:
    

    Checks for wrong dependency

    bug 
    opened by h-leth 1
  • typo in README.md

    typo in README.md

    I think you've got a typo in overview.py in line 44: https://github.com/squirrel-writer/squirrel/blob/35c7823b3f0472367056c490b3463105c61bdc44/squirrel/commands/overview.py#L44 probably should be "Due Date" insted of "Due Data". saw it in this image, in the README.md file

    good first issue Typo/formatting 
    opened by TzviGreenfeld 1
  • INotify not working on osx

    INotify not working on osx

    Seems Inotify doesn´t work with osx. So the watch daemon doesn't work on my machine. Trying to rewrite the code to make it work with watchdog

    Should be working with Linux, FreeBSD and Windows too

    If I make it work I'll make a pull requests and you can implement it if you want. It's a learning project for me, so not sure if I'll manage to make it work.

    enhancement help wanted compatibility 
    opened by h-leth 1
  • py versions fail with tox

    py versions fail with tox

    Error:

    I was exploring with python 3.11.0 to see what would break when running tests. I noticed:

    py39: failed with /bin/sh (resolves to /bin/sh) is not allowed, use allowlist_externals to allow it

    Solution:

    A quick update to tox.ini and adding in allowlist_externals fixes the issue. tox passes successfully for all current supported versions.

    opened by Bchass 0
  • Add spell checking and code formatting to github actions

    Add spell checking and code formatting to github actions

    We should probably add spell checking as well as code formatting (I usually use autopep8 because it's not opinionated a lot) to maintain quality and catch any spelling error. I don't have a strong opinion on the spell checker, but codespell is good option.

    good first issue Github Actions 
    opened by zeddo123 0
  • Using multiple plugins depending on the file types

    Using multiple plugins depending on the file types

    Use case example

    If a user was writing in both markdown and latex (for some reason), it would be much better to a plugin texcount and a markdown one working together instead to having to write a texcount-markdown plugin

    Implementation

    This is just from the top of my head, so very open to suggestions.

    We could allow plugins to declare which files they would like to use, so when the user uses markdown and texcount we know which one will handle which file. And if the user only specifies one plugin we would pass all the files to the plugin?

    enhancement help wanted question Plugins 
    opened by zeddo123 0
  • Create a word document plugin

    Create a word document plugin

    Many people would benefit from having a word document plugin added to squirrel to track their progress on word documents. Implementation wise, we could use python-docx for parsing the text inside the documents.

    enhancement good first issue Plugins priority:medium 
    opened by zeddo123 0
Releases(v0.0.4)
  • v0.0.4(Mar 13, 2022)

    Squirrel v0.0.4

    This new version of squirrel bring a host of features and big fixes. The most notable one is the introduction of a new PluginManager that provides a way to handle dependencies for plugins.

    What's Changed

    New Features

    • Added GH Action to test using tox by @RishiKumarRay in https://github.com/squirrel-writer/squirrel/pull/11
    • support for python 3.8 (fixed) by @Bchass in https://github.com/squirrel-writer/squirrel/pull/15
    • New Plugin Manager implementation by @zeddo123 in https://github.com/squirrel-writer/squirrel/pull/9
    • Add PEP8 Linting to GitHub action by @h-leth in https://github.com/squirrel-writer/squirrel/pull/20
    • General command to retrieve data in a raw format by @zeddo123 in https://github.com/squirrel-writer/squirrel/pull/25
    • Squirrel artist credit by @Bchass in https://github.com/squirrel-writer/squirrel/pull/27
    • Accept and output any date format passed as input by @zeddo123 in https://github.com/squirrel-writer/squirrel/pull/29
    • Improved output formatting of number
    • Add --delay to the watch command
    • Performace improvement to watch command.

    Bug fixes

    • Indent function fixed by @Bchass in https://github.com/squirrel-writer/squirrel/pull/23
    • Typo by @Bchass in https://github.com/squirrel-writer/squirrel/pull/24
    • fixed typo in line 44 by @TzviGreenfeld in https://github.com/squirrel-writer/squirrel/pull/18
    • fixed today count in overview command
    • Fix bug: use pkgutil to load plugin config files

    New Contributors

    • @RishiKumarRay made their first contribution in https://github.com/squirrel-writer/squirrel/pull/11
    • @Bchass made their first contribution in https://github.com/squirrel-writer/squirrel/pull/15
    • @TzviGreenfeld made their first contribution in https://github.com/squirrel-writer/squirrel/pull/18

    Full Changelog: https://github.com/squirrel-writer/squirrel/compare/v0.0.3...v0.0.4

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(Feb 1, 2022)

    Squirrel v0.0.3

    This new version brings multiple bug fixes as well a new feature to ignore files

    .squirrelignore Thanks to @h-leth for his work, we now have the ability to ignore files inside squirrel projects.

    Source code(tar.gz)
    Source code(zip)
A Hikari command handler for people who love ducks.

duckari A Hikari command handler made with love by ducks. Currently Duckari is work in progress. Documentation is WIP. The wiki is no longer used as d

2 Oct 09, 2022
The most comprehensive, exhaustive, parameterized command-line wordle solver.

Wordle Solver The most comprehensive, exhaustive, parameterized command-line wordle solver. Wordle is a real

Debarghya Das 27 Nov 21, 2022
Display Images in your terminal with python

A python library to display images in the terminal

Pranav Baburaj 57 Dec 30, 2022
A simple and easy-to-use CLI parse tool.

A simple and easy-to-use CLI parse tool.

AbsentM 1 Mar 04, 2022
Rdwcli - Car list cli app with python

Rdwcli - Car list cli app with python

Arie Twigt 1 Feb 02, 2022
Random scripts and other bits for interacting with the SpaceX Starlink user terminal hardware

starlink-grpc-tools This repository has a handful of tools for interacting with the gRPC service implemented on the Starlink user terminal (AKA "the d

270 Dec 29, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

14 Sep 11, 2022
QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Quera is an Iranian Learning management system (LMS) that has an online judge for programming languages. Some Iranian universities use it to automate the evaluation of programming assignments.

Amirmahdi Namjoo 16 Nov 11, 2022
Simple and convenient console ToDo list app

How do you handle remembering all that loads of plans you are going to realize everyday? Producing tons of paper notes, plastered all over the house?

3 Aug 03, 2022
Wordle-cli - Command-line clone of Josh Wardle's WORDLE

Command-line clone of Josh Wardle's WORDLE, inspired by Paul Battley's Ruby vers

Klipspringer 32 Jan 03, 2023
Centauro - a command line tool with some network management functionality

Centauro Ferramenta de rede O Centauro é uma ferramenta de linha de comando com

1 Jan 01, 2022
👻 Ghoul is an easy to use information service, allowing you to get/add information on someone or something directly from your terminal.

👻 Ghoul is an easy to use information service, allowing you to get/add information on someone or something directly from your terminal. It c

Billy 11 Nov 10, 2021
A stupidly simple task list to keep you productive and focused.

StupidlySimple-TaskList A stupidly simple task list to keep you productive and focused. There is really nothing to it. This is a terminal-based script

Jack Soderstrom 1 Nov 28, 2021
pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget

Currently, all the work is being done inside the refactoring branch. pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget P

Everton Correia 45 Dec 11, 2022
cmdpxl: a totally practical command-line image editor

cmdpxl: a totally practical command-line image editor

Jieruei Chang 476 Jan 07, 2023
A tool to manage the study of courses at the university.

todo-cli A tool to manage the study of courses at the university

Quentin 6 Aug 01, 2022
Play videos in the terminal.

Termvideo Play videos in the terminal (stdout). python main.py /path/to/video.mp4 Terminal size: -x output_width, -y output_height. Default autodetect

Patrick 11 Jun 13, 2022
Command-line tool for looking up colors and palettes.

Colorpedia Colorpedia is a command-line tool for looking up colors, shades and palettes. Supported color models: HEX, RGB, HSL, HSV, CMYK. Requirement

Joohwan Oh 282 Dec 27, 2022
A lightweight Python module and command-line tool for generating NATO APP-6(D) compliant military symbols from both ID codes and natural language names

Python military symbols This is a lightweight Python module, including a command-line script, to generate NATO APP-6(D) compliant military symbol icon

Nick Royer 5 Dec 27, 2022
Present - A terminal-based presentation tool with colors and effects.

present A terminal-based presentation tool with colors and effects. You can also play a codio (pre-recorded code block) on a slide. present is built o

Vinayak Mehta 4.2k Jan 03, 2023