maps4fs 2.2.72__tar.gz → 2.2.73__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {maps4fs-2.2.72 → maps4fs-2.2.73}/PKG-INFO +26 -144
  2. {maps4fs-2.2.72 → maps4fs-2.2.73}/README.md +25 -143
  3. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/config.py +2 -2
  4. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs.egg-info/PKG-INFO +26 -144
  5. {maps4fs-2.2.72 → maps4fs-2.2.73}/pyproject.toml +1 -1
  6. {maps4fs-2.2.72 → maps4fs-2.2.73}/LICENSE.md +0 -0
  7. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/__init__.py +0 -0
  8. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/__init__.py +0 -0
  9. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/__init__.py +0 -0
  10. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/background.py +0 -0
  11. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/base/__init__.py +0 -0
  12. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/base/component.py +0 -0
  13. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/base/component_image.py +0 -0
  14. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/base/component_mesh.py +0 -0
  15. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/base/component_xml.py +0 -0
  16. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/config.py +0 -0
  17. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/dem.py +0 -0
  18. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/grle.py +0 -0
  19. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/i3d.py +0 -0
  20. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/layer.py +0 -0
  21. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/satellite.py +0 -0
  22. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/component/texture.py +0 -0
  23. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/game.py +0 -0
  24. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/map.py +0 -0
  25. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/qgis.py +0 -0
  26. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/settings.py +0 -0
  27. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/statistics.py +0 -0
  28. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/generator/utils.py +0 -0
  29. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs/logger.py +0 -0
  30. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs.egg-info/SOURCES.txt +0 -0
  31. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs.egg-info/dependency_links.txt +0 -0
  32. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs.egg-info/requires.txt +0 -0
  33. {maps4fs-2.2.72 → maps4fs-2.2.73}/maps4fs.egg-info/top_level.txt +0 -0
  34. {maps4fs-2.2.72 → maps4fs-2.2.73}/setup.cfg +0 -0
  35. {maps4fs-2.2.72 → maps4fs-2.2.73}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maps4fs
3
- Version: 2.2.72
3
+ Version: 2.2.73
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: Apache License 2.0
@@ -52,7 +52,6 @@ Dynamic: license-file
52
52
  <a href="#Overview">Overview</a> •
53
53
  <a href="docs/step_by_step.md">Create a map in 10 steps</a> •
54
54
  <a href="docs/recommendations.md">Practical recommendations</a> •
55
- <a href="#How-To-Run">How-To-Run</a><br>
56
55
  <a href="docs/my_maps.md">My Maps</a> •
57
56
  <a href="docs/FAQ.md">FAQ</a> •
58
57
  <a href="docs/map_structure.md">Map Structure</a> •
@@ -149,38 +148,49 @@ There are several ways to use the tool. You obviously need the **first one**, bu
149
148
  ### 🚜 For most users
150
149
 
