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 json output and expose external identifier #55

Merged
merged 3 commits into from
May 22, 2023

Conversation

nettleton
Copy link
Contributor

This PR adds support for formatting the output in JSON format for easy scripting (#30). This is similar to #53 but adds a "--format" option to existing subcommands as I use the JSON output from add in some personal scripts (example).

$ reminders add MyList "some reminder" -f json | jq '.'
{
  "title": "some reminder",
  "isCompleted": false,
  "externalId": "BD2B26EF-38E1-40A7-90A4-C02ACA190145",
  "priority": 0,
  "list": "MyList"
}
  1. Extends the --format option to use the external id in place of index. I use the id for urls like "x-apple-reminderkit://REMCDReminder/$id" that open the specified reminder in the Reminders app, so being able to use the id directly instead of correlating to the array index makes things simpler.
$ reminders complete MyList BD2B26EF-38E1-40A7-90A4-C02ACA190145
Completed 'some reminder'

@Kolsha
Copy link
Contributor

Kolsha commented Mar 21, 2023

Hi!
What is the status of this MR?

@nettleton
Copy link
Contributor Author

@Kolsha , there seem to be 2 open PRs that add overlapping functionality (see #53). @keith - do you have a preference for one, the other, or something else?

@keith
Copy link
Owner

keith commented Mar 22, 2023

since that other one seems stalled I'm fine with going with this one

@0xdevalias
Copy link
Contributor

since that other one seems stalled I'm fine with going with this one

While I had 'eventual' plans to get back to it, I'd definitely say landing this one sooner is the better choice. Then if I ever do get back around to it, I could just update my PR for whatever the current state of the codebase is at that time.

@Kolsha
Copy link
Contributor

Kolsha commented Apr 10, 2023

@keith, can we merge this?

@keith
Copy link
Owner

keith commented Apr 10, 2023

it requires some fixes first, at least for conflicts

@nettleton
Copy link
Contributor Author

Sorry for the late response, I have resolved conflicts with main

@0xdevalias
Copy link
Contributor

@keith What are the chances of getting this one landed now?

@Kolsha
Copy link
Contributor

Kolsha commented May 15, 2023

@keith ping

@keith keith merged commit f356159 into keith:main May 22, 2023
@keith
Copy link
Owner

keith commented May 22, 2023

thanks! FYI I'm moving some of this around afterwards in #60

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.

4 participants