maps4fs 0.9.9__py3-none-any.whl → 0.9.91__py3-none-any.whl

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.
maps4fs/generator/map.py CHANGED
@@ -116,15 +116,19 @@ class Map:
116
116
  )
117
117
  return previews
118
118
 
119
- def pack(self, archive_name: str) -> str:
119
+ def pack(self, archive_path: str, remove_source: bool = True) -> str:
120
120
  """Pack map directory to zip archive.
121
121
 
122
122
  Args:
123
- archive_name (str): Name of the archive.
123
+ archive_path (str): Path to the archive.
124
+ remove_source (bool, optional): Remove source directory after packing.
124
125
 
125
126
  Returns:
126
127
  str: Path to the archive.
127
128
  """
128
- archive_path = shutil.make_archive(archive_name, "zip", self.map_directory)
129
- self.logger.info("Map packed to %s.zip", archive_name)
129
+ archive_path = shutil.make_archive(archive_path, "zip", self.map_directory)
130
+ self.logger.info("Map packed to %s.zip", archive_path)
131
+ if remove_source:
132
+ shutil.rmtree(self.map_directory)
133
+ self.logger.info("Map directory removed: %s", self.map_directory)
130
134
  return archive_path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 0.9.9
3
+ Version: 0.9.91
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: MIT License
@@ -7,15 +7,15 @@ maps4fs/generator/config.py,sha256=ZO5BWDU-S3p0-ndKDSFa8Oin3YcYy0iH8B4lqEA_07Q,4
7
7
  maps4fs/generator/dem.py,sha256=rBqVeWiLEpY89EIpfnSENOYsNYxsJcV_Y2UuBalE104,16438
8
8
  maps4fs/generator/game.py,sha256=94HjPNOyy6XSSOnBp-uxrkBglKyC-X3ULIrrucfdlKw,6825
9
9
  maps4fs/generator/i3d.py,sha256=UuQiQRusPQ2f6PvGKxJ_UZeXsx3uG15efmy8Ysnm3F8,3597
10
- maps4fs/generator/map.py,sha256=v8OOLmhAkgqq64tQgEDbV6DmbgOVm3NXJBDDy0nJf60,4226
10
+ maps4fs/generator/map.py,sha256=_LQe54KLfS_4M462UiiNSqKyUroqnQ8inwXZIZDP9a0,4487
11
11
  maps4fs/generator/path_steps.py,sha256=yeN6hmOD8O2LMozUf4HcQMIy8WJ5sHF5pGQT_s2FfOw,3147
12
12
  maps4fs/generator/qgis.py,sha256=R5Iv3ovyLXkhAL5Oy41u3ZLNOSEbc1byLetzPootO7o,6091
13
13
  maps4fs/generator/texture.py,sha256=CwaXZfAG4e3D3YR7yVR2MC677EHpbUWTboCS3G6jkhk,17723
14
14
  maps4fs/generator/tile.py,sha256=3vmfjQiPiiUZKPuIo5tg2rOKkgcP1NRVkMGK-Vo10-A,2138
15
15
  maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
16
16
  maps4fs/toolbox/dem.py,sha256=53KVZ6IKIlK642eYFSRDAC8l2HL9IEUpQNYkkTC56uU,3510
17
- maps4fs-0.9.9.dist-info/LICENSE.md,sha256=-JY0v7p3dwXze61EbYiK7YEJ2aKrjaFZ8y2xYEOrmRY,1068
18
- maps4fs-0.9.9.dist-info/METADATA,sha256=rWT-sSS7QfXGArOqjWMLdCxSRm0bkGd0uMZwJegayZc,25170
19
- maps4fs-0.9.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
20
- maps4fs-0.9.9.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
21
- maps4fs-0.9.9.dist-info/RECORD,,
17
+ maps4fs-0.9.91.dist-info/LICENSE.md,sha256=-JY0v7p3dwXze61EbYiK7YEJ2aKrjaFZ8y2xYEOrmRY,1068
18
+ maps4fs-0.9.91.dist-info/METADATA,sha256=f3HjLTLqTPdawct_RVHaq4004NR07XR440jh80KBRA8,25171
19
+ maps4fs-0.9.91.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
20
+ maps4fs-0.9.91.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
21
+ maps4fs-0.9.91.dist-info/RECORD,,