From 31a2b2754a019fdfce51136ee1a182a0f555f454 Mon Sep 17 00:00:00 2001 From: kvillers Date: Wed, 6 May 2026 10:42:44 +0200 Subject: [PATCH] spelling --- QWEN.md | 105 ---------------------------------------------------- src/main.rs | 2 +- 2 files changed, 1 insertion(+), 106 deletions(-) delete mode 100644 QWEN.md diff --git a/QWEN.md b/QWEN.md deleted file mode 100644 index 39d92d5..0000000 --- a/QWEN.md +++ /dev/null @@ -1,105 +0,0 @@ -# Antares -> Octopus 8 - -Rust utility to fetch product data from Antares B2B and export to Excel which can be imported by Octopus 8. - -## Quick Start - -Linux / MacOS: - -```bash -cp .env.example .env -# Edit .env with your credentials and output path -cargo build --release -./target/release/antares_get_data -``` - -Windows: -```batch -copy .env.example .env -REM Edit .env with your credentials and output path -cargo build --release -./target/release/antares_get_data.exe -``` - -## Configuration - -`.env` file: -```env -URL=https://b2b.antares.hu/YOUR_BASE_URI_HERE -ANTARES_USERCODE=given_usercode -ANTARES_PASSWORD=given_password -OUT=out\\test.xlsx -``` - -`OUT` can be: -- Directory: `out` → creates `out/antares.xlsx` -- File path: `exports/data.xlsx` → creates file there -- Must be `.xlsx` extension if file path - -## How It Works - -1. Load credentials from `.env` -2. Fetch product data from Antares B2B API (600s timeout) -3. Save raw JSON to `antares.json` -4. Export filtered data to Excel -5. Log all operations to `log/YYYY-MM-DD.log` - -## Excel Output - -8 columns with selective field mapping and row filtering: - -| Column | Source | -|--------|--------| -| BESZCIKKSZAM | [cikkszam](./src/template/antares.rs#L21) (required) | -| GYCIKKSZAM | [cikkszam](./src/template/antares.rs#L21) | -| BESZCIKKNEV | [cikk_megnevezes_rovid](./src/template/antares.rs#L21) or [cikk_megnevezes](./src/template/antares.rs#L20) (required) | -| GYARTO | "EGYEB" (const) | -| CIKKAZON | [vonalkod](./src/template/antares.rs#L33) | -| KESZLET | [szabad_keszlet](./src/template/antares.rs#L29) | -| ME | [mennyisegi_egyseg_kod](./src/template/antares.rs#L24) | -| EGYSEGAR | [netto_kisker_ar](./src/template/antares.rs#L26) or "Alap ár" [jellemzo](./src/template/antares.rs#39).[jellemzo_nev](./src/template/antares.rs#L41) | - -Rows skipped if `BESZCIKKSZAM` or `BESZCIKKNEV` missing! - -## Project Structure - -- `src/main.rs`: Main application logic -- `src/api/`: API client functionality -- `src/template/`: Data structures for Antares JSON response -- `src/tools/`: Utility modules (logger, env loader, request handler, Excel exporter) -- `Cargo.toml`: Rust dependencies and project configuration - -## Building - -The project uses Cargo (Rust's package manager). To build: - -```bash -cargo build --release -``` - -This will create an optimized binary in `target/release/antares_get_data` (or `antares_get_data.exe` on Windows). - -## Running - -1. Copy `.env.example` to `.env` -2. Edit `.env` with your credentials and output path -3. Run the application: - -```bash -./target/release/antares_get_data -``` - -Or on Windows: -```batch -./target/release/antares_get_data.exe -``` - -## Debug Mode - -To preserve temporary files for debugging, run with the `--debug` flag: - -```bash -./target/release/antares_get_data --debug -``` - -This will prevent cleanup of the `temp/` directory which contains the raw JSON response from the API. \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 1df66bf..eb73314 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,7 @@ fn main() -> Result<(), Box> { let debug_mode = args.contains(&"--debug".to_string()); if debug_mode { - logger.debug("Debug mode enabled - temp files will be preserved"); + logger.debug("Debug mode enabled - temp file(s) will be preserved"); } let env_config = load_env_config(config_path)