Skip to content

Repository files navigation

sbscraper

sbscraper is a CLI wrapper for scraping Structure Builder reports:

  • -pwrid: fetch reports by PWRID
  • -battery: export battery strings by PWRID into CSV
  • -fuel: fetch fuel tank reports by Site ID
  • -coord: extract address/lat/lon from a folder of PDF reports into CSV

Config

On first run, sbscraper prompts for your username and password, then creates a per-user config.json. On Windows this is %LOCALAPPDATA%\sbscraper\config.json. Existing credentials stored next to the executable are copied there automatically on the next run.

You can still create/edit it manually if needed. Template:

{
  "username": "your_username",
  "password": "your_password"
}

If credentials are missing or config.json is invalid JSON, the app prompts again and rewrites the file.

CLI usage

python main.py -v
python main.py --version
python main.py -pwrid <PWRID...>
python main.py -battery <PWRID...> [--output battery_report.csv]
python main.py -PWRID -battery <PWRID...> [--output battery_report.csv]
python main.py -fuel <SITE_ID...>
python main.py -coord <PDF_DIRECTORY> [--output sites.csv]

Windows executable

Run from Command Prompt or PowerShell in the folder containing sbscraper.exe:

.\sbscraper.exe -pwrid <PWRID...>
.\sbscraper.exe -battery <PWRID...> [--output battery_report.csv]
.\sbscraper.exe -PWRID -battery <PWRID...> [--output battery_report.csv]
.\sbscraper.exe -fuel <SITE_ID...>
.\sbscraper.exe -coord <PDF_DIRECTORY> [--output sites.csv]

Tagged GitHub releases can also be installed without administrator privileges after the package is accepted into the WinGet community repository:

winget install yd-null.sbscraper --scope user
sbscraper --version

Output

  • PDF reports are saved under output/ in the current working directory
  • Battery extraction writes CSV to battery_report.csv by default (or --output path)
  • Coordinate extraction writes CSV to sites.csv by default (or --output path)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages