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)
Commandline script to interact with volkswagencarnet library

volkswagencarnet-client command line script to interact with volkswagencarnet library Table of Contents General Info Setup Usage Example Acknowledgeme

3 Jan 19, 2022
Command Line Based Todo Script

Todo-CLI Features Full-Fledged Command Line Based Todo List with the following features planned: Interactive Interface OS Notifications Save and Remov

DSC IIEST 5 Nov 17, 2021
🔖 Lemnos: A simple, light-weight command-line to-do list manager.

🔖 Lemnos: CLI To-do List Manager This is a simple program that allows one to manage a to-do list via the command-line. Example $ python3 todo.py add

Rohan Sikand 1 Dec 07, 2022
This is a CLI program which can help you generate your own QR Code.

Python-QR-code-generator This is a CLI program which can help you generate your own QR Code. Single.py This will allow you only to input a single mess

1 Dec 24, 2021
Command-line tool for downloading and extending the RedCaps dataset.

Command-line tool for downloading and extending the RedCaps dataset.

RedCaps dataset 33 Dec 14, 2022
CLI tool to develop StarkNet projects written in Cairo

OpenZeppelin Nile ⛵ Navigate your StarkNet projects written in Cairo. Getting started Create a folder for your project and cd into it: mkdir myproject

OpenZeppelin 305 Dec 30, 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
Doro is a CLI based pomodoro app and countdown timer application built using python.

Doro - CLI based pomodoro app Doro is a CLI based pomodoro app and countdown timer application built using python. Install $ pip install doro Usage Po

Suresh Kumar 14 May 23, 2022
🦎 A NeoVim plugin for highlighting visual selections like in a normal document editor!

🦎 HighStr.nvim A NeoVim plugin for highlighting visual selections like in a normal document editor! Demo TL;DR HighStr.nvim is a NeoVim plugin writte

Pocco81 222 Jan 03, 2023
Seamlessly run Python code in IPython from Vim

Seamlessly run Python code from Vim in IPython, including executing individual code cells similar to Jupyter notebooks and MATLAB. This plugin also supports other languages and REPLs such as Julia.

Hans Chen 269 Dec 20, 2022
texel - Command line interface for reading spreadsheets inside terminal

texel - Command line interface for reading spreadsheets inside terminal. Sometimes, you have to deal with spreadsheets. Those are sad times. Fortunate

128 Dec 19, 2022
'rl_UK' is an open-source command-line tool in Python for calculating the shortest path between BUS stop sequences in the UK

'rl_UK' is an open-source command-line tool in Python for calculating the shortest path between BUS stop sequences in the UK. As input files, it uses an ATCO-CIF file and 'OS Open Roads' dataset from

Nesh P. 0 Feb 16, 2022
CLI translator based on Google translate API

Translate-CLI CLI переводчик основанный на Google translate API как пользоваться ? запустить в консоли скомпилированный скрипт (exe - windows, bin - l

7 Aug 13, 2022
A powerful, colorful, beautiful command-line-interface for pypi.org

pypi-command-line pypi-command-line is a colorful, powerful, and beautiful command line interface for pypi.org that is actively maintained Detailed Do

Wasi Master 32 Jun 23, 2022
GoSearch for anything from your terminal

GoSearch for anything from your terminal Requirements pip install beautifulsoup4

Malik Mouhiidine 1 Oct 02, 2021
A command line tool that creates a super timeline from SentinelOne's Deep Visibility data

S1SuperTimeline A command line tool that creates a super timeline from SentinelOne's Deep Visibility data What does it do? The script accepts a S1QL q

Juan Ortega 2 Feb 08, 2022
A helper program to play wordle

A helper program to play wordle

1 Jan 22, 2022
xonsh is a Python-powered, cross-platform, Unix-gazing shell

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

xonsh 6.7k Dec 31, 2022
Kattis shell for getting examples, testing and submitting.

Kattis shell for getting examples, testing and submitting.

Simon Green Kristensen 15 Sep 30, 2022
eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.

Command line utilities for tabular data files This is a set of command line utilities for manipulating large tabular data files. Files of numeric and

eBay 1.4k Jan 09, 2023