Commit graph

110 commits

Author SHA1 Message Date
orgtre
3c1bab3c03 Add option to prepend heading to content before first (sub)heading
Like this, when exactly one field is missing and there is content
before the first (sub)heading, the heading is seen as part of that
content and one can avoid having to duplicate it there. The
content with the prepended heading will be mapped to the missing
field. Notes in Anki and Org can be made to look more similar
without always needing a separate field for the heading.
2022-11-02 12:34:47 +01:00
orgtre
b0ecbbe4ad More informative error message in anki-editor-api-check
Increases user-friendliness, as discussed in orgtre/anki-editor#5.
2022-11-02 11:05:03 +01:00
orgtre
6f5df94102 Map subheadings not matching note field to fields if applicable
Subheadings not matching a note field are considered part of the
content before the first (sub)heading for field matching purposes.
2022-11-01 18:18:11 +01:00
orgtre
bd08644cd4 Refactor anki-editor-note-at-point 2022-11-01 12:51:43 +01:00
orgtre
a6c116b737 Allow empty fields
Implements the fix from leoc/anki-editor#1 as suggested in
orgtre/anki-editor#9. Closes orgtre/anki-editor#7.
2022-10-31 19:12:26 +01:00
orgtre
efe454f642 Update deck for all cards of a note
Update decks as suggested by louietan/anki-editor#85.
ccd7f77322 only updated one card.
2022-10-31 11:50:32 +01:00
orgtre
1f8b222e08 Recognize the same audio types as Anki
Addresses louietan/anki-editor#87.
2022-10-31 08:51:19 +01:00
orgtre
ccd7f77322 Allow updating of deck, add support for omitting a field
Also fix some bugs and add `anki-editor-push-note-at-point'.
2022-08-15 16:51:12 +02:00
louie
ff3230f32f Incorporate changes in PR#62 2020-03-09 21:44:18 +08:00
louie
c74e864a64 Use anki-connect version 6 2020-03-09 21:44:18 +08:00
louie
58cad3a287 Add styling utilities 2020-03-09 21:44:18 +08:00
louie
c76166e318 Capture connection error 2020-03-02 21:55:52 +08:00
louie
c47dfade3a Collect notes in one pass 2020-03-02 21:55:50 +08:00
louie
7dcae54caa Allow to put one field in heading 2020-03-02 00:35:55 +08:00
louie
3fba9ea13b Fix byte-compilation warnings 2020-03-02 00:33:47 +08:00
louie
b2cbf48911 Refactor anki-editor--build-fields 2020-03-02 00:33:47 +08:00
louie
e665f2c28f Make latex flavor a list of choices 2020-03-02 00:33:45 +08:00
louie
1feb3becc3 Reduce duplication in latex functions 2020-02-10 20:57:55 +08:00
louie
df2a90c9b8 Remove the dependency on request.el 2020-02-10 19:51:02 +08:00
louie
0d219e4118 Refactor multi api call 2020-02-10 19:47:49 +08:00
louie
375d6d66d2 Refactor api functions 2020-02-10 19:47:47 +08:00
louie
3c52675134 Compute SHA1 against file content instead of file name 2019-11-11 18:58:00 +08:00
louie
308cd97a9d Add support for exporting field contents literally 2019-11-11 18:58:00 +08:00
louie
b8f6986ab9 Doc stuff 2019-11-11 18:57:58 +08:00
louie
b6065cd2f7 Add more commands 2019-11-03 20:14:09 +08:00
dickmao
084ffad14f request 0.3.1 assumes utf-8 (#53)
* request 0.3.1 assumes utf-8

The tkf library now defaults to utf-8 encoding (so does not need to be
done in anki-editor).  Further the synchronous bug has been fixed.

* must upgrade to request 0.3.1

* use melpa versioning

* Synch bug in request-20190730.1014

Hypothesis: synch bug is triggered depending on byte compilation of request-curl-callback.

* when-let issue

* restore "HACK: With sync set to t"

Package maintainer reports undowned semaphore with tkf/emacs-request library
f466ab1.  I don't believe restoring the "HACK" would cure this since
":sync t" remains.
2019-09-22 20:23:39 +08:00
louie
a09e3305a9 Update comment on a hack. 2019-06-09 00:21:09 +08:00
louie
ad151a132f Avoid applying alist-get on a non-list object 2019-06-07 20:27:53 +08:00
analyticd
06c8ff3e79 Add MathJax as an option instead of LaTeX (#40) 2019-06-07 20:03:40 +08:00
louie
805bd238db Check errors for endpoint multi 2019-06-07 20:00:16 +08:00
pszenher
986b1ee398 Minor spelling correction (#25) (#44)
Changed "anki-eidtor-mode" to "anki-editor-mode" on line 573
2019-06-07 19:58:20 +08:00
Kevin Foley
115ce2e2e6 Use emacs base64 sha1 (#38)
Use built-in functions for SHA1 hasing and base64 encoding
2018-12-30 23:53:14 -08:00
cwur
7af16c6447 Fixed function call of anki-editor-cloze from anki-editor-cloze-region/dwim (#33)
Fix 'Wrong number of arguments' error calling `anki-editor-cloze`
2018-12-30 22:41:55 -08:00
louie
0bee0064bc Don't upload a media file that already exists. 2018-10-05 16:38:11 +08:00
louie
bcaa89bf36 Improve editing of ANKI_TAGS 2018-09-24 02:41:15 +08:00
Aleksei Fedotov
44624cd391 Add a function to create cloze from word under cursor (#27)
* anki-editor-cloze-region: Accept hint as an argument.

To allow the function to be called non-interactively accept 'hint' as function's
argument.

* Split anki-editor-cloze into interactive and non-interactive parts.

* Add anki-editor-cloze-dwim function.

Create a cloze from currently selected region, if no region selected, use word
at point.
2018-09-05 21:21:15 +08:00
Alex Henning
b533c9899c Add support for mp3 sound links on cards (#26)
* Add support for mp3 sound links on cards

Per https://apps.ankiweb.net/docs/manual.html#importing-media the format for audio files is `[sound:myaudio.mp3]`. This allow anki-editor to export mp3 links such as `[[file:myaudio.mp3]]`in a form that they play nice with anki cards.
2018-08-12 09:52:53 +08:00
louie
325462db2e Enable completion for ANKI_TAGS 2018-07-29 17:18:59 +08:00
louie
06a8cdccf6 Add custom variables to ignore and protect tags. 2018-07-29 13:00:12 +08:00
louie
4403cb17f1 Reenable support for setting tags via "ANKI_TAGS" property and add a variable to control whether count org tags as anki tags. 2018-07-29 11:12:23 +08:00
louie
11dbf07895 Release 0.3.2 2018-07-15 16:51:00 +08:00
louie
9e2a9b33d2 Make advicing functions only do their extra work when this mode is turned on. 2018-07-08 15:05:35 +08:00
louie
7feef4988c Modify hook locally. 2018-07-06 21:42:24 +08:00
louie
20d61f4c63 Expose and document some functions 2018-07-06 21:21:24 +08:00
louie
683c48dfec Refine the code that constructs notes from entries. 2018-07-01 22:35:35 +08:00
louie
38ef26aa01 Disable 'org-use-property-inheritance' temporarily when mapping over note entries. 2018-07-01 14:51:48 +08:00
louie
132aa902f3 Fixes #17 2018-06-16 16:59:32 +08:00
louie
207c55b52b Reorder function definitions 2018-06-11 18:00:19 +08:00
louie
1477ee4b2f Release 0.3 2018-06-10 21:40:51 +08:00
louie
5bcb946406 Hack with the sync mode of request.el 2018-06-10 21:38:08 +08:00