- Add "Load Project Folder" button with folder selection (webkitdirectory) - Automatically load all project files (JSON, CSV, SVG, CSS) from selected folder - Eliminate need to manually upload each file individually - Show clear errors if referenced files are missing from folder - Update all documentation to explain folder picker usage This solves the browser security limitation where uploading a single project.json doesn't allow automatic access to other files in the same directory. Users can now select an entire project folder and all files load automatically in one click. Changes: - index.html: Add folder input with webkitdirectory attribute and UI - engine.js: Add folderInput event handler to process all files from folder - README.md: Document folder picker as primary loading method - WINDOWS_USAGE.md: Add folder picker as recommended Option 1 - TROUBLESHOOTING.md: Add section explaining project files not auto-loading - CLAUDE.md: Document folder picker architecture for future instances - Makefile: Update DIST_README.md template to mention folder picker Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.6 KiB
Using Timeline SVG on Windows
This guide explains how to use Timeline SVG Generator on Windows after building the distribution in WSL.
Building the Distribution (in WSL)
-
In your WSL terminal, navigate to the project directory:
cd /home/worsch/timeline-svg -
Build the distribution package:
make dist-zipThis creates either
timeline-svg-dist.zip(if zip is installed) ortimeline-svg-dist.tar.gz. -
The distribution file is now in your project directory and accessible from Windows at:
\\wsl$\Ubuntu\home\worsch\timeline-svg\timeline-svg-dist.tar.gzOr if you have the WSL path mounted:
\\wsl.localhost\Ubuntu\home\worsch\timeline-svg\timeline-svg-dist.tar.gz
Transferring to Windows
Option 1: Copy from WSL Location
- Open Windows Explorer
- Navigate to
\\wsl$\Ubuntu\home\worsch\timeline-svg\ - Copy
timeline-svg-dist.tar.gz(or.zip) to your Windows directory- Example:
C:\Users\YourName\Documents\timeline-svg\
- Example:
Option 2: Use Command Line
In WSL terminal:
# Copy to Windows user directory
cp timeline-svg-dist.tar.gz /mnt/c/Users/YourName/Documents/
Or from Windows PowerShell:
# Copy from WSL to Windows
Copy-Item "\\wsl$\Ubuntu\home\worsch\timeline-svg\timeline-svg-dist.tar.gz" -Destination "C:\Users\YourName\Documents\"
Extracting on Windows
If you have a .zip file:
- Right-click the file → "Extract All..."
- Choose destination folder
If you have a .tar.gz file:
- Install 7-Zip (free): https://www.7-zip.org/
- Right-click → 7-Zip → Extract Here (twice - first for .gz, then for .tar)
Running on Windows
Once extracted, you have several options:
Option 1: Use the Batch Script (Easiest)
- Double-click
start-server.batin the extracted folder - A command window will open and your browser will launch automatically
- The application will be available at http://localhost:8000
- To stop the server, close the command window or press Ctrl+C
Note: Requires Python to be installed on Windows. Download from https://www.python.org/ if needed.
Option 2: Use Python Directly
- Open Command Prompt or PowerShell in the extracted folder
- Run one of these commands:
or
python -m http.server 8000python3 -m http.server 8000 - Open your browser to http://localhost:8000
Option 3: Use Node.js http-server
If you have Node.js installed:
npx http-server -p 8000
Option 4: Direct File Access (Limited)
You can open index.html directly in your browser, but due to CORS restrictions:
- ✅ UI will load
- ❌ Auto-loading of example projects won't work
- ❌ CSV/template files must be manually uploaded
Recommendation: Use a local server (Option 1-3) for full functionality.
Working with Your Own Projects
Creating a New Project
- Copy one of the example folders (e.g.,
example\) - Rename it to your project name
- Edit the files:
project.json- Configure field mappings and settingssample.csv- Replace with your timeline datastyle.css- Customize colors and fontstemplate-v2.svg- Design your timeline layout
Loading Your Project
You have two options:
Option 1: Load Entire Project Folder (Recommended)
- Click "📂 Load Project Folder"
- Select your project folder (e.g.,
example\or your custom project folder) - All files (project.json, CSV, SVG, CSS) will be loaded automatically
- Timeline generates immediately
This is the easiest method - one click loads everything!
Option 2: Load Files Individually
- Click "📁 Load" next to "Project Configuration"
- Select your
project.jsonfile - Manually upload CSV, CSS, and SVG files using the respective buttons
Note: Due to browser security, uploading just project.json won't automatically load the other files from the same directory. Use the folder picker (Option 1) for automatic loading.
File Paths on Windows
The application uses forward slashes (/) in URLs, which work correctly in browsers on Windows. You don't need to change anything in the code.
Example project.json on Windows:
{
"name": "My Timeline",
"dataSource": "sample.csv",
"stylesheet": "style.css",
"svgTemplate": "template-v2.svg"
}
These relative paths work the same way on Windows and Linux when served via HTTP.
Troubleshooting on Windows
"Python not found"
Install Python:
- Download from https://www.python.org/downloads/
- Important: Check "Add Python to PATH" during installation
- Restart Command Prompt
- Try running
start-server.batagain
Port 8000 already in use
Change the port in start-server.bat:
- Edit the file with Notepad
- Change
8000to another port like8080or3000 - Update the browser URL accordingly
Files not loading (CORS errors)
- Make sure you're using the local server (not opening index.html directly)
- Check that all project files are in the same directory structure
- Look at browser console (F12) for specific error messages
Browser doesn't open automatically
If start http://localhost:8000 doesn't work:
- Manually open your browser
- Navigate to http://localhost:8000
- The application should load normally
Syncing Between WSL and Windows
If you want to develop in WSL but test on Windows:
Option 1: Work in WSL-accessible location
Develop in a Windows folder accessed from WSL:
cd /mnt/c/Users/YourName/Documents/timeline-svg
Changes made in WSL are immediately visible in Windows.
Option 2: Rebuild distribution after changes
- Make changes in WSL
- Rebuild:
make dist-zip - Copy to Windows
- Extract and test
Option 3: Use the Windows folder directly
The distribution folder can be used from both environments:
- WSL:
cd /mnt/c/Users/YourName/Documents/timeline-svg/dist - Windows:
C:\Users\YourName\Documents\timeline-svg\dist
Performance Notes
- The application runs entirely in the browser (no backend needed)
- Performance is identical on Windows and Linux
- Large CSV files (>1000 rows) may take a few seconds to process
- SVG generation is client-side and depends on your browser/CPU speed
Additional Resources
- See
README.mdfor application overview and features - See
TEMPLATE_V2_GUIDE.mdfor template customization - See
TROUBLESHOOTING.mdfor common issues and solutions
Questions or Issues?
If you encounter problems specific to Windows:
- Check the browser console (F12 → Console tab) for error messages
- Verify Python is installed and in PATH
- Try the alternative server options above
- Check file permissions (extracted files should be readable)