Ultimate Birds deck

That did it! Thank you for working so hard on this.

Perfect, thank you for your help and patience

Just FYI: I recently got access to an iOS device and have updated the deck to look more like Anki Desktop on the AnkiMobile platform :slight_smile:

Thanks a lot, I was looking for an Anki deck like that !

I’m living in Ecuador, and there are so many species there. Would it be possible to separate species by regions in Ecuador/Peru/Colombia ? The 3 countries are so diverse, and the difference between coast/Andes/jungle is really huge.

If it’s not possible or takes too much time, no problem. I will use your Anki deck no matter what :slight_smile:

Yeah it’s pretty crazy how many species you’ve got!

The only regions I can add are the ones on Avibase here. I don’t know the geography, but should I just add regions and subregions (e.g. provinces for Ecuador) of the three countries?

For Ecuador, if you add the regions (Costa, Sierra, Oriente, Insular, mainland), that would be perfect ! Provinces could be great too.

I guess it would be the same for Colombia / Peru (regions more than provinces) :slight_smile:

I added the regions, but looks like you still have quite a few species to study.
Remember you can suspend species from a specific taxonomic order if it becomes too much.

Anyways, good luck with your studying!

So nice, thanks a lot !
I upgraded the deck, thanks !!

Switching to Anki’s audio player

The audio player used as default is a html5 player, but it doesn’t work as good/fast as Anki’s “built-in” player.
On Linux and AnkiMobile, the built-in player can’t play audio from urls (the player works if you also download, see below). If you are not using these platforms you can switch to the built-in player by following these instructions:

Select the cards of the deck,
Notes>Find and replace, check “treat as regular expression” and replace
<audio controls="" controlslist="nodownload noplaybackrate"><source src="(.*?)" type="audio/mpeg"></audio>
with
[sound:${1}]

Then replace the entire front card template of Sound to name with the following:

