Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add features as described in Issue 37 #51

Merged
merged 8 commits into from
Oct 21, 2024

Conversation

dmdhrumilmistry
Copy link
Contributor

@dmdhrumilmistry dmdhrumilmistry commented Oct 5, 2024

Issue Link: #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/--after and -b/--before filters can be used individually as well

Checklist:

@Prateek-Thakare
Copy link
Collaborator

Hi @dmdhrumilmistry
Thanks for raising the pr. I will review this and request changes if required any.

@dmdhrumilmistry
Copy link
Contributor Author

Hi @dmdhrumilmistry Thanks for raising the pr. I will review this and request changes if required any.

Sure. Sg!

@0xbharath
Copy link
Collaborator

0xbharath commented Oct 17, 2024

@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
Copy link
Contributor Author

dmdhrumilmistry commented Oct 17, 2024

@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.

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

@0xbharath
Copy link
Collaborator

Makes sense.

@Prateek-Thakare I tested the functionality. It's good to go. Can you go through the code and merge the PR?

@Prateek-Thakare
Copy link
Collaborator

Hi @dmdhrumilmistry,
Can you please remove the commits for the Ansible feature from this PR and re-raise it?

Thanks,
Prateek

@dmdhrumilmistry
Copy link
Contributor Author

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

Copy link
Collaborator

@Prateek-Thakare Prateek-Thakare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is structured well and @0xbharath has tested the flow end to end.

@Prateek-Thakare Prateek-Thakare merged commit 40dbbfd into PhonePe:main Oct 21, 2024
@dmdhrumilmistry
Copy link
Contributor Author

@Prateek-Thakare / @0xbharath thanks for the merge 🙌. Can someone add hacktoberfest-accepted label to this and #49 PRs?

@Prateek-Thakare
Copy link
Collaborator

Thanks for the contribution. I have added the labels to the PRs. Looking forward to more such contributions.

hiteshkumarthakur pushed a commit to hiteshkumarthakur/mantis that referenced this pull request Nov 28, 2024
Add features as described in Issue 37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants