User-Scanner Output Formats: PDF, JSON, and CSV Export Guide

User-scanner supports three output formats—PDF, JSON, and CSV—allowing users to export scan results as paginated reports, structured data arrays, or spreadsheet-compatible files.

The open-source tool kaifcodec/user-scanner provides flexible export capabilities for OSINT scan results, making it compatible with both manual review and automated workflows. Understanding the available user-scanner output formats ensures you can integrate scan data into reports, databases, or analysis pipelines efficiently.

Supported Export Formats

User-scanner implements distinct exporters for three file types, each optimized for specific use cases. The format selection logic resides in user_scanner/__main__.py, which delegates to specialized formatter utilities based on the CLI argument.

PDF Reports

The PDF format generates a paginated document containing profile photos and scan summaries, ideal for sharing or archiving results. Internally, the CLI invokes formatter.into_pdf when the user specifies -f pdf or when the output filename ends with the .pdf extension.

Export a user scan to PDF using:

user-scanner -u johndoe -f pdf -o johndoe_report.pdf

If you omit the --format flag but provide a .pdf extension, the tool automatically selects PDF mode:

user-scanner -u johndoe -o report.pdf

JSON Data

For programmatic consumption, the JSON format writes a plain-text array of scan results. This output is handled via formatter.get_json_data in user_scanner/__main__.py, producing structured data that integrates easily with APIs and scripts.

Export results as JSON:

user-scanner -e johndoe@gmail.com -f json -o results.json

CSV Spreadsheets

The CSV format produces comma-separated values suitable for spreadsheet applications like Excel or Google Sheets. The conversion is processed through formatter.into_csv, creating a flat file structure for tabular analysis.

Export to CSV using:

user-scanner -u johndoe -f csv -o results.csv

Implementation Architecture

The formatting pipeline is centralized in the CLI entry point at user_scanner/__main__.py. According to the source code:

  • PDF generation occurs at lines 26-33 via formatter.into_pdf
  • JSON serialization is handled at lines 79-95 through formatter.get_json_data
  • CSV conversion takes place at lines 97-100 using formatter.into_csv

These functions are documented in the project's README under the "Multi-Format Reports" section, confirming the three supported export types.

Summary

  • User-scanner supports PDF, JSON, and CSV output formats for scan results.
  • The default format is PDF when no format flag is provided or when the output file uses the .pdf extension.
  • Format conversion is implemented in user_scanner/__main__.py using formatter.into_pdf, formatter.get_json_data, and formatter.into_csv.
  • Use -f pdf, -f json, or -f csv to explicitly select your preferred export type.

Frequently Asked Questions

What output formats does user-scanner support?

User-scanner supports three output formats: PDF for paginated reports with images, JSON for structured data arrays, and CSV for spreadsheet-compatible comma-separated values. These options are documented in the README under Multi-Format Reports and implemented in the main CLI module.

How do I specify the output format in user-scanner?

Use the -f or --format flag followed by the desired extension: pdf, json, or csv. For example, user-scanner -u target -f json -o data.json exports results as JSON. Alternatively, the tool infers the format from the output file extension when the flag is omitted.

What is the default output format if I don't specify one?

The default format is PDF. If you run user-scanner -u johndoe without a format flag, the tool generates a PDF report saved as johndoe_report.pdf. This default is also applied when the output filename ends with .pdf regardless of the flag.

Where are the format conversion functions implemented?

The conversion logic resides in user_scanner/__main__.py, which calls methods from the formatter module. Specifically, formatter.into_pdf handles PDF creation, formatter.get_json_data manages JSON export, and formatter.into_csv processes CSV conversion at the specific line ranges cited in the source analysis.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →