- Add 'make dist' target to build distribution package in dist/ - Add 'make dist-zip' target to create distributable archive (ZIP or tar.gz) - Create start-server.bat for Windows users (auto-opens browser, starts Python server) - Create start-server.sh for Linux/Mac users with same functionality - Generate DIST_README.md with quick start instructions for all platforms - Add WINDOWS_USAGE.md with comprehensive guide for WSL → Windows deployment - Update .gitignore to exclude dist/ and distribution archives - Update CLAUDE.md with distribution build documentation Distribution package includes: - Core application files (index.html, engine.js, generator.js) - All example projects (example/, example-1/, my-project/) - Documentation (README.md, TEMPLATE_V2_GUIDE.md, TROUBLESHOOTING.md) - Cross-platform server startup scripts The distribution is self-contained and works on Windows filesystems without modification. Paths use forward slashes which browsers handle correctly on all platforms. Users can simply extract and double-click start-server.bat (Windows) or run ./start-server.sh (Linux/Mac) to launch the application. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.0 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
- Start the application (using one of the options above)
- Use the "Load Project" button to upload your
project.json - Or manually upload individual CSV/CSS/SVG files
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)