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

Feature quick field mappings #61

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

leoc
Copy link

@leoc leoc commented Nov 28, 2019

See #59

This should work with the latest develop.

@leoc leoc changed the base branch from master to develop November 28, 2019 14:40
@leoc
Copy link
Author

leoc commented Nov 29, 2019

Extracted the exporting to reuse your latest changes for the quick fields aswell.

@orgtre
Copy link

orgtre commented Oct 31, 2022

This commit in orgtre/anki-editor provides the functionality of this pull request. It also allows a more general logic:

  • If exactly one field is omitted (based on the ANKI_NOTE_TYPE), then the content between the note heading and the first subheading (or the next same-level heading) is mapped to the missing field.
  • Moreover, if exactly two fields are omitted, the note heading is mapped to the first missing field, and the second missing field is mapped as described in the previous sentence.

The only thing that is missing (?) seems to be that as it's implemented in orgtre/anki-editor the field order of the note type controls which field goes to the heading and content. There is no custom option anki-editor-quick-field-mapping to control this, instead one can change the note type to change the mapping. If people want such an option or if there is something else we're missing at orgtre/anki-editor I'd welcome a pull request.

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.

3 participants