[HN Gopher] Show HN: Purl - A Simple Tool for Text Processing
___________________________________________________________________
Show HN: Purl - A Simple Tool for Text Processing
Hello HN community, I'm excited to share a new command-line tool I
developed called purl, inspired by the simplicity of Perl one-
liners for efficient text processing. Purl features include Perl-
like regex that simplifies text manipulation, it's cross-platform
so works equally well on macOS, Linux, etc., and it's quick and
easy to install. The tool also supports simple commands such as
-replace, -filter, and -exclude, and offers optional color output
to enhance readability. Purl is a practical alternative to
traditional tools like sed and grep, designed to address some of
their common limitations. For more information and to try purl
yourself, visit: https://github.com/catatsuy/purl I appreciate any
feedback!
Author : catatsuy
Score : 15 points
Date : 2024-04-13 05:39 UTC (1 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| anotherhue wrote:
| Congratulations on the release! Thank you for making it open
| source.
|
| For the old farts like me, would you consider adding in some
| comparisons to AWK?
| rectang wrote:
| > _I appreciate any feedback!_
|
| Please don't use a name which is confusingly similar to an
| existing product (i.e. infringes on someone else's trademark).
| Open source communities have enough to deal with already without
| having to allocate scarce volunteer hours to working out legal
| issues.
| willwade wrote:
| I was thinking of "Persistent uniform resource locator" but
| then realised I think you are referring to the python library
| https://github.com/codeinthehole/purl (I get your argument
| although I quite like this new project. It's closer to "Perl"
| in my mind. But then I am nearly 50..)
| rectang wrote:
| I'm referring to Perl, which is another product in the same
| market (unixy command line applications) and has the same
| pronunciation.
|
| https://www.uspto.gov/trademarks/search/likelihood-confusion
|
| > _Trademarks don't have to be identical to be confusingly
| similar. Instead, they could just be similar in sound,
| appearance, or meaning, or could create a similar commercial
| impression. Here are examples of trademarks that were found
| to be confusingly similar._
|
| > _These trademarks are confusingly similar because they
| could be pronounced the same way, even though they're spelled
| differently._
|
| > _Your mark -- T. Markey_
|
| > _Conflicting mark -- Tee Marquee_
| hwbunny wrote:
| Yeah, awk, sed and the other gang of terribles in syntax must
| evaporate asap.
| hwbunny wrote:
| Question: can it preserve original colors and also highlight the
| given word? Like when you do an "apt search whatever | grep
| another", and it is formatted in a nice way, but grep just eats
| the colors...
| gloria_mundi wrote:
| grep doesn't eat the colours, apt detects that it is not
| outputting to a TTY and suppresses the colours. Try `printf 'a
| \e[36mb\e[0m c\n' | grep a`, the colour is preserved just fine.
|
| Some tools have an option to force coloured output regardless,
| e.g. GCC's `-fdiagnostics-color` or grep's own
| `--colour=always`, but apt doesn't seem to have anything like
| that.
|
| In theory one could have a command in the style of nohup or
| stdbuf which sets up a PTY to trick the command into outputting
| colours. So one could run `fakepty apt search whatever | grep
| another` ...
___________________________________________________________________
(page generated 2024-04-14 23:01 UTC)