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)
Owner
null
Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications.

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments brought about by the failure to execute a CLI API. Simple to code, easy to learn, and does not come with needless baggage.

Secretum Inc. 16 Oct 15, 2022
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applications.

Trevor White 69 Oct 24, 2022
A CLI based task manager tool which helps you track your daily task and activity.

CLI based task manager tool This is the simple CLI tool can be helpful in increasing your productivity. More like your todolist. It uses Postgresql as

ritik 1 Jan 19, 2022
A new kind of Progress Bar, with real time throughput, eta and very cool animations!

A new kind of Progress Bar, with real time throughput, eta and very cool animations!

Rogério Sampaio de Almeida 4.1k Jan 8, 2023
Multifunctional library for creating progress bars.

?? Content Installation Using github Using pypi Quickstart Flags Useful links Documentation Pypi Changelog TODO Contributing FAQ Bar structure ⚙️ Inst

DenyS 27 Jan 1, 2023
Run an FFmpeg command and see the percentage progress and ETA.

Run an FFmpeg command and see the percentage progress and ETA.

null 25 Dec 22, 2022
A python package to display progress of loops to the user

ProgressBars A python package to display progress of loops to the user. Installation This package can be installed using pip. pip install progressbars

Matthias 3 Jan 16, 2022
A simple file transfer tools, similar to rz / sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar

trzsz A simple file transfer tools, similar to rz/sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar. Why

null 561 Jan 5, 2023
Loading animation; a progress bar

Loading animation; a progress bar. When you know the remaining time or task completion percentage, then you’re able to show an animated progress bar:

Goldy 1 Jan 23, 2022
🏃 Python3 Solutions of All Problems in GCJ 2022 (In Progress)

GoogleCodeJam 2022 Python3 solutions of Google Code Jam 2022. Solution begins with * means it will get TLE in the largest data set. Total computation

kamyu 12 Dec 20, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 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

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
CLI program that allows you to change your Alacritty config with one command without editing the config file.

Pycritty Change your alacritty config on the fly! Installation: pip install pycritty By default, only the program itself will be installed, but you ca

Antonio Sarosi 184 Jan 7, 2023