adding openfigi as identifier for company data

This commit is contained in:
2025-11-25 22:18:52 +01:00
parent e57a013224
commit eeae94e041
13 changed files with 608 additions and 139 deletions

View File

@@ -1,8 +1,10 @@
// src/corporate/storage.rs
use super::{types::*, helpers::*};
use super::{types::*, helpers::*, scraper::get_primary_isin_and_name};
use crate::config;
use tokio::fs;
use chrono::{Datelike, NaiveDate};
use std::collections::HashMap;
use std::collections::{HashMap, HashSet};
use std::path::{Path, PathBuf};
pub async fn load_existing_events() -> anyhow::Result<HashMap<String, CompanyEvent>> {
@@ -100,7 +102,7 @@ pub async fn save_prices_for_ticker(ticker: &str, timeframe: &str, mut prices: V
Ok(())
}
pub async fn load_companies() -> Result<Vec<CompanyMetadata>, anyhow::Error> {
pub async fn _load_companies() -> Result<Vec<CompanyMetadata>, anyhow::Error> {
let path = Path::new("src/data/companies.json");
if !path.exists() {
println!("Missing companies.json file at src/data/companies.json");