### Simple Setup Script Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Executes the main setup script for the simple (GUI-only) installation of pathViz. This script handles dependency installation. ```bash ./pathViz.ps1 ``` -------------------------------- ### Full Setup: Install Dependencies Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Installs pathViz dependencies using pipenv, which manages Python packages and virtual environments. This is part of the full setup for CLI and GUI usage. ```bash pip install pipenv pipenv install ``` -------------------------------- ### Full Setup: Start Virtual Environment Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Activates the pipenv virtual environment created during the full setup process. This ensures that pathViz runs with its managed dependencies. ```bash pipenv shell ``` -------------------------------- ### Install GUI Dependencies Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Installs Node.js packages for the pathViz GUI application using npm. This is required for GUI functionality in the full setup. ```bash cd gui npm install cd .. ``` -------------------------------- ### Start GUI Application Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Launches the pathViz GUI application. This command should be run from the root directory of the pathViz project. ```bash python gui.py ``` -------------------------------- ### Rescan DFHack Scripts Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Rescans all DFHack scripts within the Dwarf Fortress game client. This is necessary after setup if the game client was running during the installation process. ```lua :lua require('script-manager').reload() ``` -------------------------------- ### Load Log Data Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Initiates the loading of log data within pathViz. This command is used for setup verification and typically loads data from the DFHack logs. ```bash python cli.py load ``` -------------------------------- ### Verify Python Version Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Checks if the correct version of Python (3.10.11) is installed on the system. This is a prerequisite for running pathViz. ```bash python -V ``` -------------------------------- ### Basic robots.txt Configuration Source: https://github.com/crystalfiction/pathviz/blob/main/gui/public/robots.txt A standard robots.txt file configuration allowing all user-agents to access all parts of the website. This is a common starting point for website owners. ```robotstxt User-agent: * Disallow: ``` -------------------------------- ### Enable/Disable logPaths Script Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Controls the 'logPaths' script within DFHack. 'enable logPaths' starts logging dwarf paths, and 'disable logPaths' stops it. ```bash enable logPaths disable logPaths ``` -------------------------------- ### PathViz CLI Load Command Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Parses and logs path data from log files into the current snapshot. A snapshot is a collection of paths grouped by the in-game date they were logged. ```bash python cli.py load ``` -------------------------------- ### PathViz CLI Viz Command with Options Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Analyzes path data and generates visuals. Options allow grouping by Path Goal (--g), generating K-Means clusters (--c), creating heatmaps (--heat), limiting logs (--limit), and orienting the log limitation (--orient). ```bash # generate a visual, # limit to 10 logs, # starting from the earliest log python cli.py viz --limit 10 --orient top # generate a visual # limit to 5 logs, # starting from the latest log, # and generate clusters python cli.py viz --limit 5 --orient btm --c ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Sets environment variables in the .env file for pathViz, including the path to the Dwarf Fortress game directory (DF_PATH) and directories for data and output. ```bash # locate the system path to your Dwarf Fortress # game directory, then set DF_PATH to the system path DF_PATH="" # for example... EXAMPLE_DF_PATH="C:\\Program Files (x86)\\Steam\\steamapps\\common\\Dwarf Fortress" # optional variables specifying the directory # names pathViz will use to write data DATA_DIR="data/" OUTPUT_DIR="output/" ``` -------------------------------- ### PathViz CLI Stats Command Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Analyzes path data and generates key metrics. Options include limiting the number of logs (--limit), orienting the log limitation (--orient), and specifying whether to include saved snapshots (--saved). ```bash # generate some stats python cli.py stats ## EXAMPLE OUTPUT ----------------------------------- pathViz Stats ----------------------------------- 'Total avg dist travelled: 20.1' avg_dist common_goal snapshot 001000625 12.57 SeekItemForStorage 001000704 20.00 StoreItem 001000711 27.71 SeekItemForStorage 'Most common goal: SeekItemForStorage' avg_dist goal SeekItemForStorage 28.27 StoreItem 15.00 StartGiveFoodWater 11.00 WorkAtBuilding 5.00 SeekEatingChair2 0.00 ----------------------------------- ``` -------------------------------- ### PathViz CLI Snapshot Command Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Provides a way to subset path data by moving it to its own unique directory. This is useful for separating data from different time periods. ```bash python cli.py snapshot ``` -------------------------------- ### Check logPaths Script Status Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Checks the current status of the 'logPaths' script in DFHack. Running 'logPaths' will indicate if it is currently enabled or disabled. ```bash logPaths ``` -------------------------------- ### Enable JavaScript for pathViz Source: https://github.com/crystalfiction/pathviz/blob/main/gui/public/index.html The pathViz GUI application requires JavaScript to be enabled in your browser to function correctly. This message indicates that JavaScript is currently disabled. ```html
You need to enable JavaScript to run this app.
``` -------------------------------- ### PathViz CLI Clear Command Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Wipes the current snapshot from memory. It does not remove the actual log files, which must be deleted manually from the 'data/logs/' directory. ```bash python cli.py clear ``` -------------------------------- ### Update logPaths.lua File Prefix Source: https://github.com/crystalfiction/pathviz/blob/main/README.md Modifies the 'logPaths.lua' file to set the 'filePrefix' variable. This variable specifies the directory where path logs will be saved. ```lua // default local filePrefix = "" // is updated to (using default directory names)... local filePrefix = "C:\\