Ultimate Birds deck

Hi everyone,
I tried to change the translation to Chinese but I don’t know how to do it properly.
I changed the back template to this:

{{^Danish}}{{Chinese}}{{/Danish}}

but it didn’t work.
What should I do?

The default language is Danish. Change to this to make it Chinese:

<div class="title">
	<b>{{Chinese}}

	<!-- If there is no translation, English name is shown: -->
	{{^Chinese}}{{English}}{{/Chinese}}
</b></div>

Note that you can additionally include Chinese-traditional if relevant.

3 Likes

Thank you! It helps a lot!

For future reference:

How to change the language

From the front page, open the browser:

Select a card from the deck and open the card template:

Navigate to the “Back Template” and change language three places from “Danish” to e.g. “Spanish”:

Then change the card type in the drop-down menu and do the same thing for the other card type:

Remember to click “Save” when done.

1 Like

Hi,
I’ve seen in the thread instruction, on how to download sounds.
Is there an easy way to download images, for offline use?

If you use Localize Media with the default deck, only images will be downloaded. If you first switch the audio player, then both images and audio will be downloaded.
Also remember you can adjust the image resolution of the images before downloading.

2 Likes

I updated the deck to follow Clements v2024 as well as a few extra improvements.

If you don’t want your mnemonics to be overwritten when updating, use the Special Fields addon.

When importing the updated deck, check “Merge note types” and set “Update notes” and “Update note types” to “Always”.
Then query "deck:Ultimate Birds" -tag:UB::version-2025-03-08 and delete the notes (they were split/lumped).

Edit: It is no longer necessary to switch audio player before downloading media. Updated instructions:

Downloading media

If you want to be able to use the deck offline and have faster loading, you can download media. For the images, you can optionally change the resolution before downloading as described in the desk’s description. And if you don’t want the audio to be downloaded, see below.

To download media get the addon Localize Media and localize only the cards you need. It takes about one hour for 100 notes, so do a few at a time.
You can expect 500 notes to take up approximately 2GB of space.

Avoiding localizing audio

If you only want to localize the photos and not audio or spectrograms, first do “Notes” → “Find and Replace” src=" with src_=" in the Sounds field.
Then localize the media, and afterwards fix the sounds field again by replacing src_=" back with src=".

Thank you for putting together this deck, it’s great!

The one challenge I had was even limiting the birds down to just my state it was still a lot of species. And many of those species weren’t actually in my area due to seasonal migrations or just the wide variety of ecosystems in my state (oceans, rain forest, mountains, deserts, etc.), so it wasn’t really helping me to ID the birds I was seeing on a regular basis.

To fix that I built a quick tool that pulls the recent eBird sightings in the area and then generates the filter string for your deck, so I could focus on the birds that are currently in the area. Then every week or two I pull the recent sightings again and update the deck to get any new species in the area.

Thought it might be helpful for others, so I cleaned it up a bit and posted it here: https://punteney.com/bird-id

Let me know if any questions or problems.

1 Like

Wow, this is really great!
It could have been nice if the eBird API had made it easy to select an interval of dates, but I see that you can only select a single date and also need to provide a specific location code, so I think that is a little difficult.

Just some small things:
When I move the pin location on the tool, the radius does not move with it.
And in the steps you don’t need to write “select the Ultimate Birds deck” since you already add that to the queries.
You can also consider adding that it should be a “Common” species in the specific region so you still do not unsuspend rare occurrences.

Anyways, I added a link in the deck description, thanks for sharing!

Yeah, my first thought was to be able to chose the date as well. eBird does have a “historic observations” API that lets you specify date and get sigthing in the region/sub-region. I may mess with it at some point, and see how useful it is.

Thank you for the bug catch/suggestions! I fixed the radius not moving, and removed the extra step in the directions.

The common species is a good idea, it has a potential edge cases with if the radius goes across more than one region.

The simplest way, and maybe it would be good enough, would be to just use the region the selected point is in and do the common check based on that. Basically, assume if it’s rare in that region it will be rare within the whole selected radius.

The ideal would probably be to get any of the regions that the selected radius is in and include any species that is common in any of the regions. I haven’t looked into it yet, but I’m guessing determining all the regions the selected radius goes across could be a pain.

I’ll play around with it and see what I can come up with, but open to any thoughts or suggestions.

Thanks again for putting together this deck, it’s really well done!

1 Like

Hi Bjoe,

Thanks a lot for the add-on and the clear instructions!

I’ve been using Localize Media and it works well for downloading images, but I can’t seem to get it to download the audio files.

Is there anything to do to make sure the audio gets downloaded as well? Or are the audio files downloaded somewhere else ( I doesn’t seem like it since offline images works for me but not audio)

Thanks in advance for your help!

Which platform are you using? I recently simplified the instructions as it worked on Windows.

I am using the desktop app on Mac

Updated instructions:

Downloading media

If you want to be able to use the deck offline or have faster loading, you can download media. For the images, you can optionally change the resolution before downloading as described in the desk’s description. If you also want the audio to be downloaded, you have to change the audio player before continuing, see below (not necessary on Windows).

To download media get the addon Localize Media and localize only the cards you need. It takes one hour for about 100 notes, so do a few at a time.
You can expect 500 notes to take up approximately 2GB of space.

Switch to Anki’s audio player before downloading

To be able to download audio, you have to follow these instructions before localizing media.
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-aud" class="container"></div>
</a>
<div class="container btn-container">
	<button id="btn" onclick="next_sound()">
		<a class="reroll hidden-a" href="#"><b> ↻ </b></a>
	</button>
</div>
<div id="sound-data" style="display: none">{{Sounds}}</div>


<script type="text/javascript">
var elements = document.querySelector('#sound-data').children;
var randomIdx = Math.floor(Math.random() * elements.length);

if (elements.length <= 1) {
	document.querySelector('#btn').style.display = "none";
}

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

function play_sound() {
	// Hide sonogram
	elements[randomIdx].querySelector('img').style.display = 'none';

	document.querySelector('#front-aud').innerHTML = elements[randomIdx].outerHTML;
	document.querySelector('#front-aud').querySelector('.replay-button').click();
}

play_sound();

// Adds eventlistener on first card only
if (!window.audioListenerAdded) {
	document.addEventListener('keyup', function(event) {
		var frontAud = document.querySelector('#front-aud');

		// Only use shortcut on this card type
		if (frontAud) {
			var key = event.key || event.keyCode;
			var selectedAudio = frontAud.querySelector('audio');

			if (key === 'r' || key === 'R') {
				play_sound();
			} else if (key === 'n' || key === 'N') {
				next_sound();
			}
		}
	});
	window.audioListenerAdded = true;
}
</script>
{{/Sounds}}

And in the styling template, replace

.hidden-a {
	color: inherit !important;
	cursor: inherit;
	text-decoration: inherit;
	-webkit-tap-highlight-color: transparent;
	width: 100%;
}

with

.hidden-a {
	display: contents;
}

Finally go to the deck options and enable “Don’t play audio automatically”. Then once you localize media, the audio should play automatically as JavaScript is used to play a random sound.

2 Likes

Just tested and it works perfectly ! Thanks for you help ( and for the wonderful deck) !

2 Likes