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

[WIP] Add head and tail cli options #39

Closed
wants to merge 1 commit into from

Conversation

anusha5695
Copy link

Issue:
This PR is related to the issue : #16

Summary of changes:

  1. Add arguments in the allowed list (--head and --tail)
  2. Read arguments from keyworded args
  3. If either head or tail is present, then query the Events using (first() for head and .order_by(desc()).first()
  4. Else use the .all()

@anusha5695
Copy link
Author

@vinayak-mehta : Could you please review this?

@vinayak-mehta
Copy link
Owner

Yes! Please give me one day.

@anusha5695
Copy link
Author

@vinayak-mehta : Hi any updates on this

@vinayak-mehta vinayak-mehta self-requested a review November 3, 2019 17:01
@vinayak-mehta vinayak-mehta changed the title [Issue-16] Add functionalities for head and tail cli commands <Anusha> [WIP] Add head and tail cli options Nov 3, 2019
Copy link
Owner

@vinayak-mehta vinayak-mehta left a comment

Choose a reason for hiding this comment

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

Looks like there are merged conflicts. Two changes are needed:

  1. Both options should be mutually exclusive
  2. There should be an option to specify number of lines for each. For example:
  • conrad show --head 5: To show first 5 rows
  • conrad show --tail 5: To show last 5 rows

You can try using the head and tail unix commands to get a sense of how they work.

@anusha5695
Copy link
Author

@vinayak-mehta sure will make the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants