Skip to content

Commit cdcbff8

Browse files
committed
[arenabuddy] fix scraper by looking for the right extension type
1 parent 7c9fc52 commit cdcbff8

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

arenabuddy/README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,30 @@ To get started with the ArenaBuddy development environment, follow these steps:
1919

2020
3. CLI Tool:
2121

22-
The consolidated CLI tool provides functionality for log parsing, card scraping:
22+
The consolidated CLI tool (`arenabuddyctl`) provides functionality for log parsing, card scraping, and more:
2323

2424
```bash
25-
# Scrape card data from online sources
26-
arenabuddy scrape
25+
# Scrape card data from local MTGA database + Scryfall enrichment
26+
# (auto-detects MTGA install path on macOS/Windows/Linux)
27+
cargo run -p arenabuddy_cli -- scrape-mtga --output ./cards.pb
28+
29+
# Optionally specify a custom MTGA install path
30+
cargo run -p arenabuddy_cli -- scrape-mtga --mtga-path /path/to/MTGA/.../Raw --output ./cards.pb
31+
32+
# Scrape card data from online sources (17Lands + Scryfall)
33+
cargo run -p arenabuddy_cli -- scrape --output ./cards.pb
2734

2835
# Parse MTGA log files
29-
arenabuddy parse --player-log /path/to/Player.log
36+
cargo run -p arenabuddy_cli -- parse --player-log /path/to/Player.log
37+
38+
# Start interactive REPL for card searches
39+
cargo run -p arenabuddy_cli -- repl --cards-db ./cards.pb
40+
41+
# Generate structured event log from a Player.log
42+
cargo run -p arenabuddy_cli -- event-log --player-log /path/to/Player.log
3043
```
3144

32-
You can get help on any command with `arenabuddy --help` or `arenabuddy <command> --help`.
45+
You can get help on any command with `cargo run -p arenabuddy_cli -- --help` or `cargo run -p arenabuddy_cli -- <command> --help`.
3346

3447
4. Project Structure:
3548

arenabuddy/cli/src/commands/scrape_mtga.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn find_mtga_database(mtga_path: Option<&PathBuf>) -> Result<PathBuf> {
108108
let path = entry.path();
109109
if let Some(name) = path.file_name().and_then(|n| n.to_str())
110110
&& name.starts_with("Raw_CardDatabase_")
111-
&& path.extension().is_some_and(|ext| ext.eq_ignore_ascii_case("rs"))
111+
&& path.extension().is_some_and(|ext| ext.eq_ignore_ascii_case("mtga"))
112112
{
113113
return Ok(path);
114114
}

0 commit comments

Comments
 (0)