Skip to main content

plover_clippy fork focused on extensibility and useability

Project description

Plover_clippy_2

Installation

  • Currently this plugin is not available in the official registry so you need to clone this repo
git clone https://github.com/Josiah-tan/plover_clippy_2 
  • cd into this repo
  • Then install for use!
    • Note that "plover" is the executable that you downloaded to make Plover work in the first place
    • See this website for the different locations depending on which platform you are using (Linux, Windows, etc)
cd plover_clippy_2
plover -s plover_plugins install -e .
  • Finally make sure to open plover, then go to configure, plugins and enable this plugin!

Usage

Basic

  • Now that you have installed this plugin it's time to use it!
  • By default the output is written into clippy_2.org in your config files
    • Basically the same place as where your user.json and main.json is

Customization

  • In your config directory create a python file:
    • clippy_2_cfg.py
  • Custom code in this section should be written into this file
  1. Initialization

    • Below are some states that can be set by the user
      • Note that these are the defaults
    def initPost(obj, clippy):
        clippy.state.output_file_name = "clippy_2.org"
        clippy.state.efficiency_symbol = "*"
        clippy.state.max_pad_efficiency = 5
        clippy.state.max_pad_english = 15
            clippy.state.last_num_translations = 10
    
    • output_file_name: name of the output file, directory location will default to config directory
    • efficiency_symbol: any one character symbol used to denote how many strokes can be saved
    • max_pad_efficiency: the maximum number of efficiency symbols that are allowed to be displayed
    • max_pad_english: the maximum amount of space padding for English translations
    • last_num_translations: these number of translations are used to give suggestions
    • note: initPost executes after this plugin initializes itself
  2. Suggestion styles

    • Below are some suggestion styles
      • the default style `org.defaultSuggest` is uncommented
    def onTranslateSuggest(obj, clippy):
        clippy.formatting.org.defaultSuggest(obj, clippy)
        # clippy.formatting.minimalSuggest(obj, clippy)
        # clippy.formatting.retro.suggest(obj, clippy)
        # clippy.formatting.org.debugSuggest(obj, clippy)
        # clippy.formatting.org.minimalSuggest(obj, clippy)
    
    • note: onTranslateSuggest gets called when suggestions are available
    • feel free to make your own suggestion styles (see formatting/org.py for coded examples)
      • note that `self` refers to different things, for example, in formatting/org.py fit is equivalent to `clippy.formatting.org`
    • org.defaultSuggest:
    *     you are         *UR, R*U < KPWR/-R
    
    • minimalSuggest:
    you are         *UR, R*U
    
    • retro.suggest: same as the original plugin
    [2022-02-09 22:29:47] you are         || KPWR/-R -> *UR, R*U
    
    • org.debugSuggest: same as org.defaultSuggest, but nice for figuring out which suggestion source the suggestion came from
    *     you are         *UR, R*U < KPWR/-R  # Retro
    
    • org.minimalSuggest: minimal required for org syntax highlighting
    *     you are         *UR, R*U
    
  3. Suggestion sources

    • The suggestions come from different sources, and you can choose which sources to include!!!
      • Listed below are the defaults
    clippy.translations.sources.set("Undo", "FingerSpelling", "Retro", "Tkfps")
    
    • see Suggestion Sources for a more information on what each source does
    • see Sources for other methods like "append" and "prepend"
  4. distillation sources

    • TODO

File viewing

  • well obviously you can open up the file and take a look, but what if you want to have a live view while training?

Terminal

  • here are some live commands for different platforms
  1. Windows

    Get-Content clippy_2.org -Wait -Tail 30
    
  2. Linux

    tail -f clippy_2.org
    
  3. WSL

    Note that on WSL, the flag `—disable-inotify` may be required to make `tail` work

    tail -f ---disable-inotify clippy_2.org
    

Plover-live-view-nvim (neovim only)

  • This plugin is a live viewer which supports:
    • Splits - You can split both horizontally and vertically and customize the sizes of the splits
    • Terminal viewing (requires harpoon)
    • Buffer viewing (requires autoread-nvim)
      • The benefit of this over the terminal is that you can use custom syntax highlighting!

vim-autoread (vim only [no nvim])

  • This plugin is a live viewer for buffer viewing

Dev

This section is for people who interested in improving this plugin!

Installation

  • Get the latest build of plover
pip3 install plover==4.0.0.dev10
  • Fork this repo and clone it locally
git clone link/to/gitHub
  • cd into this repo
  • Then install for use!
    • Note that "plover" is the executable that you downloaded to make Plover work in the first place
    • See this website for the different locations depending on which platform you are using (Linux, Windows, etc)
cd plover_clippy_2
plover -s plover_plugins install -e .
  • Edit stuff, test it out and most of all, have fun!
  • Feel free to chuck me a pull request or raise an issue if you have any questions!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plover_clippy_2-0.0.3.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

plover_clippy_2-0.0.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file plover_clippy_2-0.0.3.tar.gz.

File metadata

  • Download URL: plover_clippy_2-0.0.3.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for plover_clippy_2-0.0.3.tar.gz
Algorithm Hash digest
SHA256 41013ec9ca9e2458c8e26f5a1bbbae42926130fca9baca247a3707c651bf1482
MD5 edf23c4cbf2dcaf2fb114f0cfd61b0fb
BLAKE2b-256 2fcdf6683a7cd60ec155c53250a82e105d726b1ecc9173c546f1e692dd5ea6dd

See more details on using hashes here.

File details

Details for the file plover_clippy_2-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: plover_clippy_2-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for plover_clippy_2-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb9d29afdb90cbf4b33a5950fc8bce6513df81f02bf2f7cf73c1faac74282b9
MD5 a88a5c3274c4ccbfb5b4c7960a4536db
BLAKE2b-256 6ab9c08373124af9f38c4f80e1d0f0883208230338214c492234849f1473d151

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page