pywargame 0.3.1__tar.gz → 0.4.2__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 (158) hide show
  1. {pywargame-0.3.1 → pywargame-0.4.2}/PKG-INFO +51 -31
  2. {pywargame-0.3.1 → pywargame-0.4.2}/README.md +50 -30
  3. pywargame-0.4.2/pywargame/__init__.py +8 -0
  4. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/__init__.py +3 -0
  5. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/dicedraw.py +6 -1
  6. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/drawdice.py +12 -3
  7. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/test.py +2 -2
  8. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/__init__.py +2 -0
  9. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/archive.py +2 -2
  10. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/base.py +2 -1
  11. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/board.py +3 -1
  12. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/cell.py +2 -1
  13. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/draw.py +2 -1
  14. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/exporter.py +8 -7
  15. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/extractor.py +1 -1
  16. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/features.py +1 -1
  17. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/gamebox.py +1 -1
  18. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/gbxext.py +13 -9
  19. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/gsnexp.py +17 -8
  20. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/gsnext.py +12 -7
  21. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/head.py +2 -1
  22. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/image.py +1 -1
  23. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/mark.py +1 -1
  24. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/palette.py +2 -1
  25. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/piece.py +2 -1
  26. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/player.py +1 -1
  27. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/scenario.py +1 -1
  28. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/testgrid.py +2 -1
  29. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/tile.py +2 -1
  30. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/tray.py +2 -1
  31. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/windows.py +1 -1
  32. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/zeropwd.py +18 -11
  33. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/latex/latexexporter.py +7 -7
  34. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/latex/main.py +10 -6
  35. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/__init__.py +3 -2
  36. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/board.py +1 -1
  37. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/buildfile.py +2 -1
  38. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/chart.py +1 -1
  39. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/chessclock.py +1 -1
  40. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/collect.py +4 -3
  41. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/collectpatch.py +0 -0
  42. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/command.py +1 -1
  43. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/documentation.py +1 -1
  44. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/dumpvsav.py +7 -2
  45. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/element.py +2 -1
  46. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/exporter.py +2 -2
  47. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/extension.py +1 -1
  48. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/folder.py +1 -1
  49. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/game.py +1 -1
  50. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/gameelements.py +29 -12
  51. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/globalproperty.py +1 -1
  52. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/grid.py +1 -1
  53. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/map.py +1 -1
  54. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/mapelements.py +1 -1
  55. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/merge.py +8 -5
  56. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/merger.py +1 -1
  57. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/moduledata.py +2 -1
  58. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/patch.py +8 -5
  59. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/player.py +1 -1
  60. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/trait.py +13 -10
  61. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/__init__.py +1 -1
  62. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/area.py +5 -3
  63. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/basic.py +1 -1
  64. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/calculatedproperty.py +1 -1
  65. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/cargo.py +4 -1
  66. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/click.py +1 -1
  67. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/clone.py +1 -1
  68. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/delete.py +1 -1
  69. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/deselect.py +1 -1
  70. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/dynamicproperty.py +1 -1
  71. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/globalcommand.py +1 -1
  72. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/globalhotkey.py +1 -1
  73. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/globalproperty.py +1 -1
  74. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/hide.py +1 -1
  75. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/label.py +1 -1
  76. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/layer.py +1 -1
  77. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/mark.py +1 -1
  78. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/mask.py +1 -1
  79. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/mat.py +4 -1
  80. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/moved.py +1 -1
  81. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/movefixed.py +1 -1
  82. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/nonrect.py +1 -1
  83. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/nostack.py +1 -1
  84. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/place.py +1 -1
  85. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/prototype.py +1 -1
  86. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/report.py +1 -1
  87. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/restrictaccess.py +1 -1
  88. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/restrictcommand.py +1 -1
  89. pywargame-0.3.1/pywargame/vassal/traits/return.py → pywargame-0.4.2/pywargame/vassal/traits/retrn.py +1 -1
  90. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/rotate.py +1 -1
  91. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/sendto.py +1 -1
  92. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/sheet.py +1 -1
  93. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/skel.py +1 -1
  94. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/stack.py +1 -1
  95. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/submenu.py +1 -1
  96. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/trail.py +1 -1
  97. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/traits/trigger.py +1 -1
  98. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/turn.py +1 -1
  99. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/upgrade.py +1 -1
  100. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/vmod.py +46 -2
  101. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/widget.py +1 -1
  102. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/withtraits.py +1 -1
  103. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/zone.py +1 -1
  104. pywargame-0.4.2/pywargame/zuntzu/__init__.py +14 -0
  105. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/countersheet.py +3 -3
  106. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/dicehand.py +2 -2
  107. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/exporter.py +10 -10
  108. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/gamebox.py +7 -7
  109. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/map.py +2 -2
  110. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/scenario.py +2 -2
  111. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/ztexp.py +10 -8
  112. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame.egg-info/PKG-INFO +51 -31
  113. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame.egg-info/SOURCES.txt +5 -17
  114. pywargame-0.4.2/pywargame.egg-info/entry_points.txt +11 -0
  115. {pywargame-0.3.1 → pywargame-0.4.2}/setup.cfg +13 -0
  116. pywargame-0.3.1/pywargame/__init__.py +0 -2
  117. pywargame-0.3.1/pywargame/cyberboard.py +0 -2728
  118. pywargame-0.3.1/pywargame/gbx0pwd.py +0 -2776
  119. pywargame-0.3.1/pywargame/gbxextract.py +0 -2795
  120. pywargame-0.3.1/pywargame/gsnexport.py +0 -16499
  121. pywargame-0.3.1/pywargame/gsnextract.py +0 -2790
  122. pywargame-0.3.1/pywargame/vassal/patchcollect.py +0 -28
  123. pywargame-0.3.1/pywargame/vassal/skel.py +0 -380
  124. pywargame-0.3.1/pywargame/vassal.py +0 -12500
  125. pywargame-0.3.1/pywargame/vmodpatch.py +0 -12548
  126. pywargame-0.3.1/pywargame/vsavdump.py +0 -12533
  127. pywargame-0.3.1/pywargame/vslmerge.py +0 -13015
  128. pywargame-0.3.1/pywargame/wgexport.py +0 -16689
  129. pywargame-0.3.1/pywargame/ztexport.py +0 -14351
  130. pywargame-0.3.1/pywargame/zuntzu/__init__.py +0 -5
  131. {pywargame-0.3.1 → pywargame-0.4.2}/LICENSE +0 -0
  132. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/collector.py +0 -0
  133. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/singleton.py +0 -0
  134. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/verbose.py +0 -0
  135. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/common/verboseguard.py +0 -0
  136. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/collect.py +0 -0
  137. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/collectgbx0pwd.py +0 -0
  138. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/collectgbxext.py +0 -0
  139. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/collectgsnexp.py +0 -0
  140. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/collectgsnext.py +0 -0
  141. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/gbxexp.py +0 -0
  142. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/cyberboard/main.py +0 -0
  143. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/latex/__init__.py +0 -0
  144. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/latex/collect.py +0 -0
  145. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/base.py +0 -0
  146. /pywargame-0.3.1/pywargame/vassal/dumpcollect.py → /pywargame-0.4.2/pywargame/vassal/collectdump.py +0 -0
  147. /pywargame-0.3.1/pywargame/vassal/mrgcollect.py → /pywargame-0.4.2/pywargame/vassal/collectmrg.py +0 -0
  148. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/globalkey.py +0 -0
  149. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/save.py +0 -0
  150. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/vassal/vsav.py +0 -0
  151. /pywargame-0.3.1/pywargame/vassal/xml.py → /pywargame-0.4.2/pywargame/vassal/xmlns.py +0 -0
  152. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/base.py +0 -0
  153. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/collect.py +0 -0
  154. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame/zuntzu/piece.py +0 -0
  155. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame.egg-info/dependency_links.txt +0 -0
  156. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame.egg-info/requires.txt +0 -0
  157. {pywargame-0.3.1 → pywargame-0.4.2}/pywargame.egg-info/top_level.txt +0 -0
  158. {pywargame-0.3.1 → pywargame-0.4.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywargame
3
- Version: 0.3.1
3
+ Version: 0.4.2
4
4
  Summary: Python library to manipulate wargame modules
5
5
  Home-page: https://wargames_tex.gitlab.io/pywargame/
6
6
  Author: Christian Holm Christensen
@@ -32,7 +32,7 @@ Aided Wargaming (CAW).
32
32
 
33
33
  - [`pywargame`](pywargame) Top of package
34
34
  - [`common`](pywargame/common) Common utilities used by other code.
35
- - [`vassal`](pywargame/vassal) Read or write
35
+ - [`vassal`](pywargame/vassal) Read or write
36
36
  [VASSAL](https://vassalengine.org)
37
37
  ([GitHub](https://github.com/vassalengine/vassal)) modules,
38
38
  including
@@ -42,7 +42,7 @@ Aided Wargaming (CAW).
42
42
  - [`cyberboard`](pywargame/cyberboard) Read
43
43
  [CyberBoard](http://cyberboard.norsesoft.com/)
44
44
  ([GitHub](https://github.com/CyberBoardPBEM/cbwindows)) GameBox
45
- files.
45
+ and scenario files.
46
46
  - [`zuntzu`](pywargame/zuntzu) Convert [ZunTzu](https://zuntzu.com)
47
47
  ([GitHub](https://github.com/ZunTzu-Software/ZunTzu)) GameBox to
48
48
  VASSAL module.
@@ -53,9 +53,10 @@ Aided Wargaming (CAW).
53
53
 
54
54
  ## Changes
55
55
 
56
- The code isn't versioned yet, and therefore the changes are given by
57
- date.
58
-
56
+ - 0.4.1
57
+ - Some fixes to `pip` releases
58
+ - 0.4.0
59
+ - First release via `pip`
59
60
  - 2nd of February, 2024
60
61
  - Fix problem with background of maps exported from CyberBoard
61
62
  gamebox. Thanks to @zovs66 for pointing this out.
@@ -64,47 +65,56 @@ date.
64
65
 
65
66
  ## Scripts
66
67
 
67
- - [`vslmerge.py`](vassal/merge.py) merges VASSAL modules and
68
+ - [`vslmerge.py`](pywargame/vassal/merge.py) merges VASSAL modules and
68
69
  extensions together into one module. This is work in progress.
69
- Please report any problems you see.
70
+ Please report any problems you see.
70
71
 
71
- - [`vmodpatch.py`](vassal/patch.py) patches a VASSAL modules by
72
- running a Python script on it. The input module file is
73
- overwritten.
72
+ - [`vmodpatch.py`](pywargame/vassal/patch.py) patches a VASSAL modules
73
+ by running a Python script on it. The input module file is
74
+ overwritten.
74
75
 
75
- - [`vsavdump.py`](vassal/dumpsave.py) dumps the content of a VASSAL
76
- save or log file to standard output.
76
+ - [`vsavdump.py`](pywargame/vassal/dumpsave.py) dumps the content of a
77
+ VASSAL save or log file to standard output.
77
78
 
78
- - [`gbxextract.py`](cyberboard/gbxext.py) reads in a CyberBoard
79
- GameBox file (`.gbx`) and writes out a ZIP file with images and a
80
- JSON file with information about the GameBox and the images.
79
+ - [`gbxextract.py`](pywargame/cyberboard/gbxext.py) reads in a
80
+ CyberBoard GameBox file (`.gbx`) and writes out a ZIP file with
81
+ images and a JSON file with information about the GameBox and the
82
+ images.
81
83
 
82
84
  Pieces (units and markers) are saved as PNGs, while the boards are
83
85
  saves as SVGs.
84
86
 
85
- - [`gsnextract.py`](cyberboard/gsnext.py) reads in a CyberBoard
86
- Scenario file (`.gsn`) and writes out a ZIP file with images and a
87
- JSON file with information about the Scenario, GameBox, and the
88
- images.
87
+ - [`gsnextract.py`](pywargame/cyberboard/gsnext.py) reads in a
88
+ CyberBoard Scenario file (`.gsn`) and writes out a ZIP file with
89
+ images and a JSON file with information about the Scenario, GameBox,
90
+ and the images.
89
91
 
90
92
  Pieces (units and markers) are saved as PNGs, while the boards are
91
93
  saves as SVGs.
92
94
 
93
- - [`gsnexport.py`](cyberboard/gsnexp.py) reads in a
95
+ - [`gsnexport.py`](pywargame/cyberboard/gsnexp.py) reads in a
94
96
  CyberBoard Scenario file (`.gsn`) and generates a (draft) VASSAL
95
- module. A Python script can be supplied to patch up the module.
97
+ module. A Python script can be supplied to patch up the module.
96
98
 
97
- - [`ztexport.py`](zuntzu/ztexp.py) reads in a ZunTzu game box file
98
- (`.ztb`) and generates a (draft) VASSAL module. A Python script can
99
- be supplied to patch up the module.
99
+ - [`ztexport.py`](pywargame/zuntzu/ztexp.py) reads in a ZunTzu game
100
+ box file (`.ztb`) and generates a (draft) VASSAL module. A Python
101
+ script can be supplied to patch up the module.
100
102
 
101
- - [`wgexport.py`](latex/main.py) reads in a PDF and JSON file created
102
- from LaTeX sources using the
103
+ - [`wgexport.py`](pywargame/latex/main.py) reads in a PDF and JSON
104
+ file created from LaTeX sources using the
103
105
  [`wargame`](https://gitlab.com/wargames_tex/wargame_tex) package,
104
106
  and generates a (draft) VASSAL module. A Python script can be
105
107
  supplied to patch up the module.
108
+
109
+ ## Installation via `pip`
110
+
111
+ Just do
112
+
113
+ ```
114
+ $ pip install pywargame
115
+ ```
106
116
 
107
- ## Download
117
+ ## Download as scripts
108
118
 
109
119
  You can get the scripts in ZIP file
110
120
 
@@ -125,7 +135,8 @@ or individually
125
135
  - [requirements.txt][]
126
136
  - [README.md][]
127
137
 
128
- or [browse][] the files.
138
+ or [browse][] the files. Note that these scripts are _standalone_ and
139
+ does not require a module installation of `pywargame`.
129
140
 
130
141
  ## Build
131
142
 
@@ -145,15 +156,24 @@ to ensure you have those installed.
145
156
  To generate these scripts, do
146
157
 
147
158
  cd pywargame/vassal && ./collect.py
159
+ cd pywargame/vassal && ./collectmrg.py
160
+ cd pywargame/vassal && ./collectpatch.py
161
+ cd pywargame/vassal && ./collectdump.py
148
162
  cd pywargame/cyberboard && ./collect.py
149
163
  cd pywargame/cyberboard && ./collectgbxext.py
150
164
  cd pywargame/cyberboard && ./collectgsnext.py
151
165
  cd pywargame/cyberboard && ./collectgsnexp.py
166
+ cd pywargame/zuntzu && ./collect.py
152
167
  cd pywargame/latex && ./collect.py
168
+ cp pywargame/vassal/vassal.py .
169
+ cp pywargame/vassal/vslmerge.py .
170
+ cp pywargame/vassal/vmodpatch.py .
171
+ cp pywargame/vassal/vsavdump.py .
153
172
  cp pywargame/cyberboard/gbxextract.py .
154
173
  cp pywargame/cyberboard/gsnextract.py .
155
174
  cp pywargame/cyberboard/gsnexport.py .
156
- cp pywargame/latex/wgexport.py .
175
+ cp pywargame/zuntzu/ztexport.py .
176
+ cp pywargame/latex/wgexport.py .
157
177
 
158
178
  or simply, on most modern operating systems,
159
179
 
@@ -203,7 +223,7 @@ scenario - can then be merged into one using the
203
223
  [`vslmerge.py`](vassal/merge.py) script.
204
224
 
205
225
  CyberBoard game boxes and scenarios made with CyberBoard prior to
206
- version 3.0 are _not_ supported. You may have some luck opening first
226
+ version 3.0 are _not_ supported. You may have some luck first opening
207
227
  the game box and then the scenario with `CBDesign.exe` and
208
228
  `CBPlay.exe`, respectively, and saving anew. Of course, this requires
209
229
  an installation of CyberBoard (on Linux, use
@@ -7,7 +7,7 @@ Aided Wargaming (CAW).
7
7
 
8
8
  - [`pywargame`](pywargame) Top of package
9
9
  - [`common`](pywargame/common) Common utilities used by other code.
10
- - [`vassal`](pywargame/vassal) Read or write
10
+ - [`vassal`](pywargame/vassal) Read or write
11
11
  [VASSAL](https://vassalengine.org)
12
12
  ([GitHub](https://github.com/vassalengine/vassal)) modules,
13
13
  including
@@ -17,7 +17,7 @@ Aided Wargaming (CAW).
17
17
  - [`cyberboard`](pywargame/cyberboard) Read
18
18
  [CyberBoard](http://cyberboard.norsesoft.com/)
19
19
  ([GitHub](https://github.com/CyberBoardPBEM/cbwindows)) GameBox
20
- files.
20
+ and scenario files.
21
21
  - [`zuntzu`](pywargame/zuntzu) Convert [ZunTzu](https://zuntzu.com)
22
22
  ([GitHub](https://github.com/ZunTzu-Software/ZunTzu)) GameBox to
23
23
  VASSAL module.
@@ -28,9 +28,10 @@ Aided Wargaming (CAW).
28
28
 
29
29
  ## Changes
30
30
 
31
- The code isn't versioned yet, and therefore the changes are given by
32
- date.
33
-
31
+ - 0.4.1
32
+ - Some fixes to `pip` releases
33
+ - 0.4.0
34
+ - First release via `pip`
34
35
  - 2nd of February, 2024
35
36
  - Fix problem with background of maps exported from CyberBoard
36
37
  gamebox. Thanks to @zovs66 for pointing this out.
@@ -39,47 +40,56 @@ date.
39
40
 
40
41
  ## Scripts
41
42
 
42
- - [`vslmerge.py`](vassal/merge.py) merges VASSAL modules and
43
+ - [`vslmerge.py`](pywargame/vassal/merge.py) merges VASSAL modules and
43
44
  extensions together into one module. This is work in progress.
44
- Please report any problems you see.
45
+ Please report any problems you see.
45
46
 
46
- - [`vmodpatch.py`](vassal/patch.py) patches a VASSAL modules by
47
- running a Python script on it. The input module file is
48
- overwritten.
47
+ - [`vmodpatch.py`](pywargame/vassal/patch.py) patches a VASSAL modules
48
+ by running a Python script on it. The input module file is
49
+ overwritten.
49
50
 
50
- - [`vsavdump.py`](vassal/dumpsave.py) dumps the content of a VASSAL
51
- save or log file to standard output.
51
+ - [`vsavdump.py`](pywargame/vassal/dumpsave.py) dumps the content of a
52
+ VASSAL save or log file to standard output.
52
53
 
53
- - [`gbxextract.py`](cyberboard/gbxext.py) reads in a CyberBoard
54
- GameBox file (`.gbx`) and writes out a ZIP file with images and a
55
- JSON file with information about the GameBox and the images.
54
+ - [`gbxextract.py`](pywargame/cyberboard/gbxext.py) reads in a
55
+ CyberBoard GameBox file (`.gbx`) and writes out a ZIP file with
56
+ images and a JSON file with information about the GameBox and the
57
+ images.
56
58
 
57
59
  Pieces (units and markers) are saved as PNGs, while the boards are
58
60
  saves as SVGs.
59
61
 
60
- - [`gsnextract.py`](cyberboard/gsnext.py) reads in a CyberBoard
61
- Scenario file (`.gsn`) and writes out a ZIP file with images and a
62
- JSON file with information about the Scenario, GameBox, and the
63
- images.
62
+ - [`gsnextract.py`](pywargame/cyberboard/gsnext.py) reads in a
63
+ CyberBoard Scenario file (`.gsn`) and writes out a ZIP file with
64
+ images and a JSON file with information about the Scenario, GameBox,
65
+ and the images.
64
66
 
65
67
  Pieces (units and markers) are saved as PNGs, while the boards are
66
68
  saves as SVGs.
67
69
 
68
- - [`gsnexport.py`](cyberboard/gsnexp.py) reads in a
70
+ - [`gsnexport.py`](pywargame/cyberboard/gsnexp.py) reads in a
69
71
  CyberBoard Scenario file (`.gsn`) and generates a (draft) VASSAL
70
- module. A Python script can be supplied to patch up the module.
72
+ module. A Python script can be supplied to patch up the module.
71
73
 
72
- - [`ztexport.py`](zuntzu/ztexp.py) reads in a ZunTzu game box file
73
- (`.ztb`) and generates a (draft) VASSAL module. A Python script can
74
- be supplied to patch up the module.
74
+ - [`ztexport.py`](pywargame/zuntzu/ztexp.py) reads in a ZunTzu game
75
+ box file (`.ztb`) and generates a (draft) VASSAL module. A Python
76
+ script can be supplied to patch up the module.
75
77
 
76
- - [`wgexport.py`](latex/main.py) reads in a PDF and JSON file created
77
- from LaTeX sources using the
78
+ - [`wgexport.py`](pywargame/latex/main.py) reads in a PDF and JSON
79
+ file created from LaTeX sources using the
78
80
  [`wargame`](https://gitlab.com/wargames_tex/wargame_tex) package,
79
81
  and generates a (draft) VASSAL module. A Python script can be
80
82
  supplied to patch up the module.
83
+
84
+ ## Installation via `pip`
85
+
86
+ Just do
87
+
88
+ ```
89
+ $ pip install pywargame
90
+ ```
81
91
 
82
- ## Download
92
+ ## Download as scripts
83
93
 
84
94
  You can get the scripts in ZIP file
85
95
 
@@ -100,7 +110,8 @@ or individually
100
110
  - [requirements.txt][]
101
111
  - [README.md][]
102
112
 
103
- or [browse][] the files.
113
+ or [browse][] the files. Note that these scripts are _standalone_ and
114
+ does not require a module installation of `pywargame`.
104
115
 
105
116
  ## Build
106
117
 
@@ -120,15 +131,24 @@ to ensure you have those installed.
120
131
  To generate these scripts, do
121
132
 
122
133
  cd pywargame/vassal && ./collect.py
134
+ cd pywargame/vassal && ./collectmrg.py
135
+ cd pywargame/vassal && ./collectpatch.py
136
+ cd pywargame/vassal && ./collectdump.py
123
137
  cd pywargame/cyberboard && ./collect.py
124
138
  cd pywargame/cyberboard && ./collectgbxext.py
125
139
  cd pywargame/cyberboard && ./collectgsnext.py
126
140
  cd pywargame/cyberboard && ./collectgsnexp.py
141
+ cd pywargame/zuntzu && ./collect.py
127
142
  cd pywargame/latex && ./collect.py
143
+ cp pywargame/vassal/vassal.py .
144
+ cp pywargame/vassal/vslmerge.py .
145
+ cp pywargame/vassal/vmodpatch.py .
146
+ cp pywargame/vassal/vsavdump.py .
128
147
  cp pywargame/cyberboard/gbxextract.py .
129
148
  cp pywargame/cyberboard/gsnextract.py .
130
149
  cp pywargame/cyberboard/gsnexport.py .
131
- cp pywargame/latex/wgexport.py .
150
+ cp pywargame/zuntzu/ztexport.py .
151
+ cp pywargame/latex/wgexport.py .
132
152
 
133
153
  or simply, on most modern operating systems,
134
154
 
@@ -178,7 +198,7 @@ scenario - can then be merged into one using the
178
198
  [`vslmerge.py`](vassal/merge.py) script.
179
199
 
180
200
  CyberBoard game boxes and scenarios made with CyberBoard prior to
181
- version 3.0 are _not_ supported. You may have some luck opening first
201
+ version 3.0 are _not_ supported. You may have some luck first opening
182
202
  the game box and then the scenario with `CBDesign.exe` and
183
203
  `CBPlay.exe`, respectively, and saving anew. Of course, this requires
184
204
  an installation of CyberBoard (on Linux, use
@@ -0,0 +1,8 @@
1
+ '''Top-level of module'''
2
+ version = '0.4.2'
3
+
4
+ import pywargame.common
5
+ import pywargame.vassal
6
+ import pywargame.cyberboard
7
+ import pywargame.zuntzu
8
+ import pywargame.latex
@@ -1,3 +1,6 @@
1
+ '''Common utilites
2
+
3
+ '''
1
4
  from . singleton import Singleton
2
5
  from . verbose import Verbose
3
6
  from . verboseguard import VerboseGuard
@@ -288,7 +288,12 @@ class DiceDrawer:
288
288
  path.line(to=(0.0000,0.2920))
289
289
 
290
290
 
291
- draw.number(num,yoff=.07,scale=.7)
291
+ scale = .7
292
+ yoff = .07
293
+ if num > 9:
294
+ scale *= .8
295
+ yoff = .015
296
+ draw.number(num,yoff=yoff,scale=scale)
292
297
  return draw.image()
293
298
 
294
299
 
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- if __name__ == '__main__':
3
+ # --------------------------------------------------------------------
4
+ def diceMain():
4
5
  from sys import path
5
6
 
6
7
  from argparse import ArgumentParser
7
- from dicedraw import DiceDrawer
8
+ from pywargame.common.dicedraw import DiceDrawer
8
9
 
9
10
  ap = ArgumentParser(description='Make a series of dice images')
10
11
  ap.add_argument('-n','--sides', choices=[4,6,8,10,12,20],
@@ -35,6 +36,14 @@ if __name__ == '__main__':
35
36
  range(1,args.sides+1))
36
37
  for val in vals:
37
38
  dd.draw(val).save(filename=base.format(sides=args.sides,value=val))
39
+
40
+ # --------------------------------------------------------------------
41
+ if __name__ == '__main__':
42
+ diceMain()
43
+
44
+ # --------------------------------------------------------------------
45
+ #
46
+ # EOF
47
+ #
38
48
 
39
-
40
49
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- from verboseguard import VerboseGuard
4
- from verbose import Verbose
3
+ from . verboseguard import VerboseGuard
4
+ from . verbose import Verbose
5
5
 
6
6
  def inner():
7
7
  with VerboseGuard('Entering inner') as g:
@@ -15,4 +15,6 @@ from . windows import *
15
15
  from . palette import *
16
16
  from . tray import *
17
17
  from . extractor import *
18
+ from . exporter import *
19
+
18
20
 
@@ -1,6 +1,6 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
3
- from common import Verbose
2
+ from .. common import VerboseGuard
3
+ from .. common import Verbose
4
4
  from . features import Features
5
5
  ## END_IMPORT
6
6
 
@@ -1,5 +1,6 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
+ from . features import Features
3
4
  ## END_IMPORT
4
5
 
5
6
  # --------------------------------------------------------------------
@@ -1,9 +1,11 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . draw import GBXDrawList
4
4
  from . cell import GBXCell, GBXCellGeometry
5
5
  from . base import CbManager, CbFont
6
6
  from . head import num_version
7
+ from . features import Features
8
+ from . draw import GBXDraw
7
9
  ## END_IMPORT
8
10
 
9
11
  # --------------------------------------------------------------------
@@ -1,7 +1,8 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . image import GBXImage
4
4
  from . draw import GBXDraw
5
+ from . features import Features
5
6
  ## END_IMPORT
6
7
 
7
8
  # ====================================================================
@@ -1,7 +1,8 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . image import GBXImage
4
4
  from . base import CbFont
5
+ from . features import Features
5
6
  ## END_IMPORT
6
7
 
7
8
  # ====================================================================
@@ -1,11 +1,12 @@
1
1
  ## BEGIN_IMPORTS
2
- from common import VerboseGuard, Verbose
3
- from vassal.buildfile import BuildFile
4
- from vassal.documentation import Documentation
5
- from vassal.traits import *
6
- from vassal.base import *
7
- from vassal.moduledata import ModuleData
8
- from vassal.exporter import Exporter
2
+ from .. common import VerboseGuard, Verbose
3
+ from .. vassal.buildfile import BuildFile
4
+ from .. vassal.documentation import Documentation
5
+ from .. vassal.traits import *
6
+ from .. vassal.base import *
7
+ from .. vassal.moduledata import ModuleData
8
+ from .. vassal.exporter import Exporter
9
+ from .. vassal.mapelements import LayerControl
9
10
  ## END_IMPORTS
10
11
 
11
12
  class CbExporter(Exporter):
@@ -1,5 +1,5 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  ## END_IMPORT
4
4
 
5
5
  # ====================================================================
@@ -1,6 +1,6 @@
1
1
  # --------------------------------------------------------------------
2
2
  ## BEGIN_IMPORT
3
- from common.singleton import Singleton
3
+ from .. common.singleton import Singleton
4
4
  ## END_IMPORT
5
5
 
6
6
  class Features(metaclass=Singleton):
@@ -1,5 +1,5 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . head import *
4
4
  from . tile import GBXTileManager
5
5
  from . piece import GBXPieceManager
@@ -5,17 +5,16 @@
5
5
  # https://github.com/CyberBoardPBEM/cbwindows
6
6
  #
7
7
  #
8
-
8
+ ## BEGIN_IMPORT
9
+ from pywargame.cyberboard.gamebox import GameBox
10
+ from pywargame.cyberboard.extractor import GBXExtractor
11
+ from pywargame.common import Verbose
12
+ ## END_IMPORT
9
13
 
10
14
  # ====================================================================
11
- if __name__ == '__main__':
15
+ def extractMain():
12
16
  from argparse import ArgumentParser, FileType
13
17
  from pathlib import Path
14
- ## BEGIN_IMPORT
15
- from gamebox import GameBox
16
- from extractor import GBXExtractor
17
- from common import Verbose
18
- ## END_IMPORT
19
18
 
20
19
  ap = ArgumentParser(description='Extract information from a '
21
20
  'CyberBoard GameBox file and store in ZIP archive',
@@ -58,7 +57,12 @@ if __name__ == '__main__':
58
57
  print(rat)
59
58
  if 'gbx' in args.dump:
60
59
  print(gbx)
61
-
62
60
 
63
61
 
64
-
62
+ # ====================================================================
63
+ if __name__ == '__main__':
64
+ extractMain()
65
+
66
+ #
67
+ # EOF
68
+ #
@@ -1,16 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
  ## BEGIN_IMPORTS
3
- from sys import path
4
- path.append('..')
5
- from exporter import GSNExporter
6
- from common import Verbose
7
- from scenario import Scenario
8
- from extractor import GSNExtractor
9
- from head import GBXHeader
3
+ from pywargame.common import Verbose
4
+ from pywargame.cyberboard.exporter import GSNExporter
5
+ from pywargame.cyberboard.scenario import Scenario
6
+ from pywargame.cyberboard.extractor import GSNExtractor
7
+ from pywargame.cyberboard.head import GBXHeader
10
8
  ## END_IMPORTS
11
9
 
12
10
  # ====================================================================
13
- if __name__ == '__main__':
11
+ def exportMain():
12
+
14
13
  from argparse import ArgumentParser, FileType, \
15
14
  RawDescriptionHelpFormatter
16
15
  from textwrap import wrap, dedent
@@ -145,3 +144,13 @@ if __name__ == '__main__':
145
144
 
146
145
  raise e
147
146
 
147
+
148
+ # ====================================================================
149
+ if __name__ == '__main__':
150
+ gsnexp()
151
+
152
+ # ====================================================================
153
+ #
154
+ # EOF
155
+ #
156
+
@@ -5,17 +5,18 @@
5
5
  # https://github.com/CyberBoardPBEM/cbwindows
6
6
  #
7
7
  #
8
-
8
+ # ====================================================================
9
+ ## BEGIN_IMPORT
10
+ from pywargame.cyberboard.scenario import Scenario
11
+ from pywargame.cyberboard.extractor import GSNExtractor
12
+ from pywargame.common import Verbose
13
+ ## END_IMPORT
14
+
9
15
 
10
16
  # ====================================================================
11
- if __name__ == '__main__':
17
+ def extractMain():
12
18
  from argparse import ArgumentParser, FileType
13
19
  from pathlib import Path
14
- ## BEGIN_IMPORT
15
- from scenario import Scenario
16
- from extractor import GSNExtractor
17
- from common import Verbose
18
- ## END_IMPORT
19
20
 
20
21
  ap = ArgumentParser(description='Extract information from a '
21
22
  'CyberBoard Scenario file and store in ZIP archive',
@@ -50,6 +51,10 @@ if __name__ == '__main__':
50
51
  if 'gsn' in args.dump:
51
52
  print(gsn)
52
53
 
54
+ # ====================================================================
55
+ if __name__ == '__main__':
56
+ gsnext()
57
+
53
58
  #
54
59
  # EOF
55
60
  #
@@ -1,6 +1,7 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . archive import Archive
4
+ from . features import Features
4
5
  ## END_IMPORT
5
6
 
6
7
  def num_version(major,minor):
@@ -1,5 +1,5 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  ## END_IMPORT
4
4
 
5
5
  # ====================================================================
@@ -1,5 +1,5 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . base import CbManager
4
4
  ## END_IMPORT
5
5
 
@@ -1,6 +1,7 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . head import num_version, readVector
4
+ from . features import Features
4
5
  ## END_IMPORT
5
6
 
6
7
  class GSNPalette:
@@ -1,6 +1,7 @@
1
1
  ## BEGIN_IMPORT
2
- from common import VerboseGuard
2
+ from .. common import VerboseGuard
3
3
  from . head import num_version
4
+ from . features import Features
4
5
  ## END_IMPORT
5
6
  # ====================================================================
6
7
  class GBXPieceDef: