mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
Newer KSEI above1 PDFs use spaces in column headers (SHARE CODE, INVESTOR NAME, INVESTOR CLASSIFICATION) instead of the underscored form (SHARE_CODE, INVESTOR_NAME, INVESTOR_TYPE) that the parser schema markers expected. This caused valid holder-register PDFs to be misclassified as LegacyAboveFivePercent (false positive on REKENING TAMPUNGAN KSEI text in the data), blocking import. Changes: - Add normalize_stext_for_classification() that replaces spaces with underscores inside text="..." attributes before schema marker matching, so both old and new header layouts are recognized - Add INVESTOR_CLASSIFICATION to HOLDER_REGISTER_SCHEMA_MARKERS and HEADER_LABELS to match the renamed column - Update ANNOUNCEMENT_WRAPPER and ABOVE_FIVE marker constants to use underscores (matching the normalized text) - Add test fixture and test case for the spaced-header layout - Bump version to 0.2.3 Tested against the live June 2026 KSEI PDF (as_of 2026-05-29): idx ownership import --url <latest-pdf-url> -> Imported 7124 rows for 956 tickers (as of 2026-05-29)
50 lines
1.3 KiB
TOML
50 lines
1.3 KiB
TOML
[package]
|
|
name = "idx-cli"
|
|
version = "0.2.3"
|
|
edition = "2024"
|
|
rust-version = "1.85"
|
|
description = "CLI tool for Indonesian stock market (IDX) analysis"
|
|
license = "MIT"
|
|
repository = "https://github.com/0xrsydn/idx-cli"
|
|
homepage = "https://github.com/0xrsydn/idx-cli"
|
|
keywords = ["idx", "stocks", "indonesia", "cli", "finance"]
|
|
categories = ["command-line-utilities", "finance"]
|
|
include = [
|
|
"/Cargo.toml",
|
|
"/Cargo.lock",
|
|
"/LICENSE",
|
|
"/README.md",
|
|
"/src/**",
|
|
"/tests/cli.rs",
|
|
"/tests/fixtures/**",
|
|
]
|
|
|
|
[[bin]]
|
|
name = "idx"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
default = ["ownership"]
|
|
ownership = ["dep:rusqlite", "dep:quick-xml", "dep:sha2", "dep:zip"]
|
|
|
|
[dependencies]
|
|
clap = { version = "4", features = ["derive"] }
|
|
clap_complete = "4"
|
|
ureq = { version = "3", features = ["json", "cookies"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
comfy-table = "7"
|
|
owo-colors = "4"
|
|
toml = "0.8"
|
|
directories = "5"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
thiserror = "2"
|
|
fastrand = "2"
|
|
rusqlite = { version = "0.32", features = ["bundled-full"], optional = true }
|
|
quick-xml = { version = "0.37", optional = true }
|
|
sha2 = { version = "0.10", optional = true }
|
|
zip = { version = "2", default-features = false, features = ["deflate"], optional = true }
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2"
|
|
predicates = "3"
|