Commit graph

26 commits

Author SHA1 Message Date
89fa69e3c8 refactor: extract lib.rs, remove club module, add bounded concurrency
- Extract shared types (Car, BestCarRecord, AnalysisContext) into src/lib.rs
- Replace global static BEST_CARS with injected AnalysisContext for testability
- Add semaphore-bounded concurrency (limit 20) in parse_all_times()
- Replace hardcoded track name match with track_names.json loaded via include_str!
- Replace magic number 115 with const MAX_RQ: u8 = 113
- Improve floating-point tie comparison with TIME_TOLERANCE (5ms) constant
- Remove src/club.rs binary (topdrives.club no longer maintained)
- Remove scraper dependency from Cargo.toml
- Remove tracks.txt (replaced by track_names.json)
- Remove empty/placeholder test bodies
- Improve error handling in get_file() for response body read
- Add load_my_cars_data() combining owned + wishlist extraction in one I/O
- Update CHANGELOG, README, and all docs to reflect changes
2026-05-06 20:20:15 +02:00
6a68469239 Modernize dependencies, add wishlist features, improve error handling
- Remove once_cell and serde dependencies; use std::sync::LazyLock
  and manual serde_json::Value parsing instead
- Add wishlist support: load wishlist from my_cars.json, prefix
  missing cars with '+' in missing mode, add 'wishlist' command
  to show stale wishlist entries (prefixed with '-')
- Replace unwrap()/expect() with graceful eprintln warnings and
  early returns throughout (get_car_list, parse_car_times, etc.)
- Scope all Mutex locks tightly to avoid holding during I/O
  (print_best_times, print_best_cars, print_trash, print_wishlist_stale)
- Replace custom split_prefix_postfix with str::split_once
- Pass owned-car set into parse_all_times/parse_car_times via
  Arc<HashSet> instead of reading file per task
- Consolidate my_cars.json loading into single load_my_cars_data()
  returning both owned and wishlist sets
- Add .gitignore and Cargo.lock to version control
- Report task failures in parse_all_times join loop
2026-05-06 00:30:56 +02:00
32c4d3c10e Added documentation
Added test cases
Added comments
2025-10-02 17:35:56 +02:00
7a8d9beedc Exclude RQ 80+ from trash 2025-06-17 13:10:16 +02:00
a109940c5d Fixed warning
Exclude prize cars from trash
2025-06-16 16:07:11 +02:00
b8433909fd Added trash feature 2025-06-16 11:42:39 +02:00
48e623a1a3 Added feature for missing cars 2025-06-16 11:07:14 +02:00
4e299db3c0 Corrected handling of tied times 2025-05-29 10:47:05 +02:00
ad60ab1b11 Sort by RQ and car name rather than RQ and occurences 2025-04-25 09:17:54 +02:00
4a21a552d7 Fixed a bug that was miscounting the best time occurences for cars 2025-04-24 17:30:48 +02:00
5dd278b8f1 Fix: For the best cars the highest RQ of any given track where they were best was printed, instead of the car's RQ. The list was also sorted by that wrong RQ 2025-04-02 14:53:35 +02:00
1a6ea07ed9 Get rid of DB, parse into memory 2025-03-31 12:15:01 +02:00
12a3868a46 Fixes and preparation for in-memory solution 2025-03-30 17:07:36 +02:00
02ff6eddb2 Multi-threaded fetch 2025-03-30 16:33:04 +02:00
431ea2814b Implemented search for best car for track 2025-03-28 16:21:07 +01:00
21e53eb9e2 Perform parsing in-memory 2025-03-28 15:47:09 +01:00
137ebde68b Caching SQL INSERTS 2025-03-23 10:35:55 +01:00
2fa2966aaa Update to TD Records and new cars 2025-02-13 08:18:05 +01:00
5783bb4826 Bugfix: Overflow in the counter 2024-11-21 14:08:31 +01:00
e565866ba8 Added counter for tracks the cars are best for in the non-detailed output 2024-11-21 10:44:43 +01:00
195a306b79 Corrected executable name
Incremented version
Removed outdated imports
2024-10-20 14:07:07 +02:00
a495f4d4d7 Introduced switch for detailed track output 2024-10-19 15:46:32 +02:00
e2efe052b5 Fix: if no rq10 car finishes, the track's best car is not in the list 2024-10-18 15:49:46 +02:00
5c3a05d2e6 Fixed an error with unknown track ids
Fixed track list
2024-10-18 08:11:01 +02:00
Jan-Peter von Hunnius
abda9a3313 Added the tracks a car ist best for to the output plus the car's configuration 2024-10-16 16:24:39 +02:00
Jan-Peter von Hunnius
3a826e3903 Copied initial source 2024-10-16 11:24:12 +02:00