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 web shell client written in python.

Webshell client A webshell client written in python. Only works well for linux for the time being. Why? Because there are too many heavy webshells. So

tchar 1 Dec 07, 2021
Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries

Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries. It automates the boring stu

Yash Bhardwaj 3 Sep 27, 2022
A Python-based Wordle solver and CLI player

Wordle A Python-based Wordle solver and CLI player This was created using Python 3.9.7. SPOILER ALERT: the data directory contains spoilers for upcomi

Will Fitzgerald 1 Jul 24, 2022
Create animated ASCII-art for the command line almost instantly!

clippy Create and play colored 🟥 🟩 🟦 or colorless ⬛️ ⬜️ animated, or static, ASCII-art in the command line! clippy can help if you are wanting to;

Connor 10 Jun 26, 2022
Features terminal for python

Features Terminal V1.0 (23/10/2021) Um programa para linux com diferentes ferramentas! Recursos: Criador de QR code Gerador de senhas Teste de velocid

1 Oct 26, 2021
This is the public repo for the VS Code Extension AT&T i386/IA32 UIUC-ECE391 Syntax Highlighting

AT&T i386 IA32 UIUC ECE391 GCC Highlighter & Snippet & Linter This is the VS Code Extension for UIUC ECE 391, MIT 6.828, and all other AT&T-based i386

Jackgetup 1 Feb 05, 2022
Get Air Quality Index for your city/country 😷

Air Quality Index CLI Get Air Quality index for your City. Installation $ pip install air-quality-cli Contents Air Quality Index CLI Installation Cont

Yankee 40 Oct 21, 2022
The WalletsNet CLI helps you connect to WalletsNet

WalletsNet CLI The WalletsNet CLI helps you connect to WalletsNet. With the CLI, you can: Trigger webhook events or resend events for easy testing Tai

WalletsClub 8 Dec 22, 2021
👻 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
Play WORDLE game in your terminal.

Wordle TUI Play WORDLE game in your terminal. The game will be kept the same as the Web version. Prerequisites Python 3.7+ Linux/MacOS (Windows is not

Frost Ming 61 Oct 30, 2022
A 3D engine powered by ASCII art

3D engine powered by ASCII art

Lingdong Huang 48 Nov 16, 2022
A CLI tools to get you started on any project in any language

Any Template A faster easier to Quick start any programming project. Installation pip3 install any-template Features No third party dependencies. Tem

Adwaith Rajesh 2 Jan 11, 2022
nbcommands bring the goodness of Unix commands to Jupyter notebooks.

nbcommands nbcommands bring the goodness of Unix commands to Jupyter notebooks. Installation You can simply use pip to install nbcommands: $ pip insta

Vinayak Mehta 181 Dec 23, 2022
instant coding answers via the command line

howdoi instant coding answers via the command line Sherlock, your neighborhood command-line sloth sleuth. Are you a hack programmer? Do you find yours

Benjamin Gleitzman 9.8k Jan 08, 2023
Dart Version Manager CLI implemented with Python and Typer.

Dart Version Manager Dart Version Manager CLI implemented with Python and Typer Usage: $ dvm [OPTIONS] COMMAND [ARGS]... Options: --install-completion

EducUp 6 Jun 26, 2022
Play Wordle Bot - Wordle Bot written in python

Wordle Bot A Bot written in python with a CL Interface to guess adn solve Wordle

Prashant 1 Feb 25, 2022
PdpCLI is a pandas DataFrame processing CLI tool which enables you to build a pandas pipeline from a configuration file.

PdpCLI Quick Links Introduction Installation Tutorial Basic Usage Data Reader / Writer Plugins Introduction PdpCLI is a pandas DataFrame processing CL

Yasuhiro Yamaguchi 15 Jan 07, 2022
WazirX Portfolio Tracker on your Terminal!

If you have been investing in crypto in India, there is a very good chance that you are using WazirX. If you are using WazirX, then you definitely know that there is no P&L report, no green arrows no

Raunit 15 Jan 10, 2022
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

mycli A command line client for MySQL that can do auto-completion and syntax highlighting. HomePage: http://mycli.net Documentation: http://mycli.net/

dbcli 10.7k Jan 07, 2023
TermPair lets developers securely share and control terminals in real time🔒

View and control terminals from your browser with end-to-end encryption 🔒

Chad Smith 1.5k Jan 05, 2023