Skip to content

Add better list commands#117

Merged
lervag merged 4 commits intomasterfrom
feat/better-listing
Aug 14, 2025
Merged

Add better list commands#117
lervag merged 4 commits intomasterfrom
feat/better-listing

Conversation

@lervag
Copy link
Owner

@lervag lervag commented Aug 11, 2025

This adds apy list-cards and apy list-notes as discussed in #116.

lervag added 4 commits August 12, 2025 00:04
This also adjusts the note review and adds the new "Show details" menu
item to toggle verbose mode on and off. This has a corresponding config
option "review_verbose".
@Timlee1
Copy link

Timlee1 commented Aug 12, 2025

Hi, I would be happy to help if you need me to.

I cloned the repository and tried to run the tests. In both master and feat/better-listing, When running uv run pytest, I get 5 failed tests AssertionError:` assert 1 == 0 where 1 = <Result KeyError('Tim')>.exit_code , I think it has to do with fact I changed my profile name.

How would you like me to test the new feature?

@lervag
Copy link
Owner Author

lervag commented Aug 12, 2025

I cloned the repository and tried to run the tests. In both master and feat/better-listing, When running uv run pytest, I get 5 failed tests AssertionError:` assert 1 == 0 where 1 = <Result KeyError('Tim')>.exit_code , I think it has to do with fact I changed my profile name.

That's strange. On my end, the tests run without issue.

How would you like me to test the new feature?

If you clone the repo, go to the cloned path, check out the branch, and then run uv sync. I think it should create a venv and build things. After that, you can run uv run apy list-cards QUERY, for instance.

You can also activate the venv, in which case apy should be the version on the branch and you can just do apy list-notes and apy list-cards with a query.

@Timlee1
Copy link

Timlee1 commented Aug 12, 2025

Thanks for the instructions. I was able to test my deck by activating the venv. The feature looks great for what I am trying to accomplish. The only minor issue that I found is that for cards with multiple lines, it sometime adds a bunch spaces at the end of each line (faint dots in the image).

Here is what I mean when I run apy list-notes -v compared to apy edit.

apy list-notes
apy-list-notes

apy edit
apy-edit

@lervag
Copy link
Owner Author

lervag commented Aug 14, 2025

The only minor issue that I found is that for cards with multiple lines, it sometime adds a bunch spaces at the end of each line (faint dots in the image).

Here is what I mean when I run apy list-notes -v compared to apy edit. …

My guess is that those are actual spaces in the field content, which you should be able to observe if you e.g. do apy review nid:1754423778493 and edit the note (or, I guess, apy edit also works for that).

I'll look into it and see if I can reproduce something like it on my end.

@lervag
Copy link
Owner Author

lervag commented Aug 14, 2025

But all in all, it seems you find this more or less good already, so I might merge it this evening. Feel free to continue the discussion - I'll fix and push fixes and updates that come up during our discussion.

@lervag
Copy link
Owner Author

lervag commented Aug 14, 2025

I'll look into it and see if I can reproduce something like it on my end.

I'm sorry to say I can't reproduce it... :\

lervag added a commit that referenced this pull request Aug 14, 2025
@lervag lervag merged commit e055243 into master Aug 14, 2025
7 checks passed
@lervag lervag deleted the feat/better-listing branch August 14, 2025 21:13
@Timlee1
Copy link

Timlee1 commented Aug 15, 2025

No worries, thanks for the quick responses and getting the feature implemented so quickly. If I can definitively pinpoint the bug, I will let you know in the future.

@lervag
Copy link
Owner Author

lervag commented Aug 15, 2025

Great! And thanks for suggesting this - I'm going to use it myself as well!

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