Normalize game_data line endings and document WSL development.
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
scripts/*.sh text eol=lf
|
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
|
## Installation
|
||||||
|
|
||||||
|
### Windows (PowerShell)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
.\.venv\Scripts\Activate.ps1
|
.\.venv\Scripts\Activate.ps1
|
||||||
pip install -r requirements.txt
|
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
|
## Usage
|
||||||
|
|
||||||
### Start server and import a backup
|
### Start server and import a backup
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ def main() -> None:
|
|||||||
synced.append(name)
|
synced.append(name)
|
||||||
print(f" {name}")
|
print(f" {name}")
|
||||||
|
|
||||||
MANIFEST.write_text(
|
manifest_body = (
|
||||||
json.dumps(
|
json.dumps(
|
||||||
{
|
{
|
||||||
"source_repo": f"https://github.com/{REPO}",
|
"source_repo": f"https://github.com/{REPO}",
|
||||||
@@ -69,9 +69,10 @@ def main() -> None:
|
|||||||
},
|
},
|
||||||
indent=2,
|
indent=2,
|
||||||
)
|
)
|
||||||
+ "\n",
|
+ "\n"
|
||||||
encoding="utf-8",
|
|
||||||
)
|
)
|
||||||
|
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"Synced {len(synced)} files -> {OUT_DIR}")
|
||||||
print(f"Manifest: {MANIFEST} (sha {sha[:12]})")
|
print(f"Manifest: {MANIFEST} (sha {sha[:12]})")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user