8000 GitHub - lkschu/countnsort: Small cli utility to pipe into to sort based on selection frequency. Usefull for tools like fzf, rofi, dmenu
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Small cli utility to pipe into to sort based on selection frequency. Usefull for tools like fzf, rofi, dmenu

Notifications You must be signed in to change notification settings

lkschu/countnsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CountNSort

Small cli utility to pipe into to sort based on selection frequency. Usefull for tools like fzf, rofi, dmenu.

We save how often specific entries/lines have been choosen and use this information to sort the input. After a new entry has been choosen, we update the underlying database (for now only json, later sqlite).

The idea is this:

#!/bin/bash
CHOSE_ELEMENT="$(cat <list-of-choices> | countnsort -name my-usecase-db | dmenu)"
countnsort -name my-usecase-db -inc "$CHOSE_ELEMENT"
# Do what you want with the chosen entry
...

Usage

Usage of countnsort:
  -delimiter string
        Delimiter to split the line into parts, requires -f.
  -field int
        Position of the ID part of the line, requires -d. (default -1)
  -help
        Print this message.
  -inc string
        Increment the line with the specified identifier.
  -name string
        REQUIRED! Name for the database.
  -path
        Print path to database save location.
  -remove string
        Remove specified line from database.

About

Small cli utility to pipe into to sort based on selection frequency. Usefull for tools like fzf, rofi, dmenu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0