Closet For Anki [Official support]

Thanks for the reply

I changed the name of cmdsall[ as per in YT] to cmd0 .

Then the square details got pasted to the cmds0 space

[#!occlusions [[rect1::205,263,189,169]]
[[rect2::228,716,425,263]]
[[rect3::618,389,319,287]] #]

I tried the card with the above command as well as in the below command
[[rect1::205,263,189,169]]
[[rect2::228,716,425,263]]
[[rect3::618,389,319,287]]

both didn’t work…

Just to confirm, you do have the Cmds0 Field included in both sides of the template?

That setup is a bit messed up. There have been changes to the file structure of Closet since the YouTube video came out. Some of the recipes are now under closet/flashcard/recipes.
Also, those quote characters you used are illegal.

Here is the corrected version:

Click to expand
/* here goes the setup - change it to fit your own needs */

filterManager.install(
    closet.recipes.shuffle({ tagname: "mix" }),
    closet.recipes.order({ tagname: "ord" }),

    closet.flashcard.recipes.cloze.show({ tagname: "c" }),
    closet.flashcard.recipes.cloze.hide({ tagname: "ch" }),
    closet.flashcard.recipes.cloze.reveal({ tagname: "cr" }),

    closet.browser.recipes.rect.show({ tagname: "rect" }),
    closet.browser.recipes.rect.reveal({ tagname: "rectr" }),
    closet.browser.recipes.rect.hide({ tagname: "recth" }),

    closet.flashcard.recipes.multipleChoice({
        tagname: "mc",
        defaultBehavior: closet.flashcard.behaviors.Show,
    }),
    closet.flashcard.recipes.sort({
        tagname: "sort",
        defaultBehavior: closet.flashcard.behaviors.Show,
    }),

);
2 Likes

Thanks, this code is working…

i didn’t get what you meant.

This is what i did

tools>>manage note types>> [selected the multicard and clicked fields option]
here i changed the name of cmdsall to cmds0

this ensured that the square details are coming under cmds0

latest update:: when I changed the code as suggested by @kleinerpirat, the card is working properly

Thanks all for your valuable inputs and time

1 Like

@shallash wanted to make sure that the occlusion commands in your {{cmds0}} field are inserted into the card, which is essential for them to work :wink::+1:t2:

Glad we could help you sort this issue out.

2 Likes

hi,
as you said downloaded anki 2.15 beta[https://github.com/ankidroid/Anki-Android/releases/tag/v2.15.0beta2]

but still problem continued

so I edited the closet.css file
[>>storage>> emulated/0/android/collectopn.media/_closet-0.5.3.css]
changed visibility : hidden to visibility : block [ in fact, changed it in two places in the file]

present status

  1. the cards became visible. but occlusion and close are not working…

card 1
what is the capital of Britain ----[[Ch1:: London]]

instead of closing London, it shows [[Ch1:: London]]

.
can anyone please guide me in this ??

thank you all for the support

Hi all,
I got this code from here

@@ -1,3 +1,7 @@
.android .card:not(.mathjax-rendered) {
visibility: hidden;
}

.closet–log {
color: black;
background-color: rgb(255, 147, 40);
@@ -6,7 +10,3 @@
padding: 1rem;
border-radius: 0.5rem;
}

.closet–delay {
opacity: 0;
}

Is this something that needs to be done to make closet work in ankidroid?

I downloaded the beta version as said by @shallash . Then i deleted the ankidroid and installed the APK file. but closet is not functioning still

I am a bit confused because normally you shouldn’t have to change anything to get Closet to work other than using a 2.15 alpha or beta build.

For me it’s been working ever since Henrik introduced the neccessary changes and I never had any issues with it.

I don’t think it has to do with closet.css, but with the way your note type is set up. Perhaps try it with a clean Closet install and a minimal new note type with your setup.

Hi
i’m unsure if the closet.css change is necessary anymore, since i didn’t have to do it in a fresh profile and install. But I definitely had to do it once before.

@marcus_aurelius I’m not sure where your problem lies, since closet seems to be functioning for me in 2.15alpha43 (I’ve yet to install the Beta). Could you try making a fresh anki install, a new profile (make sure to clear all media in your ankiweb too), and then syncing with a new install of ankidroid.

Occlusion issue is already addressed in the above chats…
you just need to name the cmdsall as cmds0 .
Reading the previous comment will help you to solve the issue

thank you. Hope it was helpful

what all I did

  1. made new profile in ankidroid and made a close provision in basic card type… it didn’t work. The command is simply shown there as a text.

2)later I deleted the ankidroid and installed the 2.15.43 alpha … tried the command… still same … no close function happened …

my phone is real mi note 4

Just to confirm, you did make a new profile in Anki PC and installed and set up all the required addons before doing this?

  1. made a separate profile

  2. basic card was opened with asset manager and copied this command [code given by @kleinerpirat in comment no 62 above]

  3. made a card with close>> hello [[c0:: hi this is Marcus]]… works perfectly in computer but not in ankidroid

now my ankidroid is 2.15.43 alpha…
Initially the cards were not showing anything. so i edited CSS file it as you said earlier

now the front and back of card is visible. but close function is not working

I can’t figure out what could be wrong then, if it works in the PC, it should work in AnkiDroid, try replacing the closet js and css files in your ankidroid medial folder with ones copied from your anki PC media folder

thanks for the reply

update: the card made in ankidroid works perfectly in the laptop.

In laptop i couldn’t find closet.css file [ my os is ubuntu 18]
@kleinerpirat @shallash Can you share your closet.css file here. I will replace mine with your’s then

Just make a new profile in an anki installation that has closet installed, and maybe close and open it once. The closet js and css should appear in the collection.media folder of that profile.
Just telling you this because it’s the way I replace any addon files that I mess up.

Or use this one I uploaded: 2.7 KB file on MEGA

Thanks for the reply…

update

  1. copied the file you shared… no change
  2. uninstalled the whole ankidroid… even the data files and installed the beta version…
  3. edited the css file from ‘hidden’ to ‘block’>>>> as usual the cards are visible and the closet not functioning

will wait for the official Anki update … till then I will do my review on the desktop only… Once again thanks all for your valuable time
@hengiesel, Sir your work is so good that I don’t have words to thank you. It has truly helped the students in their studies… It’s something I wished I had some years earlier… My lack of knowledge of coding made it just a wish… But you changed it to reality, not just for me but many students…
Once I start earning, I will buy you a coffee for sure…

Hello all ,
Today Ankidroid got updated to 2.15.2
I updated my ankidroid from the beta version… But still the problem of closet not functioning is continuing.

Any idea what to do now??
@hengiesel @kleinerpirat @shallash

android version- 8.1
phone - redmi note 5
:smiley:

I have two android devices, one with Android10, another with Android 8.0. I’m also using Ankidroid 2.15.2, and my closet cards are working fine with A10, but for some reason, not at all with 8, they just are showed as blank cards on the screen.

I don’t know what is exactly the problem (sorry, I haven’t read the above posts) but maybe you could try your cards with another device, just to be sure that the problem is in the cards, not in the OS.