lemon24 / linesieve Goto Github PK
View Code? Open in Web Editor NEWAn unholy blend of grep, sed, awk, and Python.
Home Page: https://linesieve.readthedocs.io
License: BSD 3-Clause "New" or "Revised" License
An unholy blend of grep, sed, awk, and Python.
Home Page: https://linesieve.readthedocs.io
License: BSD 3-Clause "New" or "Revised" License
For each line, output named groups of first matching pattern (of many) as a list of key-value pairs (as returned by groupdict()).
TODO: A better name than "extract".
Output format should be at least:
Nice to have:
It should be possible to treat the following as 3 "lines":
start abcd
start ef
gh
start third
This is useful for log files that start with e.g. a timestamp.
It should like be possible to specify both a start and/or an end separator; also see how awk does it. Worth considering what happens "outside" of separators.
If multi-line is enabled, it should probably imply re.DOTALL (? if yes, we can just enable it everywhere, since single-line cannot use it).
In-memory fine, initially.
Sort key regex (named, first group, whole match; like --section marker). Maybe multiple groups too?
Would be nice to have natural/human sort (see Unix sort flags).
Update:
Relevant Unix sort flags:
It should also be possible to pass a regex key:
name__value
feature)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.