{{#Sounds}}

<br><br>
<a class="hidden-a" href="#">
	<div id="front" class="container">
		{{Sounds}}
	</div>
</a>
<div class="container btn-container">
	<button id="btn" onclick="next_sound()">
		<a class="reroll hidden-a" href="#"><b> ↻ </b></a>
	</button>
</div>
<p id="console"></p>

<script type="text/javascript">
try {
	var elements = document.getElementById('front').getElementsByClassName('aud-w-txt');
	var randomIdx = Math.floor(Math.random() * elements.length);
	play_sound();

	if (elements.length == 1) {
		document.getElementById("btn").style.display = "none";
	}

	function next_sound() {
		randomIdx = (randomIdx + 1) % elements.length;
		play_sound();
	}

	function play_sound() {
		for (var i = 0; i < elements.length; i++) {
			elements[i].style.display = (i == randomIdx ? "flex" : "none");
		}
		document.getElementById('front').getElementsByClassName('replay-button')[randomIdx].click();
	}

	// Adds eventlistener on first card only
	const element = document.getElementById('qa');
	if (element.getAttribute('listener') !== 'true') {
		document.addEventListener('keyup', function(event) {
			var key = event.key || event.keyCode;

			if (key == 'R' || key == 'r') {
				play_sound();
			} else if (key == 'N' || key == 'n') {
				next_sound();
			}
		});
		element.setAttribute('listener', 'true');
	}
} catch (error) {
	document.getElementById('console').innerHTML = error;
}
</script>
{{/Sounds}}

Finally go to the deck options and enable “Don’t play audio automatically” and you’re done (the audio will still play automatically as JavaScript is used to play a random sound).

Downloading media

The entire deck has media worth of something like 100GB, which is why references to urls are used, but if you want, you can download media after switching to Anki’s audio player as described above (otherwise audio won’t be downloaded).
The problem is just that this method is very slow. We’re talking 100 notes/hour slow, so consider not downloading, but anyways here are some instructions:

Choose what to download

You can as explained in the deck’s description change the image quality, but also, if you don’t want to download 10 audio files for each note you can delete some of them so there are only e.g. 5 audio files per note by replacing (as regular expression)
((?:<div class="aud-w-txt">.*?</div></div>){5}).*
with
${1}
Just replace the 5 with however many you want to keep.

Downloading with Localize Media

To download images and audio get the addon Localize Media, and use it on only the cards you need (it is slow so do a few at a time).
Afterwards select the cards and replace (\[sound:.*?)\.\] with ${1}] and it should work.

2 Likes

Love the deck! Just one thing - maybe it would be better to have all of the country tags nested under one parent tag for the deck. At the moment, when you import the deck, all of your existing tags get lost amongst the ones from the deck.

Done. You can update the deck now. Then please run Notes > Clear Unused Tags to get rid of the old ones.

1 Like

Ich habe das wundervolle Deck auf mein Tablet runtergeladen und habe nach Vögeln in Deutschland gefiltert, da ich nur diese lernen möchte
Die anderen benötige ich nicht, wĂŒrde also gerne die entsprechenden, nicht benötigten löschen, nach dem ich die aus Deutschland in einen neuen Stapel geparkt habe. Das verschieben hat leider nicht geklappt. Ich kann sie markieren, aber keinem anderen Stapel hinzufĂŒgen. Warum klappt das nicht, und wie kann ich nun die deutschen Vögel lernen, ohne meinen Speicher unnötig zu belasten?

Instead of selecting the birds in your country, you should select the birds not in your country like so:
-tag:UB::Germany::Common

After selecting them (“Edit > Select All”), you can suspend them (right click and “Toggle Suspend”) and they won’t show up when studying the deck.

You can also delete them (right click and “Notes > Delete”) if you are sure you are not going to need them later, but note that if you want to keep e.g. only the image card for a specific note and don’t want to study the sounds for that bird, you have to suspend the sound card because if you delete it, the image card will also be deleted.

I was afraid I messed up something, because all of the sounds stopped working today.
But inspecting the element and reading the console gave a bunch of that:

Failed to load resource: the server responded with a status of 503 ()

And pressing the “next sound” button gave me:

GET [xeno-canto link I am not allowed to include] 503

And I visited that link, where it says that they are in maintenance.
So my guess is, we are getting the sounds from that domain, and if they fail to serve the media, our cards stop working, is that it?
If so, is there a way to code something and inform us, end-users, that some error happened and that we should just wait?

Awesome deck by the way, I can’t thank you enough for it :slight_smile:

This is one of the disadvantages by using external media instead of downloading, but it is the only option if the deck needs so much media.
On https://xeno-canto.org/ it says they were updating their taxonomy and that they should be up again now. The media works for me currently, so try and see if it works for you too.
If you experience this problem again you can try and see the front page if they are down for maintenance.

That being said, if you don’t want to rely on streaming the audio, you can check out my notes further up on how to download media.

Yes it’s up again, thanks! I’ll keep their link somewhere so I can see their status if I ever experience a problem :slight_smile:

1 Like

Hi! This deck is awesome! I would like to know if you could share with us your scripts to generate the deck? I would like to do some modifications and right now I don’t know how to do this except from using AnkiConnect, etc.

Your tag system is very good, but the one in your Cities deck is better because of the “cities::” prefix, I would like to reproduce this with the birds tags.

Anyway, thank you very much!!!

Hi, I probably won’t be sharing the scripts for this deck, but as other people also requested the prefix tags, I added it a while ago to the deck. You can update by redownloading the deck, but if you have made any changes like using the “Mnemonics” field, they will be overwritten. Instead you can do this to your local deck to add the prefix to all tags:

  1. Search for “deck:Ultimate Birds” and select all cards/notes.
  2. Run Notes > Find and Replace
  3. Find: (.*) Replace: UB::${1} In: Tags (check “Selected notes only” and “Treat as regular expression” then press ok)

After either updating or doing the above, run Notes > Clear Unused Tags.

If there are other things you would like to change with the deck I am open for suggestions. Also, you can always export the deck as .tsv file and handle the data externally if you need to.
Glad you like my deck!

Yeah I already made some changes but the regex tip is a good one, thanks!

I don’t think that the changes I would like to do could be useful to others. I downloaded the medias and I get some files with a size >100Mo because of the length of the recording on xeno-canto
 I think I can use the API to correct this.

Hi, very cool deck, but can you please make an offline version, i don’t work online.
and a USA bird deck would be awesome too, 9900 is just too much, thank you!!!