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

Added support for WotLK #4

Open
wants to merge 397 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
397 commits
Select commit Hold shift + click to select a range
a2cb9fe
chore: updated catalog
invalid-email-address Jan 21, 2023
22ddfe7
chore: updated catalog
invalid-email-address Jan 21, 2023
18ecf24
chore: updated catalog
invalid-email-address Jan 22, 2023
166cf01
chore: updated catalog
invalid-email-address Jan 22, 2023
a5cc5ce
chore: updated catalog
invalid-email-address Jan 22, 2023
f1d1d0e
chore: updated catalog
invalid-email-address Jan 22, 2023
174c2bd
chore: updated catalog
invalid-email-address Jan 23, 2023
fd7a75a
chore: updated catalog
invalid-email-address Jan 23, 2023
abdd60a
chore: updated catalog
invalid-email-address Jan 23, 2023
cb81484
chore: updated catalog
invalid-email-address Jan 23, 2023
a41eb68
chore: updated catalog
invalid-email-address Jan 24, 2023
8d7048c
chore: updated catalog
invalid-email-address Jan 24, 2023
035aebe
chore: updated catalog
invalid-email-address Jan 24, 2023
35e11b0
chore: updated catalog
invalid-email-address Jan 24, 2023
90b5636
chore: updated catalog
invalid-email-address Jan 25, 2023
5e3e88d
chore: updated catalog
invalid-email-address Jan 25, 2023
aefb0d7
chore: updated catalog
invalid-email-address Jan 25, 2023
525d3f4
chore: updated catalog
invalid-email-address Jan 25, 2023
e9d4cb6
chore: updated catalog
invalid-email-address Jan 26, 2023
99d14de
chore: updated catalog
invalid-email-address Jan 26, 2023
a0be0f0
chore: updated catalog
invalid-email-address Jan 26, 2023
40f9d23
chore: updated catalog
invalid-email-address Jan 26, 2023
7570502
chore: updated catalog
invalid-email-address Jan 27, 2023
46f1dae
chore: updated catalog
invalid-email-address Jan 27, 2023
cbc8583
chore: updated catalog
invalid-email-address Jan 27, 2023
f988e73
chore: updated catalog
invalid-email-address Jan 27, 2023
9b7889f
chore: updated catalog
invalid-email-address Jan 28, 2023
52bf5ae
chore: updated catalog
invalid-email-address Jan 28, 2023
7975a6c
chore: updated catalog
invalid-email-address Jan 28, 2023
57e0bb0
chore: updated catalog
invalid-email-address Jan 28, 2023
c93777b
chore: updated catalog
invalid-email-address Jan 29, 2023
683badd
chore: updated catalog
invalid-email-address Jan 29, 2023
e534982
chore: updated catalog
invalid-email-address Jan 29, 2023
d07e2a7
chore: updated catalog
invalid-email-address Jan 29, 2023
8fa9e15
chore: updated catalog
invalid-email-address Jan 30, 2023
97c2f60
chore: updated catalog
invalid-email-address Jan 30, 2023
14779ab
chore: updated catalog
invalid-email-address Jan 30, 2023
0285565
chore: updated catalog
invalid-email-address Jan 30, 2023
9161950
chore: updated catalog
invalid-email-address Jan 31, 2023
de29973
chore: updated catalog
invalid-email-address Jan 31, 2023
a0b4a49
chore: updated catalog
invalid-email-address Jan 31, 2023
8e6d11a
chore: updated catalog
invalid-email-address Jan 31, 2023
60ff62c
chore: updated catalog
invalid-email-address Feb 1, 2023
52e0390
chore: updated catalog
invalid-email-address Feb 1, 2023
e24079e
chore: updated catalog
invalid-email-address Feb 1, 2023
d115a21
chore: updated catalog
invalid-email-address Feb 1, 2023
d7ada2b
chore: updated catalog
invalid-email-address Feb 2, 2023
96cff49
chore: updated catalog
invalid-email-address Feb 2, 2023
c8f2b98
chore: updated catalog
invalid-email-address Feb 2, 2023
fab7c29
chore: updated catalog
invalid-email-address Feb 2, 2023
48b4045
chore: updated catalog
invalid-email-address Feb 3, 2023
5e258cc
chore: updated catalog
invalid-email-address Feb 3, 2023
c07dee7
chore: updated catalog
invalid-email-address Feb 3, 2023
2c32452
chore: updated catalog
invalid-email-address Feb 3, 2023
12a8edf
chore: updated catalog
invalid-email-address Feb 4, 2023
28bc446
chore: updated catalog
invalid-email-address Feb 4, 2023
fa7b99a
chore: updated catalog
invalid-email-address Feb 4, 2023
3629dfd
chore: updated catalog
invalid-email-address Feb 4, 2023
94f6b02
chore: updated catalog
invalid-email-address Feb 5, 2023
4fae50e
chore: updated catalog
invalid-email-address Feb 5, 2023
d7a086f
chore: updated catalog
invalid-email-address Feb 5, 2023
1f1f95d
chore: updated catalog
invalid-email-address Feb 5, 2023
c3e66c5
chore: updated catalog
invalid-email-address Feb 6, 2023
16571c4
chore: updated catalog
invalid-email-address Feb 6, 2023
a14f88c
chore: updated catalog
invalid-email-address Feb 6, 2023
2086723
chore: updated catalog
invalid-email-address Feb 6, 2023
d5f8ad3
chore: updated catalog
invalid-email-address Feb 7, 2023
96bb177
chore: updated catalog
invalid-email-address Feb 7, 2023
724092b
chore: updated catalog
invalid-email-address Feb 7, 2023
bc0c665
chore: updated catalog
invalid-email-address Feb 7, 2023
5fa54c1
chore: updated catalog
invalid-email-address Feb 8, 2023
932d271
chore: updated catalog
invalid-email-address Feb 8, 2023
d9b4787
chore: updated catalog
invalid-email-address Feb 8, 2023
9302651
chore: updated catalog
invalid-email-address Feb 8, 2023
dea4826
chore: updated catalog
invalid-email-address Feb 9, 2023
8252f6d
chore: updated catalog
invalid-email-address Feb 9, 2023
4899236
chore: updated catalog
invalid-email-address Feb 9, 2023
bcabd4b
chore: updated catalog
invalid-email-address Feb 9, 2023
49105a6
chore: updated catalog
invalid-email-address Feb 10, 2023
56c338c
chore: updated catalog
invalid-email-address Feb 10, 2023
300eab0
chore: updated catalog
invalid-email-address Feb 10, 2023
cfb59f6
chore: updated catalog
invalid-email-address Feb 10, 2023
f325ee9
chore: updated catalog
invalid-email-address Feb 11, 2023
0e8fcea
chore: updated catalog
invalid-email-address Feb 11, 2023
634e72b
chore: updated catalog
invalid-email-address Feb 11, 2023
8d6ffb2
chore: updated catalog
invalid-email-address Feb 11, 2023
7c2e082
chore: updated catalog
invalid-email-address Feb 12, 2023
717ea02
chore: updated catalog
invalid-email-address Feb 12, 2023
ab5bd1b
chore: updated catalog
invalid-email-address Feb 12, 2023
9240d31
chore: updated catalog
invalid-email-address Feb 12, 2023
8312b1d
chore: updated catalog
invalid-email-address Feb 13, 2023
69d21d8
chore: updated catalog
invalid-email-address Feb 13, 2023
d3b89c1
chore: updated catalog
invalid-email-address Feb 13, 2023
bb37809
chore: updated catalog
invalid-email-address Feb 13, 2023
66faa12
chore: updated catalog
invalid-email-address Feb 14, 2023
8611992
chore: updated catalog
invalid-email-address Feb 14, 2023
bcf1719
chore: updated catalog
invalid-email-address Feb 14, 2023
2ca2e27
chore: updated catalog
invalid-email-address Feb 14, 2023
f263c84
chore: updated catalog
invalid-email-address Feb 15, 2023
c8ffdb3
chore: updated catalog
invalid-email-address Feb 15, 2023
8197ca7
chore: updated catalog
invalid-email-address Feb 15, 2023
c749fe5
chore: updated catalog
invalid-email-address Feb 15, 2023
67204ae
chore: updated catalog
invalid-email-address Feb 16, 2023
17be22d
chore: updated catalog
invalid-email-address Feb 16, 2023
748281d
chore: updated catalog
invalid-email-address Feb 16, 2023
d894ed8
chore: updated catalog
invalid-email-address Feb 16, 2023
200b9fd
chore: updated catalog
invalid-email-address Feb 17, 2023
c85743e
chore: updated catalog
invalid-email-address Feb 17, 2023
8bf910d
chore: updated catalog
invalid-email-address Feb 17, 2023
60c8e96
chore: updated catalog
invalid-email-address Feb 17, 2023
8719bc8
chore: updated catalog
invalid-email-address Feb 18, 2023
ad6a744
chore: updated catalog
invalid-email-address Feb 18, 2023
4420fda
chore: updated catalog
invalid-email-address Feb 18, 2023
efd988c
chore: updated catalog
invalid-email-address Feb 18, 2023
415efd7
chore: updated catalog
invalid-email-address Feb 19, 2023
56e80b1
chore: updated catalog
invalid-email-address Feb 19, 2023
fdbf6e1
chore: updated catalog
invalid-email-address Feb 19, 2023
5167de7
chore: updated catalog
invalid-email-address Feb 19, 2023
f08582a
chore: updated catalog
invalid-email-address Feb 20, 2023
dc8c2f3
chore: updated catalog
invalid-email-address Feb 20, 2023
5e010b3
chore: updated catalog
invalid-email-address Feb 20, 2023
426493f
chore: updated catalog
invalid-email-address Feb 20, 2023
4144c09
chore: updated catalog
invalid-email-address Feb 21, 2023
58d107f
chore: updated catalog
invalid-email-address Feb 21, 2023
03e9fe6
chore: updated catalog
invalid-email-address Feb 21, 2023
f9bc82f
chore: updated catalog
invalid-email-address Feb 21, 2023
8ec7ded
chore: updated catalog
invalid-email-address Feb 22, 2023
6f3a6cc
chore: updated catalog
invalid-email-address Feb 22, 2023
ea6a534
chore: updated catalog
invalid-email-address Feb 22, 2023
4f706b9
chore: updated catalog
invalid-email-address Feb 22, 2023
78d3a5c
chore: updated catalog
invalid-email-address Feb 23, 2023
1959e4f
chore: updated catalog
invalid-email-address Feb 23, 2023
75e3f73
chore: updated catalog
invalid-email-address Feb 23, 2023
d9a81dd
chore: updated catalog
invalid-email-address Feb 23, 2023
d19587c
chore: updated catalog
invalid-email-address Feb 24, 2023
e917534
chore: updated catalog
invalid-email-address Feb 24, 2023
f972cbd
chore: updated catalog
invalid-email-address Feb 24, 2023
2cbf4de
chore: updated catalog
invalid-email-address Feb 24, 2023
36820aa
chore: updated catalog
invalid-email-address Feb 25, 2023
18c1f36
chore: updated catalog
invalid-email-address Feb 25, 2023
fd8c506
chore: updated catalog
invalid-email-address Feb 25, 2023
af1438b
chore: updated catalog
invalid-email-address Feb 25, 2023
1a06038
chore: updated catalog
invalid-email-address Feb 26, 2023
9cdb87b
chore: updated catalog
invalid-email-address Feb 26, 2023
fe04cf3
chore: updated catalog
invalid-email-address Feb 26, 2023
0f4a1f2
chore: updated catalog
invalid-email-address Feb 26, 2023
eb8c923
chore: updated catalog
invalid-email-address Feb 27, 2023
59c9a29
chore: updated catalog
invalid-email-address Feb 27, 2023
bb55b6f
chore: updated catalog
invalid-email-address Feb 27, 2023
273be82
chore: updated catalog
invalid-email-address Feb 27, 2023
c0d2337
chore: updated catalog
invalid-email-address Feb 28, 2023
2577d52
chore: updated catalog
invalid-email-address Feb 28, 2023
db3ec7b
chore: updated catalog
invalid-email-address Feb 28, 2023
8903365
chore: updated catalog
invalid-email-address Feb 28, 2023
8dfbd74
chore: updated catalog
invalid-email-address Mar 1, 2023
f32c076
chore: updated catalog
invalid-email-address Mar 1, 2023
d8f318f
chore: updated catalog
invalid-email-address Mar 1, 2023
7d07f97
chore: updated catalog
invalid-email-address Mar 1, 2023
e065d24
chore: updated catalog
invalid-email-address Mar 2, 2023
449cb17
chore: updated catalog
invalid-email-address Mar 2, 2023
ae9a38b
chore: updated catalog
invalid-email-address Mar 2, 2023
8b2cabf
chore: updated catalog
invalid-email-address Mar 2, 2023
6d3fd57
chore: updated catalog
invalid-email-address Mar 3, 2023
4b39c34
chore: updated catalog
invalid-email-address Mar 3, 2023
4b1bced
chore: updated catalog
invalid-email-address Mar 3, 2023
1e016cb
chore: updated catalog
invalid-email-address Mar 3, 2023
64c9155
chore: updated catalog
invalid-email-address Mar 4, 2023
b0bdd85
chore: updated catalog
invalid-email-address Mar 4, 2023
d174505
chore: updated catalog
invalid-email-address Mar 4, 2023
03166d7
chore: updated catalog
invalid-email-address Mar 4, 2023
1c4074d
chore: updated catalog
invalid-email-address Mar 5, 2023
ec0a114
chore: updated catalog
invalid-email-address Mar 5, 2023
7764bfc
chore: updated catalog
invalid-email-address Mar 5, 2023
36eb50b
chore: updated catalog
invalid-email-address Mar 5, 2023
a50993f
chore: updated catalog
invalid-email-address Mar 6, 2023
7a6367e
chore: updated catalog
invalid-email-address Mar 6, 2023
3d92ed9
chore: updated catalog
invalid-email-address Mar 6, 2023
0b1e926
chore: updated catalog
invalid-email-address Mar 6, 2023
8fe95d8
chore: updated catalog
invalid-email-address Mar 7, 2023
e085dcc
chore: updated catalog
invalid-email-address Mar 7, 2023
2336067
chore: updated catalog
invalid-email-address Mar 7, 2023
a2331fd
chore: updated catalog
invalid-email-address Mar 7, 2023
1614735
chore: updated catalog
invalid-email-address Mar 8, 2023
3650c93
chore: updated catalog
invalid-email-address Mar 8, 2023
2b4a313
chore: updated catalog
invalid-email-address Mar 8, 2023
65a527c
chore: updated catalog
invalid-email-address Mar 8, 2023
e1dd027
chore: updated catalog
invalid-email-address Mar 9, 2023
df640cf
chore: updated catalog
invalid-email-address Mar 9, 2023
2232aa1
chore: updated catalog
invalid-email-address Mar 9, 2023
0fd99fa
chore: updated catalog
invalid-email-address Mar 9, 2023
f63dd9f
chore: updated catalog
invalid-email-address Mar 10, 2023
af2759f
chore: updated catalog
invalid-email-address Mar 10, 2023
f1f968e
chore: updated catalog
invalid-email-address Mar 10, 2023
a7bdfb5
chore: updated catalog
invalid-email-address Mar 10, 2023
a7f551f
chore: updated catalog
invalid-email-address Mar 11, 2023
d5eea40
chore: updated catalog
invalid-email-address Mar 11, 2023
595e509
chore: updated catalog
invalid-email-address Mar 11, 2023
60980b7
chore: updated catalog
invalid-email-address Mar 11, 2023
38306db
chore: updated catalog
invalid-email-address Mar 12, 2023
ec4ee00
chore: updated catalog
invalid-email-address Mar 12, 2023
055b338
chore: updated catalog
invalid-email-address Mar 12, 2023
f4c1674
chore: updated catalog
invalid-email-address Mar 12, 2023
2f24c01
chore: updated catalog
invalid-email-address Mar 13, 2023
0125707
chore: updated catalog
invalid-email-address Mar 13, 2023
1672e8d
chore: updated catalog
invalid-email-address Mar 13, 2023
cd84a93
chore: updated catalog
invalid-email-address Mar 13, 2023
9e206ce
chore: updated catalog
invalid-email-address Mar 14, 2023
e47e92b
chore: updated catalog
invalid-email-address Mar 14, 2023
e2ed62c
chore: updated catalog
invalid-email-address Mar 14, 2023
d7b1694
chore: updated catalog
invalid-email-address Mar 14, 2023
27484cc
chore: updated catalog
invalid-email-address Mar 15, 2023
0d9aba6
chore: updated catalog
invalid-email-address Mar 15, 2023
4216974
chore: updated catalog
invalid-email-address Mar 15, 2023
b3c5b2b
chore: updated catalog
invalid-email-address Mar 15, 2023
b831bb5
chore: updated catalog
invalid-email-address Mar 16, 2023
f6d16d7
chore: updated catalog
invalid-email-address Mar 16, 2023
76b91d0
chore: updated catalog
invalid-email-address Mar 16, 2023
6f823dd
chore: updated catalog
invalid-email-address Mar 16, 2023
643cc5b
chore: updated catalog
invalid-email-address Mar 17, 2023
363d07e
chore: updated catalog
invalid-email-address Mar 17, 2023
c863663
chore: updated catalog
invalid-email-address Mar 17, 2023
ec1467d
chore: updated catalog
invalid-email-address Mar 17, 2023
b458aed
chore: updated catalog
invalid-email-address Mar 18, 2023
709a114
chore: updated catalog
invalid-email-address Mar 18, 2023
836d8e8
chore: updated catalog
invalid-email-address Mar 18, 2023
bc2034c
chore: updated catalog
invalid-email-address Mar 18, 2023
ec9da77
chore: updated catalog
invalid-email-address Mar 19, 2023
f53b9d4
chore: updated catalog
invalid-email-address Mar 19, 2023
95b6984
chore: updated catalog
invalid-email-address Mar 19, 2023
9631d6f
chore: updated catalog
invalid-email-address Mar 19, 2023
861f511
chore: updated catalog
invalid-email-address Mar 20, 2023
9580c00
chore: updated catalog
invalid-email-address Mar 20, 2023
c8b06e1
chore: updated catalog
invalid-email-address Mar 20, 2023
c1b50fe
chore: updated catalog
invalid-email-address Mar 20, 2023
0bc2078
chore: updated catalog
invalid-email-address Mar 21, 2023
fc3ca38
chore: updated catalog
invalid-email-address Mar 21, 2023
56da3d4
chore: updated catalog
invalid-email-address Mar 21, 2023
cd22381
chore: updated catalog
invalid-email-address Mar 21, 2023
3caf18f
chore: updated catalog
invalid-email-address Mar 22, 2023
23d0e28
chore: updated catalog
invalid-email-address Mar 22, 2023
76ebef4
chore: updated catalog
invalid-email-address Mar 22, 2023
4610ecb
chore: updated catalog
invalid-email-address Mar 22, 2023
cd27bb4
chore: updated catalog
invalid-email-address Mar 23, 2023
6fd84c5
chore: updated catalog
invalid-email-address Mar 23, 2023
182b6ab
chore: updated catalog
invalid-email-address Mar 23, 2023
5367759
chore: updated catalog
invalid-email-address Mar 23, 2023
19ee508
chore: updated catalog
invalid-email-address Mar 24, 2023
ade4261
chore: updated catalog
invalid-email-address Mar 24, 2023
f325d59
Disabled Tukui
sikrinick Oct 20, 2023
eda1f2f
Merge remote-tracking branch 'origin/main'
sikrinick Oct 20, 2023
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: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Create Catalog

