IvanMathy / Boop

A scriptable scratchpad for developers. In slow yet steady progress.
https://boop.okat.best
MIT License
3.84k stars 356 forks source link

Add option to Extract domain from url #310

Open SusilRamarao opened 3 years ago

SusilRamarao commented 3 years ago

Hi @IvanMathy @nhnicwaller I have created PR for the above Issue. Please review and let me know as this is a first issue I am committing for open source :). I tested the same by loading the script and it was working fine.

Currently in the code I have added to exclude www or web.

There were few issues. 1) If I try to extract the first word before first '.' like www or web, sometimes it also filters other urls which doesn't contain the mentioned strings like "http://mddsgj886.com", so for safety I have written to ignore only for www and web, if any other link like "http://ab.mdds.sail.com", it will extract as "ab.mdds.sail.com". 2) For adding for other two scripts i.e, Remove Subdomain (a.b.example.com. -> example.com.) - Suggest should I need to ignore all the subdomains until the last but one from domain suffix? Extract Domain Suffix (a.b.example.com. -> com.) - I am yet to commit this script.

Let me also know to which branch I need to create a PR? either is it main or master? Thanks!

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information