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 very simple and lightweight ToDo app using python that can be used from the command line

A very simple and lightweight ToDo app using python that can be used from the command line

Nilesh Sengupta 2 Jul 20, 2022
Borderless-Window-Utility - Modifies window style to force most applications into a borderless windowed mode

Borderless-Window-Utility Modifies window style to force most applications into

8 Oct 22, 2022
A CLI tool to disable and enable security standards controls in AWS Security Hub

Security Hub Controls CLI A CLI tool to disable and enable security standards controls in AWS Security Hub. It is designed to work together with AWS S

AWS Samples 4 Nov 14, 2022
A simple command line chat app to communicate via the terminal.

A simple command line chat app to communicate via the terminal. I'm new to networking so sorry if some of my terminology or code is messed up.

PotNoodle 1 Oct 26, 2021
A webmining CLI tool & library for python.

minet is a webmining command line tool & library for python (= 3.6) that can be used to collect and extract data from a large variety of web sources

médialab Sciences Po 165 Dec 17, 2022
Program Command Line Interface (CLI) Sederhana: Pemesanan Nasi Goreng Hekel

Program ini merupakan aplikasi yang berjalan di dalam command line (terminal). Program ini menggunakan built-in library python yaitu argparse yang dapat menerima parameter saat program ini dijalankan

Habib Abdurrasyid 5 Nov 19, 2021
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 5.1k Jan 05, 2023
Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections.

code-connect Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections. Motivation VS Code supports opening

Christian Volkmann 56 Nov 19, 2022
Wordle breaker: A CLI tool to help you solve Wordle

Wordle Breaker A CLI tool to help you solve Wordle I decided to code a solution

Alex 4 Apr 27, 2022
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
EODAG is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a unified API for data access regardless of the data provider

EODAG (Earth Observation Data Access Gateway) is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a un

CS GROUP 205 Jan 03, 2023
Python package with library and CLI tool for analyzing SeaFlow data

Seaflowpy A Python package for SeaFlow flow cytometer data. Table of Contents Install Read EVT/OPP/VCT Files Command-line Interface Configuration Inte

<a href=[email protected]"> 3 Nov 03, 2021
Python CLI for accessing CSCI320 PDM Database

p320_14 Python CLI for accessing CSCI320 PDM Database Authors: Aidan Mellin Dan Skigen Jacob Auger Kyle Baptiste Before running the application for th

Aidan Mellin 1 Nov 23, 2021
Gamestonk Terminal is an awesome stock and crypto market terminal

Gamestonk Terminal is an awesome stock and crypto market terminal. A FOSS alternative to Bloomberg Terminal.

Gamestonk Terminal 18.6k Jan 03, 2023
🎄 Advent of Code command-line tool.

🎄 advent-cli advent-cli is a command-line tool for interacting with Advent of Code, specifically geared toward writing solutions in Python. It can be

Christian Ferguson 6 Dec 01, 2022
CLI/GUI Math commands based on python 3

PyMath Commands Syntax Installation Commands: pymath add: usage: pymath add 12.5 12.5 sub: usage: pymath sub 25 12.5 div: usage: pymath div 144 12 mul

eggsnham07 0 Nov 22, 2021
A simple discord slash command handler for for discord.py.

A simple discord slash command handler for discord.py About ⦿ Installation ⦿ Disclaimer ⦿ Examples ⦿ Documentation ⦿ Discussions Note that master bran

641 Jan 03, 2023
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 04, 2022
A python CLI app that converts a mp4 file into a gif with ASCII effect added.

Video2ASCIIgif This CLI app takes in a mp4 format video, converts it to a gif with ASCII effect applied. This also includes full control over: backgro

Sriram R 6 Dec 31, 2021
Simple CLI for managing Postgres databases in Flask.

Overview Simple CLI that provides the following commands: flask psql create flask psql init flask psql drop flask psql setup: create → init flask psql

Daniel Reeves 21 Oct 03, 2022