scripter17 / jrep Goto Github PK
View Code? Open in Web Editor NEWA WIP command line tool to supplement GREP
License: Other
A WIP command line tool to supplement GREP
License: Other
So --min df=50
waits until 50 files match before printing the directory name
Or something like that, I'm not sure of how to best implement this
Currently there are 18 of these and 6 more in-the-works for a total of 24
I'm not sure if merging them into a --limit
-style option is a good idea. Actually scratch that I'm sure it isn't
I'm not entirely sure how to format the JSON
Maybe something like this?
{
"directories":[
{
"name":"a",
"directories":[],
"files":[
{
"name":"aaa.py",
"matches":[
{
"match":"abcdefg",
"span":[0,6]
}
]
}
]
},
{
"name":"b",
"directories":[]
}
],
"files":[]
}
Obviously with all the runData
info
I doubt this'll work with --order
ending with anything other than print-dir print-name print-matches
or --depth-first
. It could probably be done with considerable effort but the output would be exactly the same
It sucks we only have STDOUT and STDERR as output options
Attempting to do str.encode
on a string with Unicode surrogate pairs (???) causes problems so for now I'm doing string.encode(errors="ignore")
Todo:
str.encode
not throw errors--count
/--limit
would take 1 or more args and the arguments would be file-match
, fm
, file
, `total, etc.
I don't care if I have to make my own help formatter class I've done more for less
--limit tdt=1:5,2:3
would trigger after ./a
, ./b
, ./c
./d
./e
OR ./a/a
./a/b
./a/c
Maybe have 1:5+2:3
or something be AND?
So instead of printing every match for regex 1 then every match for regex 2, etc. the matches could be interweaved to make further processing via JREP easier
With --name-sub
and --dir-name-sub
, it's possible to have multiple of the same filename in a directory
Maybe change --no-duplicates
to a --limit
-style option with a default option of tmt
?
Currently it only cleans backslashes, carriage returns, and newlines. It ignores \033
, the most common character in ANSI escape codes
--order replace sub match-test
, --order match-test replace sub
, etc
Maybe --file-regex xyz *2
?
Not sure how to implement that
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.