MCPcopy Index your code
hub / github.com/dwisiswant0/unew

github.com/dwisiswant0/unew @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
10 symbols 18 edges 1 files 0 documented · 0% updated 4y agov1.0.0 · 2020-12-13★ 129
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

unew

u(rl)new — A tool for append URLs, skipping duplicates & combine parameters. Inspired by anew & qsreplace.

Usage

▶ cat urls.txt | unew
# or
▶ unew urls.txt
# or, save the results
▶ unew urls.txt output.txt

Flags

Usage of unew:

  -combine
        Combine parameters
  -r string
        Replace parameters value
  -skip-path value
        Skip specific paths (regExp pattern)

Install

with Go:

▶ go get -u github.com/dwisiswant0/unew

Workaround

If you have a urls.txt list as

https://twitter.com/dwisiswant0?href=evilzone.org
https://twitter.com/dwisiswant0
https://twitter.com/dwisiswant0?ref=github&utm_source=github
https://twitter.com/dwisiswant0/status/1305022512590278656
https://www.linkedin.com/in/dwisiswanto/
https://www.linkedin.com/in/dwisiswanto/?originalSubdomain=id
https://www.linkedin.com/in/dwisiswanto/?originalSubdomain=id&utm_medium=github

Regular

Sample workarounds:

▶ cat urls.txt | unew
https://twitter.com/dwisiswant0?href=evilzone.org
https://www.linkedin.com/in/dwisiswanto/

If the list contains multiple URLs with same path, it will save the first one and its parameters.

Combining parameters

But you can combine parameters if the same path exists by using -combine flag.

▶ cat urls.txt | unew -combine
https://twitter.com/dwisiswant0?href=evilzone.org&ref=github&utm_source=github
https://www.linkedin.com/in/dwisiswanto/?originalSubdomain=id&utm_medium=github

Query replacers

Use the -r flag if you want to change the value of all parameters.

▶ cat urls.txt | unew -combine -r "/etc/passwd"
https://twitter.com/dwisiswant0?href=%2Fetc%2Fpasswd&ref=%2Fetc%2Fpasswd&utm_source=%2Fetc%2Fpasswd
https://www.linkedin.com/in/dwisiswanto/?originalSubdomain=%2Fetc%2Fpasswd&utm_medium=%2Fetc%2Fpasswd

Skipping paths

In case if you want to pass specific/multiple URL paths, you can use -skip-path flag for it (can be set multiple times). But, you have to write it with regExp pattern.

▶ cat urls.txt | unew -skip-path "^/[\w]+/status/[0-9]+" -skip-path "/in/[\w]+"
https://twitter.com/dwisiswant0?href=evilzone.org

Core symbols most depended-on inside this repo

Set
called by 2
main.go
qMark
called by 2
main.go
isStdin
called by 1
main.go
remDup
called by 1
main.go
qsReplace
called by 1
main.go
matchPath
called by 1
main.go
String
called by 0
main.go
init
called by 0
main.go

Shape

Function 7
Method 2
TypeAlias 1

Languages

Go100%

Modules by API surface

main.go10 symbols

For agents

$ claude mcp add unew \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page