Skip to content

wata00913/exfuz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exfuz

exfuz is able to fuzzy search for excel by using fuzzy finder tools such as fzf, peco

Features

  • fuzzy search is possible for excel workbook, sheet, cells
    • note: In the current version, exfuz cannot be used if the Ruby environment is Windows.
  • can jump to positions selected lines by fuzzy finder tools
    • note: In the current version, the jump function is only available in wsl.

Demo

demo

Installation

gem install exfuz

Install the fuzzy finder tool.1

Usage

exfuz start

Sources to be searched are xlsx files under the current directory hierarchy.

Query

It is possible to enter a query on the initial screen. Only cells matching the query will be subject to fuzzy search.
For example, in the figure below, enter the regular expression test.*data in the query area. image

Item Format

The format of the items read by fuzzy finder tool is as follows.

LineNumber:FileName:SheetName:CellAddress:CellValue

LineNumber is the order of the data passed to the standard input. Also, the delimiter character for each content is:.

Key binding

Key Description
CTRL-R Launch Fuzzy Finder tool
CTRL-E Stop exfuz
CTRL-H Back to previous page of selection list
CTRL-L Go to next page of selection list
Right Arrow Move Query cursor to right
Left Arrow Move Query cursor to left
BACKSPACE Delete one character in Query

Options

Setting file is .exfuz.json .

The priority for reading the configuration is as follows.

  1. ./.exfuz.json
  2. ~/.config/exfuz/.exfuz.json
  3. Default settings
Option Values / Default Value Description
book_name_path_type [”relative”, “absolute”]
Default Value: "relative"
Format to display book name.
relative path or absolute path.
cell_position_format [”index”, “address”]
Default Value: "address"
Format to display cell position
ex) index: $3$4, address: $C$4
line_sep Arbitary character
Default Value: ":"
Delimiter char
ex) book1.xlsx:sheet1:$A$1:value if delimiter char is :
split_new_line [true, false]
Default Value: false
Whether to escape line breaks in cells
jump_positions [true, false]
Default Value: false
Whether to jump to the selected item2
fuzzy_finder_command_type ["fzf", "peco", "percol", "sk"]3
Default Value: "fzf"
Which fuzzy finder tool to use

License

The gem is available as open source under the terms of the MIT License

Footnotes

  1. One of the following fuzzy finder tools must be installed in advance.
    fzf
    peco
    percol
    skim

  2. In the current version, the jump function is only available in wsl.

  3. Value to fuzzy finder tool is as followeds.
    ・"fzf": fzf
    ・"peco": peco
    ・"percol": percol
    ・"sk": skim

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published