jobs:
fetch:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Fetch addon data
steps:
- uses: actions/checkout@v2
Expand All @@ -32,9 +32,9 @@ jobs:
run: |
git config user.name github-actions
git config user.email [email protected]
git add catalog-0.2.0.json
git add catalog-0.3.0.json
git commit -m "chore: updated catalog"
git push
- name: Test
run: |
jq '. | length' ./catalog-0.2.0.json
jq '. | length' ./catalog-0.3.0.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
/target
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "catalog"
version = "0.2.0"
version = "0.3.0"
authors = ["Casper Rogild Storm"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This repository generates a JSON file which is used in [Ajour](https://github.com/ajour/ajour/).
The JSON file contains all available addons from:

- Curse
- Curse (temporary disabled)
- Tukui
- WowInterface
- Hub
Expand Down
12 changes: 12 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
fn main() {
let target_os = std::env::var("CARGO_CFG_TARGET_OS");
match target_os.as_ref().map(|x| &**x) {
Ok("macos") => {
print!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.11")
}
Ok("windows") | Ok("linux") => {
// noop
}
tos => panic!("unknown target os {:?}!", tos),
}
}
1 change: 1 addition & 0 deletions catalog-0.3.0.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion crates/core/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ pub enum Flavor {
alias = "burning_crusade"
)]
ClassicTbc,
#[serde(alias = "wotlk")]
ClassicWotlk,
ClassicPtr,
ClassicBeta,
}
Expand All @@ -69,6 +71,7 @@ impl std::fmt::Display for Flavor {
Flavor::RetailBeta => "retail_beta",
Flavor::ClassicEra => "classic_era",
Flavor::ClassicTbc => "classic_tbc",
Flavor::ClassicWotlk => "classic_wotlk",
Flavor::ClassicBeta => "classic_beta",
Flavor::ClassicPtr => "classic_ptr",
}
Expand All @@ -81,7 +84,8 @@ impl Flavor {
pub fn base_flavor(self) -> Flavor {
match self {
Flavor::Retail | Flavor::RetailPtr | Flavor::RetailBeta => Flavor::Retail,
Flavor::ClassicTbc | Flavor::ClassicPtr | Flavor::ClassicBeta => Flavor::ClassicTbc,
Flavor::ClassicWotlk | Flavor::ClassicPtr | Flavor::ClassicBeta => Flavor::ClassicWotlk,
Flavor::ClassicTbc => Flavor::ClassicTbc,
Flavor::ClassicEra => Flavor::ClassicEra,
}
}
Expand Down
10 changes: 9 additions & 1 deletion crates/core/src/backend/tukui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ fn endpoint_for_addons(flavor: &Flavor) -> String {
Flavor::ClassicTbc => {
format!("{}?classic-tbc-addons=all", base_endpoint)
}
Flavor::ClassicWotlk => {
format!("{}?classic-wotlk-addons=all", base_endpoint)
}
_ => panic!("Unknown base flavor {}", flavor),
}
}
Expand All @@ -83,7 +86,12 @@ fn endpoint_for_elvui() -> String {
}