151
150
  **Option 1:** Open the [maps4fs](https://maps4fs.xyz) and generate a map template in a few clicks.<br>
151
+ 🟢 Recommended for all users.
152
+ 🛠️ Don't need to install anything.
153
+ 🗺️ Supported map sizes: 2x2, 4x4, custom sizes not available.
154
+ ✂️ Map scaling: not supported.
155
+ ⚙️ Advanced settings: some settings not available.
152
156
 
153
157
  ![Basic WebUI](https://github.com/iwatkot/maps4fs/releases/download/2.0.0/maps4fs_wui.png)
154
158
 
155
159
  ### 😎 For advanced users
156
160
 
157
- **Option 2:** Run the Docker version in your browser. Launch the following command in your terminal:
158
-
159
- ```bash
160
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
161
- ```
161
+ **Option 2:** Run the Docker version in your browser.
162
+ 🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
163
+ 🛠️ Docker installation required, launch with one command.
164
+ 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
165
+ ✂️ Map scaling: supported.
166
+ ⚙️ Advanced settings: all settings available.
162
167
 
163
- If you want to persist your data, you can mount a directory to the container:
168
+ Launch the following command in your terminal to use the Setup Wizard:
164
169
 
165
- ```bash
166
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
170
+ ```powershell
171
+ powershell -ExecutionPolicy Bypass -Command "iex (iwr 'https://raw.githubusercontent.com/iwatkot/maps4fs/main/setup-wizard.ps1' -UseBasicParsing).Content"
167
172
  ```
168
173
 
169
- Learn more in the [My Maps](docs/my_maps.md) documentation.
174
+ ℹ️ Check out detailed instructions about [local deployment](docs/local_deployment.md).
170
175
 
171
- And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
172
- If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
173
- Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
174
176
 
175
177
  ### 🤯 For developers
176
178
 
177
- **Option 3:** Python package. Install the package using the following command:
179
+ **Option 3:** Python package or run from source code.
180
+ 🔴 Recommended for developers who want full control over the generation process and fastest performance.
181
+ 🛠️ Requires Python, pip, and Git.
182
+ 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
183
+ ✂️ Map scaling: supported.
184
+ ⚙️ Advanced settings: all settings available.
185
+
186
+ Install the package using the following command:
178
187
 
179
188
  ```bash
180
189
  pip install maps4fs
181
190
  ```
182
191
 
183
- And refer to the [Python package or run from the source](#option-3-python-package-or-source-code) section to learn how to use it.<br>
192
+ ℹ️ Check out detailed instructions about [Maps4FS Python Package Deployment](docs/local_deployment_source.md).
193
+
184
194
 
185
195
  ## Overview
186
196
 
@@ -214,134 +224,6 @@ Parameters:
214
224
 
215
225
  Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
216
226
 
217
- ## How-To-Run
218
-
219
- ### Option 1: Public version
220
-
221
- 🟢 Recommended for all users.
222
- 🛠️ Don't need to install anything.
223
- 🗺️ Supported map sizes: 2x2, 4x4.
224
- ✂️ Map scaling: not supported.
225
- ⚙️ Advanced settings: partial.
226
- 🖼️ Texture dissolving: disabled.
227
- Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
228
- Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
229
-
230
- Using it is easy and doesn't require any guides. Enjoy!
231
-
232
- ### Option 2: Docker version
233
-
234
- 🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
235
- 🛠️ Launch with one single command.
236
- 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
237
- ✂️ Map scaling: supported.
238
- ⚙️ Advanced settings: enabled.
239
- 🖼️ Texture dissolving: enabled.
240
- Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
241
-
242
- 📹 Check out the [video tutorial](https://www.youtube.com/watch?v=1AHGIxTxSBM) on how to install Docker and use the Docker version.
243
-
244
- You can launch the project with minimalistic UI in your browser using Docker. Follow these steps:
245
-
246
- 1. Install [Docker](https://docs.docker.com/get-docker/) for your OS.
247
- 2. Run the following command in your terminal:
248
-
249
- ```bash
250
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
251
- ```
252
-
253
- If you want to persist your data, you can mount a directory to the container:
254
-
255
- ```bash
256
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
257
- ```
258
-
259
- 3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
260
- 4. Fill in the required fields and click on the `Generate` button.
261
- 5. When the map is generated click on the `Download` button to get the map.
262
-
263
- ### Option 3: Python package or source code
264
-
265
- 🔴 Recommended for developers.
266
- 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
267
- ✂️ Map scaling: supported.
268
- ⚙️ Advanced settings: enabled.
269
- 🖼️ Texture dissolving: enabled.
270
- You can use the Python package to generate maps. Follow these steps:
271
-
272
- 1. Install the package from PyPI:
273
-
274
- ```bash
275
- pip install maps4fs
276
- ```
277
-
278
- Or clone the repository and install the package from the source code:
279
-
280
- ```bash
281
- git clone https://github.com/iwatkot/maps4fs.git
282
- cd maps4fs
283
- dev/create_venv.ps1 # for Windows
284
- sh dev/create_venv.sh # for Linux
285
-
286
- # Activate the virtual environment.
287
- ./venv/scripts/activate # for Windows
288
- source venv/bin/activate # for Linux
289
-
290
- # Edit the demo.py file to set the parameters.
291
- python demo.py
292
- ```
293
-
294
- 2. Import the Game class and create an instance of it:
295
-
296
- ```python
297
- import maps4fs as mfs
298
-
299
- game_code = "fs25"
300
- game = mfs.Game.from_code(game_code)
301
-
302
- dtm_provider = mfs.dtm.SRTM30Provider
303
-
304
- lat, lon = 45.28, 20.23
305
- coordinates = (lat, lon)
306
- size = 2048
307
- rotation = 25
308
-
309
- map_directory = "map_directory"
310
- os.makedirs(map_directory, exist_ok=True)
311
-
312
- mp = mfs.Map(
313
- game,
314
- dtm_provider,
315
- None,
316
- coordinates,
317
- size,
318
- rotation,
319
- map_directory,
320
- )
321
- ```
322
-
323
- In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
324
- Structure example:<br>
325
-
326
- ```text
327
- 📁 data
328
- ┣ 📄 fs22-map-template.zip
329
- ┗ 📄 fs22-texture-schema.json
330
- ```
331
-
332
- So it's recommended to download the `data` directory from the repository and place it in the root of your project.<br>
333
-
334
- 3. Launch the generation process.
335
- The `generate` method returns a generator, which yields the active component of the map. You can use it to track the progress of the generation process.
336
-
337
- ```python
338
- for component_name in mp.generate():
339
- print(f"Generating {component_name}...")
340
- ```
341
-
342
- The map will be saved in the `map_directory` directory.
343
-
344
- ➡️ Check out the [demo.py](demo.py) file for a complete example.
345
227
 
346
228
  ## Schemas Editor
347
229
 
@@ -23,7 +23,6 @@
23
23
  <a href="#Overview">Overview</a> •
24
24
  <a href="docs/step_by_step.md">Create a map in 10 steps</a> •
25
25
  <a href="docs/recommendations.md">Practical recommendations</a> •
26
- <a href="#How-To-Run">How-To-Run</a><br>
27
26
  <a href="docs/my_maps.md">My Maps</a> •
28
27
  <a href="docs/FAQ.md">FAQ</a> •
29
28
  <a href="docs/map_structure.md">Map Structure</a> •
@@ -120,38 +119,49 @@ There are several ways to use the tool. You obviously need the **first one**, bu
120
119
  ### 🚜 For most users
121
120
 
122
121
  **Option 1:** Open the [maps4fs](https://maps4fs.xyz) and generate a map template in a few clicks.<br>
122
+ 🟢 Recommended for all users.
123
+ 🛠️ Don't need to install anything.
124
+ 🗺️ Supported map sizes: 2x2, 4x4, custom sizes not available.
125
+ ✂️ Map scaling: not supported.
126
+ ⚙️ Advanced settings: some settings not available.
123
127
 
124
128
  ![Basic WebUI](https://github.com/iwatkot/maps4fs/releases/download/2.0.0/maps4fs_wui.png)
125
129
 
126
130
  ### 😎 For advanced users
127
131
 
128
- **Option 2:** Run the Docker version in your browser. Launch the following command in your terminal:
129
-
130
- ```bash
131
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
132
- ```
132
+ **Option 2:** Run the Docker version in your browser.
133
+ 🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
134
+ 🛠️ Docker installation required, launch with one command.
135
+ 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
136
+ ✂️ Map scaling: supported.
137
+ ⚙️ Advanced settings: all settings available.
133
138
 
134
- If you want to persist your data, you can mount a directory to the container:
139
+ Launch the following command in your terminal to use the Setup Wizard:
135
140
 
136
- ```bash
137
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
141
+ ```powershell
142
+ powershell -ExecutionPolicy Bypass -Command "iex (iwr 'https://raw.githubusercontent.com/iwatkot/maps4fs/main/setup-wizard.ps1' -UseBasicParsing).Content"
138
143
  ```
139
144
 
140
- Learn more in the [My Maps](docs/my_maps.md) documentation.
145
+ ℹ️ Check out detailed instructions about [local deployment](docs/local_deployment.md).
141
146
 
142
- And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
143
- If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
144
- Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
145
147
 
146
148
  ### 🤯 For developers
147
149
 
148
- **Option 3:** Python package. Install the package using the following command:
150
+ **Option 3:** Python package or run from source code.
151
+ 🔴 Recommended for developers who want full control over the generation process and fastest performance.
152
+ 🛠️ Requires Python, pip, and Git.
153
+ 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
154
+ ✂️ Map scaling: supported.
155
+ ⚙️ Advanced settings: all settings available.
156
+
157
+ Install the package using the following command:
149
158
 
150
159
  ```bash
151
160
  pip install maps4fs
152
161
  ```
153
162
 
154
- And refer to the [Python package or run from the source](#option-3-python-package-or-source-code) section to learn how to use it.<br>
163
+ ℹ️ Check out detailed instructions about [Maps4FS Python Package Deployment](docs/local_deployment_source.md).
164
+
155
165
 
156
166
  ## Overview
157
167
 
@@ -185,134 +195,6 @@ Parameters:
185
195
 
186
196
  Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
187
197
 
188
- ## How-To-Run
189
-
190
- ### Option 1: Public version
191
-
192
- 🟢 Recommended for all users.
193
- 🛠️ Don't need to install anything.
194
- 🗺️ Supported map sizes: 2x2, 4x4.
195
- ✂️ Map scaling: not supported.
196
- ⚙️ Advanced settings: partial.
197
- 🖼️ Texture dissolving: disabled.
198
- Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
199
- Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
200
-
201
- Using it is easy and doesn't require any guides. Enjoy!
202
-
203
- ### Option 2: Docker version
204
-
205
- 🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
206
- 🛠️ Launch with one single command.
207
- 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
208
- ✂️ Map scaling: supported.
209
- ⚙️ Advanced settings: enabled.
210
- 🖼️ Texture dissolving: enabled.
211
- Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
212
-
213
- 📹 Check out the [video tutorial](https://www.youtube.com/watch?v=1AHGIxTxSBM) on how to install Docker and use the Docker version.
214
-
215
- You can launch the project with minimalistic UI in your browser using Docker. Follow these steps:
216
-
217
- 1. Install [Docker](https://docs.docker.com/get-docker/) for your OS.
218
- 2. Run the following command in your terminal:
219
-
220
- ```bash
221
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
222
- ```
223
-
224
- If you want to persist your data, you can mount a directory to the container:
225
-
226
- ```bash
227
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
228
- ```
229
-
230
- 3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
231
- 4. Fill in the required fields and click on the `Generate` button.
232
- 5. When the map is generated click on the `Download` button to get the map.
233
-
234
- ### Option 3: Python package or source code
235
-
236
- 🔴 Recommended for developers.
237
- 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
238
- ✂️ Map scaling: supported.
239
- ⚙️ Advanced settings: enabled.
240
- 🖼️ Texture dissolving: enabled.
241
- You can use the Python package to generate maps. Follow these steps:
242
-
243
- 1. Install the package from PyPI:
244
-
245
- ```bash
246
- pip install maps4fs
247
- ```
248
-
249
- Or clone the repository and install the package from the source code:
250
-
251
- ```bash
252
- git clone https://github.com/iwatkot/maps4fs.git
253
- cd maps4fs
254
- dev/create_venv.ps1 # for Windows
255
- sh dev/create_venv.sh # for Linux
256
-
257
- # Activate the virtual environment.
258
- ./venv/scripts/activate # for Windows
259
- source venv/bin/activate # for Linux
260
-
261
- # Edit the demo.py file to set the parameters.
262
- python demo.py
263
- ```
264
-
265
- 2. Import the Game class and create an instance of it:
266
-
267
- ```python
268
- import maps4fs as mfs
269
-
270
- game_code = "fs25"
271
- game = mfs.Game.from_code(game_code)
272
-
273
- dtm_provider = mfs.dtm.SRTM30Provider
274
-
275
- lat, lon = 45.28, 20.23
276
- coordinates = (lat, lon)
277
- size = 2048
278
- rotation = 25
279
-
280
- map_directory = "map_directory"
281
- os.makedirs(map_directory, exist_ok=True)
282
-
283
- mp = mfs.Map(
284
- game,
285
- dtm_provider,
286
- None,
287
- coordinates,
288
- size,
289
- rotation,
290
- map_directory,
291
- )
292
- ```
293
-
294
- In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
295
- Structure example:<br>
296
-
297
- ```text
298
- 📁 data
299
- ┣ 📄 fs22-map-template.zip
300
- ┗ 📄 fs22-texture-schema.json
301
- ```
302
-
303
- So it's recommended to download the `data` directory from the repository and place it in the root of your project.<br>
304
-
305
- 3. Launch the generation process.
306
- The `generate` method returns a generator, which yields the active component of the map. You can use it to track the progress of the generation process.
307
-
308
- ```python
309
- for component_name in mp.generate():
310
- print(f"Generating {component_name}...")
311
- ```
312
-
313
- The map will be saved in the `map_directory` directory.
314
-
315
- ➡️ Check out the [demo.py](demo.py) file for a complete example.
316
198
 
317
199
  ## Schemas Editor
318
200
 
@@ -11,7 +11,7 @@ from maps4fs.logger import Logger
11
11
 
12
12
  logger = Logger()
13
13
 
14
- MFS_TEMPLATES_DIR = os.path.join(os.getcwd(), "data")
14
+ MFS_TEMPLATES_DIR = os.path.join(os.getcwd(), "templates")
15
15
 
16
16
 
17
17
  def ensure_templates():
@@ -102,7 +102,7 @@ ensure_templates()
102
102
 
103
103
  MFS_ROOT_DIR = os.getenv("MFS_ROOT_DIRECTORY", os.path.join(os.getcwd(), "mfsrootdir"))
104
104
  MFS_CACHE_DIR = os.path.join(MFS_ROOT_DIR, "cache")
105
- MFS_DATA_DIR = os.path.join(MFS_ROOT_DIR, "data")
105
+ MFS_DATA_DIR = os.path.join(MFS_ROOT_DIR, "maps")
106
106
  os.makedirs(MFS_CACHE_DIR, exist_ok=True)
107
107
  os.makedirs(MFS_DATA_DIR, exist_ok=True)
108
108
  logger.info(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maps4fs
3
- Version: 2.2.72
3
+ Version: 2.2.73
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: Apache License 2.0
@@ -52,7 +52,6 @@ Dynamic: license-file
52
52
  <a href="#Overview">Overview</a> •
53
53
  <a href="docs/step_by_step.md">Create a map in 10 steps</a> •
54
54
  <a href="docs/recommendations.md">Practical recommendations</a> •
55
- <a href="#How-To-Run">How-To-Run</a><br>
56
55
  <a href="docs/my_maps.md">My Maps</a> •
57
56
  <a href="docs/FAQ.md">FAQ</a> •
58
57
  <a href="docs/map_structure.md">Map Structure</a> •
@@ -149,38 +148,49 @@ There are several ways to use the tool. You obviously need the **first one**, bu
149
148
  ### 🚜 For most users
150
149
 
151
150
  **Option 1:** Open the [maps4fs](https://maps4fs.xyz) and generate a map template in a few clicks.<br>
151
+ 🟢 Recommended for all users.
152
+ 🛠️ Don't need to install anything.
153
+ 🗺️ Supported map sizes: 2x2, 4x4, custom sizes not available.
154
+ ✂️ Map scaling: not supported.
155
+ ⚙️ Advanced settings: some settings not available.
152
156
 
153
157
  ![Basic WebUI](https://github.com/iwatkot/maps4fs/releases/download/2.0.0/maps4fs_wui.png)
154
158
 
155
159
  ### 😎 For advanced users
156
160
 
157
- **Option 2:** Run the Docker version in your browser. Launch the following command in your terminal:
158
-
159
- ```bash
160
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
161
- ```
161
+ **Option 2:** Run the Docker version in your browser.
162
+ 🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
163
+ 🛠️ Docker installation required, launch with one command.
164
+ 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
165
+ ✂️ Map scaling: supported.
166
+ ⚙️ Advanced settings: all settings available.
162
167
 
163
- If you want to persist your data, you can mount a directory to the container:
168
+ Launch the following command in your terminal to use the Setup Wizard:
164
169
 
165
- ```bash
166
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
170
+ ```powershell
171
+ powershell -ExecutionPolicy Bypass -Command "iex (iwr 'https://raw.githubusercontent.com/iwatkot/maps4fs/main/setup-wizard.ps1' -UseBasicParsing).Content"
167
172
  ```
168
173
 
169
- Learn more in the [My Maps](docs/my_maps.md) documentation.
174
+ ℹ️ Check out detailed instructions about [local deployment](docs/local_deployment.md).
170
175
 
171
- And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
172
- If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
173
- Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
174
176
 
175
177
  ### 🤯 For developers
176
178
 
177
- **Option 3:** Python package. Install the package using the following command:
179
+ **Option 3:** Python package or run from source code.
180
+ 🔴 Recommended for developers who want full control over the generation process and fastest performance.
181
+ 🛠️ Requires Python, pip, and Git.
182
+ 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
183
+ ✂️ Map scaling: supported.
184
+ ⚙️ Advanced settings: all settings available.
185
+
186
+ Install the package using the following command:
178
187
 
179
188
  ```bash
180
189
  pip install maps4fs
181
190
  ```
182
191
 
183
- And refer to the [Python package or run from the source](#option-3-python-package-or-source-code) section to learn how to use it.<br>
192
+ ℹ️ Check out detailed instructions about [Maps4FS Python Package Deployment](docs/local_deployment_source.md).
193
+
184
194
 
185
195
  ## Overview
186
196
 
@@ -214,134 +224,6 @@ Parameters:
214
224
 
215
225
  Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
216
226
 
217
- ## How-To-Run
218
-
219
- ### Option 1: Public version
220
-
221
- 🟢 Recommended for all users.
222
- 🛠️ Don't need to install anything.
223
- 🗺️ Supported map sizes: 2x2, 4x4.
224
- ✂️ Map scaling: not supported.
225
- ⚙️ Advanced settings: partial.
226
- 🖼️ Texture dissolving: disabled.
227
- Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
228
- Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
229
-
230
- Using it is easy and doesn't require any guides. Enjoy!
231
-
232
- ### Option 2: Docker version
233
-
234
- 🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
235
- 🛠️ Launch with one single command.
236
- 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
237
- ✂️ Map scaling: supported.
238
- ⚙️ Advanced settings: enabled.
239
- 🖼️ Texture dissolving: enabled.
240
- Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
241
-
242
- 📹 Check out the [video tutorial](https://www.youtube.com/watch?v=1AHGIxTxSBM) on how to install Docker and use the Docker version.
243
-
244
- You can launch the project with minimalistic UI in your browser using Docker. Follow these steps:
245
-
246
- 1. Install [Docker](https://docs.docker.com/get-docker/) for your OS.
247
- 2. Run the following command in your terminal:
248
-
249
- ```bash
250
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
251
- ```
252
-
253
- If you want to persist your data, you can mount a directory to the container:
254
-
255
- ```bash
256
- docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
257
- ```
258
-
259
- 3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
260
- 4. Fill in the required fields and click on the `Generate` button.
261
- 5. When the map is generated click on the `Download` button to get the map.
262
-
263
- ### Option 3: Python package or source code
264
-
265
- 🔴 Recommended for developers.
266
- 🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
267
- ✂️ Map scaling: supported.
268
- ⚙️ Advanced settings: enabled.
269
- 🖼️ Texture dissolving: enabled.
270
- You can use the Python package to generate maps. Follow these steps:
271
-
272
- 1. Install the package from PyPI:
273
-
274
- ```bash
275
- pip install maps4fs
276
- ```
277
-
278
- Or clone the repository and install the package from the source code:
279
-
280
- ```bash
281
- git clone https://github.com/iwatkot/maps4fs.git
282
- cd maps4fs
283
- dev/create_venv.ps1 # for Windows
284
- sh dev/create_venv.sh # for Linux
285
-
286
- # Activate the virtual environment.
287
- ./venv/scripts/activate # for Windows
288
- source venv/bin/activate # for Linux
289
-
290
- # Edit the demo.py file to set the parameters.
291
- python demo.py
292
- ```
293
-
294
- 2. Import the Game class and create an instance of it:
295
-
296
- ```python
297
- import maps4fs as mfs
298
-
299
- game_code = "fs25"
300
- game = mfs.Game.from_code(game_code)
301
-
302
- dtm_provider = mfs.dtm.SRTM30Provider
303
-
304
- lat, lon = 45.28, 20.23
305
- coordinates = (lat, lon)
306
- size = 2048
307
- rotation = 25
308
-
309
- map_directory = "map_directory"
310
- os.makedirs(map_directory, exist_ok=True)
311
-
312
- mp = mfs.Map(
313
- game,
314
- dtm_provider,
315
- None,
316
- coordinates,
317
- size,
318
- rotation,
319
- map_directory,
320
- )
321
- ```
322
-
323
- In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
324
- Structure example:<br>
325
-
326
- ```text
327
- 📁 data
328
- ┣ 📄 fs22-map-template.zip
329
- ┗ 📄 fs22-texture-schema.json
330
- ```
331
-
332
- So it's recommended to download the `data` directory from the repository and place it in the root of your project.<br>
333
-
334
- 3. Launch the generation process.
335
- The `generate` method returns a generator, which yields the active component of the map. You can use it to track the progress of the generation process.
336
-
337
- ```python
338
- for component_name in mp.generate():
339
- print(f"Generating {component_name}...")
340
- ```
341
-
342
- The map will be saved in the `map_directory` directory.
343
-
344
- ➡️ Check out the [demo.py](demo.py) file for a complete example.
345
227
 
346
228
  ## Schemas Editor
347
229
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "2.2.72"
7
+ version = "2.2.73"
8
8
  description = "Generate map templates for Farming Simulator from real places."
9
9
  authors = [{name = "iwatkot", email = "iwatkot@gmail.com"}]
10
10
  license = {text = "Apache License 2.0"}
File without changes
File without changes
File without changes
File without changes