Skip to content

Process a text stream and extract all valid URLs and send list to output stream

Notifications You must be signed in to change notification settings

javascriptxbest/text2links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Text -> URL List

Receive stdin, output a list of URLs.

Arguments

-t --type : plaintext | html

Indicate whether STDIN is HTML or Plaintext.

-d --delimit : string

Provide a string (1+ characters) to use as a delimiter. Be mindful not to use valid URL characters otherwise parsing the list will be difficult.

Example

echo "check out https://deno.land it's cool!" | deno run mod.ts

Expected output:

https://deno.land

Usage hints

Use with your clipboard

Copy some links/content from a website, then:

xclip -o -t text/html -selection clipboard | deno run mod.ts --type html

About

Process a text stream and extract all valid URLs and send list to output stream

Topics

Resources

Stars

Watchers

Forks