Add features as described in Issue 37
Issue Link: https://github.com/PhonePe/mantis/issues/37
- Flag for listing org
python launch.py list --list-orgs
python launch.py list -l
- List domains for org
python launch.py list --list-domains --org "org1" --org "org2" --tlds # list TLDs for multiple orgs
python launch.py list --list-domains --org "org1" --org "org2" --subs # list subdomains for multiple orgs
python launch.py list --list-domains --org "org1" --org "org2" --tlds --subs # list TLDs + subdomains for multiple orgs
python launch.py list -d -o "org1" -o "org2" -t # list TLDs for multiple orgs
python launch.py list -d -o "org1" -o "org2" -s # list subdomains for multiple orgs
python launch.py list -d -o "org1" -o "org2" -t -s # list TLDs + subdomains for multiple orgs
- Time based filter
python launch.py list -tds -o "org1" -a 2024-09-04 -b 2024-09-05 # list TLDs + subdomains for org1 in timeframe [2024-09-04, 2024-09-05]
[!NOTE]
-a/--afterand-b/--beforefilters can be used individually as well
Checklist:
- [ ] Merge https://github.com/PhonePe/mantis/pull/49
- [ ] Merge main branch into dmdhrumilmistry:issue-37
Hi @dmdhrumilmistry Thanks for raising the pr. I will review this and request changes if required any.
Hi @dmdhrumilmistry Thanks for raising the pr. I will review this and request changes if required any.
Sure. Sg!
@dmdhrumilmistry Thanks for the PR. This looks very good. I tested it and everything works as expected.
Quick question, any reason for using tds keyword in list -tds -o "org1" -a 2024-09-04 -b 2024-09-05 instead of tlds?
Also, when i run mantis list -tds -o "sample-org" -a 2024-01-01 -b 2024-02-02, the time based filter works but I get all the subdomains. When I use tds, my assumption was that I'll get only TLDs.
@dmdhrumilmistry Thanks for the PR. This looks very good. I tested it and everything works as expected.
Quick question, any reason for using
tdskeyword inlist -tds -o "org1" -a 2024-09-04 -b 2024-09-05instead oftlds?Also, when i run
mantis list -tds -o "sample-org" -a 2024-01-01 -b 2024-02-02, the time based filter works but I get all the subdomains. When I usetds, my assumption was that I'll get only TLDs.
sg, actually tds are different flags -t -d -s. I've just added it for demonstration that they can be clubbed together as well (-tds)
| Flag | Description |
|---|---|
| t/tlds | includes tlds in response |
| s/subs | includes subdomains in response |
| d/list-domains | used for listing domains |
If you only need tlds then you'll need to use below command
mantis list -td -o "sample-org" -a 2024-01-01 -b 2024-02-02
Makes sense.
@Prateek-Thakare I tested the functionality. It's good to go. Can you go through the code and merge the PR?
Hi @dmdhrumilmistry, Can you please remove the commits for the Ansible feature from this PR and re-raise it?
Thanks, Prateek
Hi @dmdhrumilmistry, Can you please remove the commits for the Ansible feature from this PR and re-raise it?
Thanks, Prateek
Hey @Prateek-Thakare,
I've removed ansible files. LMK if any other changes are required
@Prateek-Thakare / @0xbharath thanks for the merge 🙌. Can someone add hacktoberfest-accepted label to this and https://github.com/PhonePe/mantis/pull/49 PRs?
Thanks for the contribution. I have added the labels to the PRs. Looking forward to more such contributions.