SiteOne Crawler GUI

repository·master·Indexed 42 days ago

https://github.com/janreges/siteone-crawler-gui

A desktop application providing a graphical interface for the SiteOne Crawler command-line tool. It enables users to perform in-depth website crawls, analyze errors, generate HTML, JSON, or TXT reports, create sitemaps, and produce offline versions of websites without using a terminal. Built with Electron, Svelte, and TypeScript, it includes advanced configuration for resource filtering, markdown export, and real-time progress monitoring.

Tokens
8K
Snippets
18
Records
30
Agent score
54%

What's inside SiteOne Crawler GUI

  1. Use SiteOne Crawler GUI to crawl websites

    master

    Follow this workflow to perform a website crawl:

    1. Launch: Open the SiteOne Crawler application.
    2. Configure:
      • Enter the target website URL.
      • Set optional parameters. You can use the Basic form for standard settings or the Full settings form for advanced configurations (the two forms are synchronized).
    3. Execute: Click to start crawling and wait for completion.
    4. Retrieve Results: Navigate to the Result tab to:
      • Open a detailed HTML report.
      • Download reports in JSON or TXT formats.
      • View a generated offline version of the website (if configured).
      • Download sitemap files (xml/txt).

    Note: All generated content (reports, offline websites, cache, etc.) is automatically stored in a folder named SiteOne-Crawler on your Desktop.

  2. Run and build the application

    master

    Development

    Run the development server to launch the Electron app with hot-reloading:

    npm run dev

    Building for Production

    Important: Builds must be run on the target platform.

    Note on Type Checking: Due to existing svelte-check issues, you may need to remove npm run typecheck && from the build script in package.json to successfully create a build.

    Available build commands:

    # For Windows (x64)
    npm run build:win-x64
    
    # For macOS (x64)
    npm run build:mac-x64
    
    # For macOS (arm64)
    npm run build:mac-arm64
    
    # For Linux (x64)
    npm run build:linux-x64
    
    # For Linux (arm64)
    npm run build:linux-arm64
  3. Set up the development environment

    master

    To build or modify the application, you must first clone the repository and initialize the required submodules, which include the command-line SiteOne Crawler tool.

    # checkout repository
    git clone https://github.com/janreges/siteone-crawler-gui.git
    cd siteone-crawler-gui
    
    # initialize and download submodule with command-line SiteOne Crawler into src/siteone-crawler
    git submodule update --init --recursive
    
    # install dependencies
    npm install
  4. Understand the MiniStatsData structure

    master

    The MiniStatsData class is used to aggregate and summarize crawler statistics. It tracks metrics related to HTML performance, HTTP status code distributions, and content type sizes (HTML, Images, JS, CSS, Fonts, etc.).

    Key Metric Groups

    • HTML Performance: Tracks htmlNumber (count), htmlTimeTotal, htmlTimeAvg, htmlTimeMin, htmlTimeMax, and htmlTimeAvgDirection ('up' or 'down').
    • HTTP Status Codes: Categorizes responses into code200x, code300x, code400x, code500x, and codeErr.
    • Content Statistics: Tracks both the count (Number) and total size (Size) for various file types:
      • contentHtml
      • contentImg
      • contentJs
      • contentCss
      • contentFonts
      • contentFiles (fallback for other types)
  5. Monitor Crawler Execution and Output

    master

    The CrawlerForm component provides real-time feedback during a crawl through several mechanisms:

    1. Terminal Output: A built-in xterm.js terminal displays the raw crawler logs. The component parses these logs to identify specific events like HTML report generation, offline website creation, or sitemap generation.
    2. Progress Tracking: The TimelineState tracks progress (e.g., 10/100 | 10%) extracted from the terminal output.
    3. Statistics:
      • MiniStatsData provides granular details about processed URLs (file type, duration, size).
      • NetworkStats tracks network-level activity.
    4. Result Tabs: Once the crawler finishes (detected via CrawlerMessageType.STOPPED), the UI allows switching to a 'Result' tab to access generated files (HTML reports, JSON, sitemaps, or offline clones) via direct links.
  6. Configure Crawler Settings via CrawlerForm

    master

    The CrawlerForm component manages the configuration and execution state of the SiteOne Crawler. It provides a structured interface to set parameters for crawling depth, device types, resource filtering, and output formats.

    Key configuration categories include:

    • Basic Settings: Max depth, device type (desktop, tablet, mobile), user agent, timeout, proxy, and concurrency (workers/requests per second).
    • Resource Filtering: Options to disable specific assets like JavaScript, CSS, fonts, images, or files, and to restrict crawling to specific domains.
    • Output Settings: Configuration for HTML, JSON, or Text reports, and display options for the console output.
    • Advanced/Expert Settings: Memory limits, domain resolution, regex filtering (include/ignore), and storage types (memory vs file).
    • Website Clone Options: Settings for generating an offline version of a website, including content replacement and code removal.
    // Example of the shape of the configuration object used by the form
    const formData = {
      url: 'https://example.com',
      maxDepth: 2,
      device: 'desktop',
      workers: 3,
      disableJavascript: true,
      resultStorage: 'file',
      outputHtmlReport: '/path/to/report.html'
    };
  7. Access Generated Crawler Reports

    master

    Once crawling is complete, the GUI provides direct access to various report types:

    • HTML report: View the visual report in the browser.
    • JSON report: View the raw data in JSON format.
    • TXT report: View the report in text format.
    • Online HTML report: If uploaded, access the report via a secure unique URL.
    • Offline website clone: Browse the locally generated website clone.
    • Markdown version: Open the folder containing the exported markdown files.
    • Sitemaps: Open the generated sitemap.xml or sitemap.txt files.

    Manual Access: All outputs are stored in a folder named SiteOne-Crawler on your desktop. You can navigate there via terminal using: cd [path_to_output_folder]

  8. Configure SiteOne Crawler via CrawlerFormContent

    master

    The CrawlerFormContent class defines the configuration schema used to control the SiteOne Crawler. It covers everything from basic URL settings to advanced expert modes, resource filtering, and various export formats (Markdown, Offline, Sitemap, etc.).

    Configuration Categories

    • Basic Settings: url, maxDepth, device (desktop, tablet, mobile), userAgent, proxy, timeout, etc.
    • Output Settings: output (text, json), htmlReportOptions, and display preferences like showInlineCriticals or noColor.
    • Resource Filtering: Options to disableJavascript, disableStyles, disableFonts, disableImages, etc.
    • Advanced Crawler Settings: workers, maxReqsPerSec, memoryLimit, allowedDomainForCrawling, includeRegex, ignoreRegex, and maxVisitedUrls.
    • Expert Settings: debug, resultStorage (memory, file), httpCacheDir, and websocketServer.
    • File Export Settings: Templates for outputHtmlReport, outputJsonFile, and outputTextFile using placeholders like %domain% and %datetime%.
    • Mailer Options: SMTP configuration for sending results via email (mailTo, mailSmtpHost, etc.).
    • Markdown/Offline Export: Specialized settings for converting crawled content to Markdown or offline-ready HTML.
    • Sitemap Options: Configuration for generating sitemapXmlFile or sitemapTxtFile.
    • Upload Settings: Controls for uploading results to a server (uploadTo, uploadRetention, uploadPassword).
  9. Configure Online HTML Report Upload

    master

    The crawler can securely upload HTML reports to the crawler.siteone.io server for remote access:

    • Upload report: Enables the upload feature.
    • Upload to URL: The endpoint URL where the report is sent.
    • Retention period: How long the report remains available online. Options: 1h, 4h, 12h, 24h, 3d, 7d, 30d, 365d, forever.
    • Password: An optional password for the report. If set, users must use the username crawler to view it. Passwords are stored securely using Bcrypt or Argon2id.
    • Timeout: The timeout for the upload process in seconds.