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

Interactive Map For Experimental Deck #644

Merged
merged 45 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
faf126d
Experimental deck infrastructure integration
helitopia Jul 28, 2024
862ecf5
Assets location move
helitopia Jul 28, 2024
8569aca
European country region codes introduction
helitopia Jul 28, 2024
b94ca3f
Green/Red switch implemented + scripting code readability changes
Jul 29, 2024
cb60b67
Interactive map / static fallback manual switch implemented
Jul 29, 2024
920aac4
Turn card to answer on region select enable/disable switch implemented
Jul 29, 2024
11fda94
Empty region code handling
Jul 29, 2024
940e355
Defensive static fallback implemented
Jul 30, 2024
9d217a5
Interactive map switch for mobile
Jul 30, 2024
ef4ca29
Tooltip accumulation when card reviewing issue hotfix
Jul 30, 2024
39a015b
Tooltip on answer side switch + mobile hack removed
Jul 31, 2024
0a96924
Major code refactoring
Jul 31, 2024
4dc7626
Script renamed due to codebase conformity considerations
Aug 1, 2024
384e568
Refactoring - group colors into constant object
Aug 1, 2024
7477248
Move out map selector into common properties
Aug 1, 2024
918f6fb
Move out selectors into common properties object
Aug 1, 2024
373b39b
Swapping to back card side logic refactoring
Aug 1, 2024
f349a76
Replace common selectors with direct elements
Aug 1, 2024
805d227
Configuration refactoring
Aug 1, 2024
76b5c07
Mobile dragging hack implemented
Aug 1, 2024
ab96b39
sessionStorage shorthand + map initialization condition refactoring
Aug 1, 2024
b1e6381
Configuration retrieval bug fix
Aug 2, 2024
a175b92
Additional map safety layer
Aug 2, 2024
05d0a5c
Stylesheets merge
Aug 2, 2024
9870756
Centralization of "magic" strings
Aug 2, 2024
edf01fb
Integrate high-detail map
Aug 2, 2024
15fc043
Zoom max level increase to improve UX
helitopia Aug 3, 2024
027afe0
Configuration extraction
helitopia Aug 3, 2024
58b688f
Green/Red region switch removal + config property names update
helitopia Aug 3, 2024
4f78252
Media folder structure flattening
helitopia Aug 3, 2024
a6692f0
Configuration flexibility improvement
helitopia Aug 3, 2024
c68fd31
Increase map canvas height and remove bottom margin
Aug 5, 2024
d20ea91
Card region code verification added
Aug 5, 2024
0c041ba
Interactive map on all front cards implemented
Aug 5, 2024
b8d283a
UN region codes introduction + main.csv merge
Aug 5, 2024
827ba6d
Final regions list formation + map region names alignment
Aug 6, 2024
5b0bcaa
Low detail map removed
Aug 6, 2024
8e58423
Infrastructure correction for multilingual deck creation
Aug 6, 2024
f136b6f
Zoom max level adjust
Aug 6, 2024
aae7738
Link to documentation added + codebase cleanup
helitopia Aug 17, 2024
ba0a8e3
Assets rename with intent of media file names collision avoidance
helitopia Aug 11, 2024
9c1fd74
jsvectormap licensing added
helitopia Aug 11, 2024
46e48f8
GitHub workflow adaptation to verify experimental deck creation
helitopia Aug 12, 2024
9b56f16
User configuration move to note template
helitopia Aug 12, 2024
0f09943
Experimental deck UUID update
Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/integrity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ jobs:
python3 -m pip install --upgrade pipenv
pipenv install

- name: Validate
- name: Validate regular & extended decks
run: |
pipenv run build

- name: Validate experimental deck
run: |
pipenv run build_experimental

# TODO: Validate the csv file structure
4 changes: 4 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ The sources and licenses of the flags (`ug-flag-...`) and maps (`ug-map-...`) in
`sources.csv` references only the licenses of the files themselves. Some flags, like the [European Union flag](https://www.coe.int/en/web/about-us/the-european-flag#column-5), may come with additional copyright restrictions.

All images have been optimised, resized and/or converted to reduce file size. Any further modifications are listed in the _Modifications_ column.

## jsvectormap

[MIT License — Copyright (c) 2020 Mustafa Omar](https://github.com/themustafaomar/jsvectormap/blob/main/LICENSE)
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ python_version = "3.7"

[scripts]
build = "brain_brew run recipes/source_to_anki.yaml"
build_experimental = "brain_brew run recipes/source_to_anki_[experimental].yaml"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The deck is available in **English**, **German**, **Spanish**, **French**, **Nor

## Features

The standard version of the deck comes with four note templates: _Country - Capital_, _Capital - Country_, _Flag - Country_, and _Map - Country_. An **extended version** is also available, with two additional note templates: _Country - Flag_ and _Country - Map_.
The standard version of the deck comes with four note templates: _Country - Capital_, _Capital - Country_, _Flag - Country_, and _Map - Country_. An **extended version** is also available, with two additional note templates: _Country - Flag_ and _Country - Map_. The [experimental version](https://github.com/anki-geo/ultimate-geography/wiki/Experimental-extended-deck) is a clone of extended version except it also provides interactivity for the _Country - Map_ note template.

<table>
<tr><th scope="col" colspan="2">Flag - Country</th></tr>
Expand Down Expand Up @@ -103,9 +103,10 @@ In order to install and later upgrade _Ultimate Geography_, you'll need to first
You're now ready to install _Ultimate Geography_:

1. Go to the **[_Releases_ page](https://github.com/anki-geo/ultimate-geography/releases)**.
1. In the latest release's _Assets_ section, download the ZIP archive of the version of the deck you'd like to use. You can choose between [a standard and an extended version](#features) in a number of [languages](#ultimate-geography) -- for instance, if you're after the standard German deck, download `Ultimate_Geography_v[...]_DE.zip`.
1. In the latest release's _Assets_ section, download the ZIP archive of the version of the deck you'd like to use. You can choose between [a standard, extended and experimental version](#features) in a number of [languages](#ultimate-geography) -- for instance, if you're after the standard German deck, download `Ultimate_Geography_v[...]_DE.zip`.
1. Extract the content of the archive on your computer.
1. Open Anki and make sure your devices are all synchronised.
1. Create [a manual backup](https://docs.ankiweb.net/backups.html#creating) via _File -> Create Backup_ in case something goes wrong.
1. In the _File_ menu, select _CrowdAnki: Import from disk_.
1. Browse for and select the folder you extracted from the archive, which contains the deck's JSON file and `media` folder -- e.g. `Ultimate Geography [DE]`.
1. Don't change anything in the _CrowdAnki Import Settings_ dialog box that opens -- just press _OK_ to start the import. A dialog box should then confirm that the import was successful.
Expand Down
11 changes: 7 additions & 4 deletions recipes/source_to_anki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
name: Ultimate Geography [ZH]

- media_group_from_folder:
- part_id: all_media
source: src/media
- part_id: maps
source: src/media/maps
recursive: true
- part_id: flags
source: src/media/flags
recursive: true


Expand Down Expand Up @@ -361,7 +364,7 @@
<<: &default_crowd_anki_gen
headers: default header
media:
parts: [all_media]
parts: [maps, flags]
note_models:
parts:
- part_id: Ultimate Geography
Expand Down Expand Up @@ -443,7 +446,7 @@
<<: &extended_deck
headers: default header
media:
parts: [ all_media ]
parts: [ maps, flags ]
note_models:
parts:
- part_id: Ultimate Geography [Extended]
Expand Down
Loading
Loading