pub async fn get_addons() -> Result<Vec<Addon>, Error> {
let flavors = vec![Flavor::Retail, Flavor::ClassicEra, Flavor::ClassicTbc];
let flavors = vec![
Flavor::Retail,
Flavor::ClassicEra,
Flavor::ClassicTbc,
Flavor::ClassicWotlk,
];
let mut addons: Vec<Addon> = vec![];
for flavor in flavors.iter() {
match flavor.base_flavor() {
Expand Down
3 changes: 3 additions & 0 deletions crates/core/src/backend/wowinterface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ fn flavor_for_category_id(id: i32) -> Flavor {
match id {
160 => Flavor::ClassicEra,
161 => Flavor::ClassicTbc,
162 => Flavor::ClassicWotlk,
_ => Flavor::Retail,
}
}
Expand All @@ -73,6 +74,8 @@ fn guess_flavor_from_version(version: &str) -> Option<Flavor> {
Some('1') => Some(Flavor::ClassicEra),
// 2.x.x
Some('2') => Some(Flavor::ClassicTbc),
// 3.x.x
Some('3') => Some(Flavor::ClassicWotlk),
_ => None,
}
}
Expand Down
30 changes: 19 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use core::{
backend::{Backend, Source::*},
backend::{Addon, Backend, Source::*},
error::Error,
};
use futures::{executor::block_on, try_join};
use futures::executor::block_on;
use futures::future::join_all;
use std::fs::File;
use std::io::Write;
use structopt::StructOpt;
Expand All @@ -19,16 +20,23 @@ async fn handle_opts() -> Result<(), Error> {
match opts.command {
// Generate a JSON file with all backend sources combined.
Command::Catalog => {
let (tukui, wowi, curse, hub) = try_join!(
Tukui.get_addons(),
WowI.get_addons(),
Curse.get_addons(),
Hub.get_addons()
)?;
// Combine all addons.
let concatenated = [&tukui[..], &wowi[..], &curse[..], &hub[..]].concat();
let addons: Vec<Addon> = join_all(
vec![
// Curse, // Disabled. Not working
// Tukui, // Disabled. Not working
WowI,
Hub,
]
.iter()
.map(|x| x.get_addons()),
)
.await
.into_iter()
.map(|x| x.unwrap())
.flatten()
.collect();
// Serialize.
let json = serde_json::to_string(&concatenated)?;
let json = serde_json::to_string(&addons)?;
// Create catalog file.
let file_name = format!("catalog-{}.json", VERSION.expect("no version was found"));
let mut file = File::create(file_name)?;
Expand Down