Normalize game_data line endings and document WSL development.
This commit is contained in:
@@ -1 +1,2 @@
|
||||
scripts/*.sh text eol=lf
|
||||
game_data/** text eol=lf
|
||||
|
||||
@@ -28,12 +28,31 @@ A web viewer for backups of the Android game **[Idle Fantasy](https://github.com
|
||||
|
||||
## Installation
|
||||
|
||||
### Windows (PowerShell)
|
||||
|
||||
```powershell
|
||||
python -m venv .venv
|
||||
.\.venv\Scripts\Activate.ps1
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### WSL (recommended for deploy)
|
||||
|
||||
Keep the repo on the Linux filesystem (not `/mnt/c/`) to avoid CRLF/git/deploy issues between Windows and WSL:
|
||||
|
||||
```bash
|
||||
# one-time clone or copy to e.g. ~/source/idle-fantasy-viewer
|
||||
cd ~/source/idle-fantasy-viewer
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Open in **Cursor**: *File → Open Folder in WSL…* → `~/source/idle-fantasy-viewer`
|
||||
Windows path (Explorer): `\\wsl.localhost\Ubuntu-24.04\home\markus\source\idle-fantasy-viewer`
|
||||
|
||||
Run tests, dev server, and `bash scripts/deploy.sh` from the same WSL shell.
|
||||
|
||||
## Usage
|
||||
|
||||
### Start server and import a backup
|
||||
|
||||
@@ -58,7 +58,7 @@ def main() -> None:
|
||||
synced.append(name)
|
||||
print(f" {name}")
|
||||
|
||||
MANIFEST.write_text(
|
||||
manifest_body = (
|
||||
json.dumps(
|
||||
{
|
||||
"source_repo": f"https://github.com/{REPO}",
|
||||
@@ -69,9 +69,10 @@ def main() -> None:
|
||||
},
|
||||
indent=2,
|
||||
)
|
||||
+ "\n",
|
||||
encoding="utf-8",
|
||||
+ "\n"
|
||||
)
|
||||
with MANIFEST.open("w", encoding="utf-8", newline="\n") as manifest_file:
|
||||
manifest_file.write(manifest_body)
|
||||
print(f"Synced {len(synced)} files -> {OUT_DIR}")
|
||||
print(f"Manifest: {MANIFEST} (sha {sha[:12]})")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user