pywargame 0.4.1__tar.gz → 0.4.3__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.4.1 → pywargame-0.4.3}/PKG-INFO +59 -31
  2. {pywargame-0.4.1 → pywargame-0.4.3}/README.md +58 -30
  3. pywargame-0.4.3/pywargame/__init__.py +8 -0
  4. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/__init__.py +3 -0
  5. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/drawdice.py +12 -3
  6. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/test.py +2 -2
  7. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/gbxext.py +13 -9
  8. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/gsnexp.py +15 -10
  9. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/gsnext.py +9 -7
  10. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/testgrid.py +2 -1
  11. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/zeropwd.py +18 -11
  12. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/latex/latexexporter.py +7 -7
  13. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/latex/main.py +10 -6
  14. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/__init__.py +1 -0
  15. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/buildfile.py +1 -1
  16. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/collect.py +3 -2
  17. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/dumpvsav.py +7 -2
  18. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/element.py +1 -1
  19. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/gameelements.py +28 -11
  20. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/merge.py +8 -5
  21. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/moduledata.py +1 -1
  22. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/patch.py +8 -5
  23. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/trait.py +13 -10
  24. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/area.py +4 -2
  25. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/cargo.py +3 -0
  26. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/mat.py +3 -0
  27. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/vmod.py +1 -1
  28. pywargame-0.4.3/pywargame/zuntzu/__init__.py +14 -0
  29. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/countersheet.py +1 -1
  30. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/ztexp.py +10 -8
  31. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame.egg-info/PKG-INFO +59 -31
  32. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame.egg-info/SOURCES.txt +4 -16
  33. pywargame-0.4.3/pywargame.egg-info/entry_points.txt +11 -0
  34. {pywargame-0.4.1 → pywargame-0.4.3}/setup.cfg +13 -0
  35. pywargame-0.4.1/pywargame/__init__.py +0 -2
  36. pywargame-0.4.1/pywargame/cyberboard.py +0 -2728
  37. pywargame-0.4.1/pywargame/gbx0pwd.py +0 -2776
  38. pywargame-0.4.1/pywargame/gbxextract.py +0 -2795
  39. pywargame-0.4.1/pywargame/gsnexport.py +0 -16547
  40. pywargame-0.4.1/pywargame/gsnextract.py +0 -2793
  41. pywargame-0.4.1/pywargame/vassal/collectpatch.py +0 -28
  42. pywargame-0.4.1/pywargame/vassal/skel.py +0 -380
  43. pywargame-0.4.1/pywargame/vassal.py +0 -12544
  44. pywargame-0.4.1/pywargame/vmodpatch.py +0 -12592
  45. pywargame-0.4.1/pywargame/vsavdump.py +0 -12577
  46. pywargame-0.4.1/pywargame/vslmerge.py +0 -13059
  47. pywargame-0.4.1/pywargame/wgexport.py +0 -16733
  48. pywargame-0.4.1/pywargame/ztexport.py +0 -14395
  49. pywargame-0.4.1/pywargame/zuntzu/__init__.py +0 -5
  50. {pywargame-0.4.1 → pywargame-0.4.3}/LICENSE +0 -0
  51. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/collector.py +0 -0
  52. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/dicedraw.py +0 -0
  53. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/singleton.py +0 -0
  54. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/verbose.py +0 -0
  55. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/common/verboseguard.py +0 -0
  56. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/__init__.py +0 -0
  57. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/archive.py +0 -0
  58. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/base.py +0 -0
  59. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/board.py +0 -0
  60. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/cell.py +0 -0
  61. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/collect.py +0 -0
  62. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/collectgbx0pwd.py +0 -0
  63. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/collectgbxext.py +0 -0
  64. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/collectgsnexp.py +0 -0
  65. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/collectgsnext.py +0 -0
  66. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/draw.py +0 -0
  67. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/exporter.py +0 -0
  68. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/extractor.py +0 -0
  69. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/features.py +0 -0
  70. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/gamebox.py +0 -0
  71. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/gbxexp.py +0 -0
  72. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/head.py +0 -0
  73. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/image.py +0 -0
  74. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/main.py +0 -0
  75. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/mark.py +0 -0
  76. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/palette.py +0 -0
  77. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/piece.py +0 -0
  78. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/player.py +0 -0
  79. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/scenario.py +0 -0
  80. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/tile.py +0 -0
  81. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/tray.py +0 -0
  82. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/cyberboard/windows.py +0 -0
  83. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/latex/__init__.py +0 -0
  84. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/latex/collect.py +0 -0
  85. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/base.py +0 -0
  86. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/board.py +0 -0
  87. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/chart.py +0 -0
  88. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/chessclock.py +0 -0
  89. /pywargame-0.4.1/pywargame/vassal/dumpcollect.py → /pywargame-0.4.3/pywargame/vassal/collectdump.py +0 -0
  90. /pywargame-0.4.1/pywargame/vassal/mrgcollect.py → /pywargame-0.4.3/pywargame/vassal/collectmrg.py +0 -0
  91. /pywargame-0.4.1/pywargame/vassal/patchcollect.py → /pywargame-0.4.3/pywargame/vassal/collectpatch.py +0 -0
  92. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/command.py +0 -0
  93. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/documentation.py +0 -0
  94. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/exporter.py +0 -0
  95. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/extension.py +0 -0
  96. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/folder.py +0 -0
  97. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/game.py +0 -0
  98. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/globalkey.py +0 -0
  99. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/globalproperty.py +0 -0
  100. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/grid.py +0 -0
  101. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/map.py +0 -0
  102. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/mapelements.py +0 -0
  103. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/merger.py +0 -0
  104. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/player.py +0 -0
  105. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/save.py +0 -0
  106. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/__init__.py +0 -0
  107. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/basic.py +0 -0
  108. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/calculatedproperty.py +0 -0
  109. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/click.py +0 -0
  110. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/clone.py +0 -0
  111. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/delete.py +0 -0
  112. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/deselect.py +0 -0
  113. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/dynamicproperty.py +0 -0
  114. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/globalcommand.py +0 -0
  115. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/globalhotkey.py +0 -0
  116. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/globalproperty.py +0 -0
  117. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/hide.py +0 -0
  118. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/label.py +0 -0
  119. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/layer.py +0 -0
  120. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/mark.py +0 -0
  121. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/mask.py +0 -0
  122. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/moved.py +0 -0
  123. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/movefixed.py +0 -0
  124. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/nonrect.py +0 -0
  125. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/nostack.py +0 -0
  126. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/place.py +0 -0
  127. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/prototype.py +0 -0
  128. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/report.py +0 -0
  129. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/restrictaccess.py +0 -0
  130. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/restrictcommand.py +0 -0
  131. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/retrn.py +0 -0
  132. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/rotate.py +0 -0
  133. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/sendto.py +0 -0
  134. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/sheet.py +0 -0
  135. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/skel.py +0 -0
  136. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/stack.py +0 -0
  137. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/submenu.py +0 -0
  138. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/trail.py +0 -0
  139. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/traits/trigger.py +0 -0
  140. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/turn.py +0 -0
  141. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/upgrade.py +0 -0
  142. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/vsav.py +0 -0
  143. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/widget.py +0 -0
  144. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/withtraits.py +0 -0
  145. /pywargame-0.4.1/pywargame/vassal/xml.py → /pywargame-0.4.3/pywargame/vassal/xmlns.py +0 -0
  146. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/vassal/zone.py +0 -0
  147. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/base.py +0 -0
  148. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/collect.py +0 -0
  149. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/dicehand.py +0 -0
  150. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/exporter.py +0 -0
  151. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/gamebox.py +0 -0
  152. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/map.py +0 -0
  153. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/piece.py +0 -0
  154. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame/zuntzu/scenario.py +0 -0
  155. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame.egg-info/dependency_links.txt +0 -0
  156. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame.egg-info/requires.txt +0 -0
  157. {pywargame-0.4.1 → pywargame-0.4.3}/pywargame.egg-info/top_level.txt +0 -0
  158. {pywargame-0.4.1 → pywargame-0.4.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywargame
3
- Version: 0.4.1
3
+ Version: 0.4.3
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,15 @@ 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.3
57
+ - Update for CI/CD
58
+ - 0.4.2
59
+ - Some fixes for imports
60
+ - Scripts done as entry points in `pip` install
61
+ - 0.4.1
62
+ - Some fixes to `pip` releases
63
+ - 0.4.0
64
+ - First release via `pip`
59
65
  - 2nd of February, 2024
60
66
  - Fix problem with background of maps exported from CyberBoard
61
67
  gamebox. Thanks to @zovs66 for pointing this out.
@@ -64,47 +70,56 @@ date.
64
70
 
65
71
  ## Scripts
66
72
 
67
- - [`vslmerge.py`](vassal/merge.py) merges VASSAL modules and
73
+ - [`vslmerge.py`](pywargame/vassal/merge.py) merges VASSAL modules and
68
74
  extensions together into one module. This is work in progress.
69
- Please report any problems you see.
75
+ Please report any problems you see.
70
76
 
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.
77
+ - [`vmodpatch.py`](pywargame/vassal/patch.py) patches a VASSAL modules
78
+ by running a Python script on it. The input module file is
79
+ overwritten.
74
80
 
75
- - [`vsavdump.py`](vassal/dumpsave.py) dumps the content of a VASSAL
76
- save or log file to standard output.
81
+ - [`vsavdump.py`](pywargame/vassal/dumpsave.py) dumps the content of a
82
+ VASSAL save or log file to standard output.
77
83
 
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.
84
+ - [`gbxextract.py`](pywargame/cyberboard/gbxext.py) reads in a
85
+ CyberBoard GameBox file (`.gbx`) and writes out a ZIP file with
86
+ images and a JSON file with information about the GameBox and the
87
+ images.
81
88
 
82
89
  Pieces (units and markers) are saved as PNGs, while the boards are
83
90
  saves as SVGs.
84
91
 
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.
92
+ - [`gsnextract.py`](pywargame/cyberboard/gsnext.py) reads in a
93
+ CyberBoard Scenario file (`.gsn`) and writes out a ZIP file with
94
+ images and a JSON file with information about the Scenario, GameBox,
95
+ and the images.
89
96
 
90
97
  Pieces (units and markers) are saved as PNGs, while the boards are
91
98
  saves as SVGs.
92
99
 
93
- - [`gsnexport.py`](cyberboard/gsnexp.py) reads in a
100
+ - [`gsnexport.py`](pywargame/cyberboard/gsnexp.py) reads in a
94
101
  CyberBoard Scenario file (`.gsn`) and generates a (draft) VASSAL
95
- module. A Python script can be supplied to patch up the module.
102
+ module. A Python script can be supplied to patch up the module.
96
103
 
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.
104
+ - [`ztexport.py`](pywargame/zuntzu/ztexp.py) reads in a ZunTzu game
105
+ box file (`.ztb`) and generates a (draft) VASSAL module. A Python
106
+ script can be supplied to patch up the module.
100
107
 
101
- - [`wgexport.py`](latex/main.py) reads in a PDF and JSON file created
102
- from LaTeX sources using the
108
+ - [`wgexport.py`](pywargame/latex/main.py) reads in a PDF and JSON
109
+ file created from LaTeX sources using the
103
110
  [`wargame`](https://gitlab.com/wargames_tex/wargame_tex) package,
104
111
  and generates a (draft) VASSAL module. A Python script can be
105
112
  supplied to patch up the module.
113
+
114
+ ## Installation via `pip`
106
115
 
107
- ## Download
116
+ Just do
117
+
118
+ ```
119
+ $ pip install pywargame
120
+ ```
121
+
122
+ ## Download as scripts
108
123
 
109
124
  You can get the scripts in ZIP file
110
125
 
@@ -125,7 +140,8 @@ or individually
125
140
  - [requirements.txt][]
126
141
  - [README.md][]
127
142
 
128
- or [browse][] the files.
143
+ or [browse][] the files. Note that these scripts are _standalone_ and
144
+ does not require a module installation of `pywargame`.
129
145
 
130
146
  ## Build
131
147
 
@@ -145,15 +161,24 @@ to ensure you have those installed.
145
161
  To generate these scripts, do
146
162
 
147
163
  cd pywargame/vassal && ./collect.py
164
+ cd pywargame/vassal && ./collectmrg.py
165
+ cd pywargame/vassal && ./collectpatch.py
166
+ cd pywargame/vassal && ./collectdump.py
148
167
  cd pywargame/cyberboard && ./collect.py
149
168
  cd pywargame/cyberboard && ./collectgbxext.py
150
169
  cd pywargame/cyberboard && ./collectgsnext.py
151
170
  cd pywargame/cyberboard && ./collectgsnexp.py
171
+ cd pywargame/zuntzu && ./collect.py
152
172
  cd pywargame/latex && ./collect.py
173
+ cp pywargame/vassal/vassal.py .
174
+ cp pywargame/vassal/vslmerge.py .
175
+ cp pywargame/vassal/vmodpatch.py .
176
+ cp pywargame/vassal/vsavdump.py .
153
177
  cp pywargame/cyberboard/gbxextract.py .
154
178
  cp pywargame/cyberboard/gsnextract.py .
155
179
  cp pywargame/cyberboard/gsnexport.py .
156
- cp pywargame/latex/wgexport.py .
180
+ cp pywargame/zuntzu/ztexport.py .
181
+ cp pywargame/latex/wgexport.py .
157
182
 
158
183
  or simply, on most modern operating systems,
159
184
 
@@ -203,7 +228,7 @@ scenario - can then be merged into one using the
203
228
  [`vslmerge.py`](vassal/merge.py) script.
204
229
 
205
230
  CyberBoard game boxes and scenarios made with CyberBoard prior to
206
- version 3.0 are _not_ supported. You may have some luck opening first
231
+ version 3.0 are _not_ supported. You may have some luck first opening
207
232
  the game box and then the scenario with `CBDesign.exe` and
208
233
  `CBPlay.exe`, respectively, and saving anew. Of course, this requires
209
234
  an installation of CyberBoard (on Linux, use
@@ -275,6 +300,9 @@ details, if that happens to you.
275
300
 
276
301
  ## API
277
302
 
303
+ The API documentation is available
304
+ [here](https://wargames_tex.gitlab.io/pywargame).
305
+
278
306
  The module [`vassal`](vassal) allows one to generate a VASSAL module
279
307
  programmatically, or to read in a VASSAL module and manipulate it
280
308
  programmatically. It also has features for defining a _save_
@@ -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,15 @@ 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.3
32
+ - Update for CI/CD
33
+ - 0.4.2
34
+ - Some fixes for imports
35
+ - Scripts done as entry points in `pip` install
36
+ - 0.4.1
37
+ - Some fixes to `pip` releases
38
+ - 0.4.0
39
+ - First release via `pip`
34
40
  - 2nd of February, 2024
35
41
  - Fix problem with background of maps exported from CyberBoard
36
42
  gamebox. Thanks to @zovs66 for pointing this out.
@@ -39,47 +45,56 @@ date.
39
45
 
40
46
  ## Scripts
41
47
 
42
- - [`vslmerge.py`](vassal/merge.py) merges VASSAL modules and
48
+ - [`vslmerge.py`](pywargame/vassal/merge.py) merges VASSAL modules and
43
49
  extensions together into one module. This is work in progress.
44
- Please report any problems you see.
50
+ Please report any problems you see.
45
51
 
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.
52
+ - [`vmodpatch.py`](pywargame/vassal/patch.py) patches a VASSAL modules
53
+ by running a Python script on it. The input module file is
54
+ overwritten.
49
55
 
50
- - [`vsavdump.py`](vassal/dumpsave.py) dumps the content of a VASSAL
51
- save or log file to standard output.
56
+ - [`vsavdump.py`](pywargame/vassal/dumpsave.py) dumps the content of a
57
+ VASSAL save or log file to standard output.
52
58
 
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.
59
+ - [`gbxextract.py`](pywargame/cyberboard/gbxext.py) reads in a
60
+ CyberBoard GameBox file (`.gbx`) and writes out a ZIP file with
61
+ images and a JSON file with information about the GameBox and the
62
+ images.
56
63
 
57
64
  Pieces (units and markers) are saved as PNGs, while the boards are
58
65
  saves as SVGs.
59
66
 
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.
67
+ - [`gsnextract.py`](pywargame/cyberboard/gsnext.py) reads in a
68
+ CyberBoard Scenario file (`.gsn`) and writes out a ZIP file with
69
+ images and a JSON file with information about the Scenario, GameBox,
70
+ and the images.
64
71
 
65
72
  Pieces (units and markers) are saved as PNGs, while the boards are
66
73
  saves as SVGs.
67
74
 
68
- - [`gsnexport.py`](cyberboard/gsnexp.py) reads in a
75
+ - [`gsnexport.py`](pywargame/cyberboard/gsnexp.py) reads in a
69
76
  CyberBoard Scenario file (`.gsn`) and generates a (draft) VASSAL
70
- module. A Python script can be supplied to patch up the module.
77
+ module. A Python script can be supplied to patch up the module.
71
78
 
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.
79
+ - [`ztexport.py`](pywargame/zuntzu/ztexp.py) reads in a ZunTzu game
80
+ box file (`.ztb`) and generates a (draft) VASSAL module. A Python
81
+ script can be supplied to patch up the module.
75
82
 
76
- - [`wgexport.py`](latex/main.py) reads in a PDF and JSON file created
77
- from LaTeX sources using the
83
+ - [`wgexport.py`](pywargame/latex/main.py) reads in a PDF and JSON
84
+ file created from LaTeX sources using the
78
85
  [`wargame`](https://gitlab.com/wargames_tex/wargame_tex) package,
79
86
  and generates a (draft) VASSAL module. A Python script can be
80
87
  supplied to patch up the module.
88
+
89
+ ## Installation via `pip`
81
90
 
82
- ## Download
91
+ Just do
92
+
93
+ ```
94
+ $ pip install pywargame
95
+ ```
96
+
97
+ ## Download as scripts
83
98
 
84
99
  You can get the scripts in ZIP file
85
100
 
@@ -100,7 +115,8 @@ or individually
100
115
  - [requirements.txt][]
101
116
  - [README.md][]
102
117
 
103
- or [browse][] the files.
118
+ or [browse][] the files. Note that these scripts are _standalone_ and
119
+ does not require a module installation of `pywargame`.
104
120
 
105
121
  ## Build
106
122
 
@@ -120,15 +136,24 @@ to ensure you have those installed.
120
136
  To generate these scripts, do
121
137
 
122
138
  cd pywargame/vassal && ./collect.py
139
+ cd pywargame/vassal && ./collectmrg.py
140
+ cd pywargame/vassal && ./collectpatch.py
141
+ cd pywargame/vassal && ./collectdump.py
123
142
  cd pywargame/cyberboard && ./collect.py
124
143
  cd pywargame/cyberboard && ./collectgbxext.py
125
144
  cd pywargame/cyberboard && ./collectgsnext.py
126
145
  cd pywargame/cyberboard && ./collectgsnexp.py
146
+ cd pywargame/zuntzu && ./collect.py
127
147
  cd pywargame/latex && ./collect.py
148
+ cp pywargame/vassal/vassal.py .
149
+ cp pywargame/vassal/vslmerge.py .
150
+ cp pywargame/vassal/vmodpatch.py .
151
+ cp pywargame/vassal/vsavdump.py .
128
152
  cp pywargame/cyberboard/gbxextract.py .
129
153
  cp pywargame/cyberboard/gsnextract.py .
130
154
  cp pywargame/cyberboard/gsnexport.py .
131
- cp pywargame/latex/wgexport.py .
155
+ cp pywargame/zuntzu/ztexport.py .
156
+ cp pywargame/latex/wgexport.py .
132
157
 
133
158
  or simply, on most modern operating systems,
134
159
 
@@ -178,7 +203,7 @@ scenario - can then be merged into one using the
178
203
  [`vslmerge.py`](vassal/merge.py) script.
179
204
 
180
205
  CyberBoard game boxes and scenarios made with CyberBoard prior to
181
- version 3.0 are _not_ supported. You may have some luck opening first
206
+ version 3.0 are _not_ supported. You may have some luck first opening
182
207
  the game box and then the scenario with `CBDesign.exe` and
183
208
  `CBPlay.exe`, respectively, and saving anew. Of course, this requires
184
209
  an installation of CyberBoard (on Linux, use
@@ -250,6 +275,9 @@ details, if that happens to you.
250
275
 
251
276
  ## API
252
277
 
278
+ The API documentation is available
279
+ [here](https://wargames_tex.gitlab.io/pywargame).
280
+
253
281
  The module [`vassal`](vassal) allows one to generate a VASSAL module
254
282
  programmatically, or to read in a VASSAL module and manipulate it
255
283
  programmatically. It also has features for defining a _save_
@@ -0,0 +1,8 @@
1
+ '''Top-level module'''
2
+ version = '0.4.3'
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
@@ -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:
@@ -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,14 @@
1
1
  #!/usr/bin/env python
2
+ ## BEGIN_IMPORTS
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
8
+ ## END_IMPORTS
2
9
 
3
10
  # ====================================================================
4
- def gsnexp():
5
- ## BEGIN_IMPORTS
6
- from sys import path
7
- path.append('..')
8
- from pywargame.common import Verbose
9
- from pywargame.cyberboard.exporter import GSNExporter
10
- from pywargame.cyberboard.scenario import Scenario
11
- from pywargame.cyberboard.extractor import GSNExtractor
12
- from pywargame.cyberboard.head import GBXHeader
13
- ## END_IMPORTS
11
+ def exportMain():
14
12
 
15
13
  from argparse import ArgumentParser, FileType, \
16
14
  RawDescriptionHelpFormatter
@@ -147,5 +145,12 @@ def gsnexp():
147
145
  raise e
148
146
 
149
147
 
148
+ # ====================================================================
150
149
  if __name__ == '__main__':
151
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
- def gsnext():
17
+ def extractMain():
12
18
  from argparse import ArgumentParser, FileType
13
19
  from pathlib import Path
14
- ## BEGIN_IMPORT
15
- from pywargame.cyberboard.scenario import Scenario
16
- from pywargame.cyberboard.extractor import GSNExtractor
17
- from pywargame.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,7 @@ def gsnext():
50
51
  if 'gsn' in args.dump:
51
52
  print(gsn)
52
53
 
54
+ # ====================================================================
53
55
  if __name__ == '__main__':
54
56
  gsnext()
55
57
 
@@ -146,7 +146,8 @@ def testall():
146
146
 
147
147
 
148
148
 
149
- testall()
149
+ if __name__ == '__main__':
150
+ testall()
150
151
 
151
152
 
152
153
 
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env python
2
2
  ## BEGIN_IMPORT
3
- from gamebox import GBXInfo
4
- from head import GBXHeader
5
- from archive import Archive
3
+ from pywargame.cyberboard.gamebox import GBXInfo
4
+ from pywargame.cyberboard.head import GBXHeader
5
+ from pywargame.cyberboard.archive import Archive
6
6
  ## END_IMPORT
7
7
 
8
+ # --------------------------------------------------------------------
8
9
  nullpwd = b'\xee\n\xcbg\xbc\xdb\x92\x1a\x0c\xd2\xf1y\x83*\x96\xc9'
9
10
 
11
+ # --------------------------------------------------------------------
10
12
  def zeropwd(filename):
11
13
  from pathlib import Path
12
14
 
@@ -14,9 +16,7 @@ def zeropwd(filename):
14
16
  with Archive(filename,'rb') as ar:
15
17
  header = GBXHeader(ar,GBXHeader.BOX)
16
18
  box = GBXInfo(ar)
17
-
18
-
19
- pos = ar.tell() - 4*2 - 2 - 2 - 16
19
+ pos = ar.tell() - 4*2 - 2 - 2 - 16
20
20
 
21
21
  with open(filename,'rb') as file:
22
22
  cnt = file.read()
@@ -31,15 +31,22 @@ def zeropwd(filename):
31
31
  with open(on,'wb') as file:
32
32
  file.write(ncnt)
33
33
 
34
-
35
- if __name__ == '__main__':
34
+ # --------------------------------------------------------------------
35
+ def zeroPwdMain():
36
36
  from argparse import ArgumentParser, FileType
37
37
  ap = ArgumentParser(description='Disable password in gamebox')
38
- ap.add_argument('input', type=str, help='The file')
38
+ ap.add_argument('input', type=str, help='The game box file')
39
39
 
40
40
  args = ap.parse_args()
41
41
 
42
42
  zeropwd(args.input)
43
+
44
+ # --------------------------------------------------------------------
45
+ if __name__ == '__main__':
46
+ zeroPwdMain()
43
47
 
44
-
45
-
48
+ # --------------------------------------------------------------------
49
+ #
50
+ # EOF
51
+ #
52
+
@@ -1,11 +1,11 @@
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
9
  from pprint import pprint
10
10
 
11
11
  ## END_IMPORTS
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env python
2
2
  ## BEGIN_IMPORTS
3
- from latexexporter import LaTeXExporter
4
- from vassal.vmod import VMod
5
- from common import Verbose
3
+ from pywargame.latex.latexexporter import LaTeXExporter
4
+ from pywargame.vassal.vmod import VMod
5
+ from pywargame.common import Verbose
6
6
  ## END_IMPORTS
7
7
 
8
8
  from argparse import ArgumentParser
@@ -88,9 +88,9 @@ def exportIt(args):
88
88
 
89
89
  raise e
90
90
 
91
-
91
+
92
92
  # ====================================================================
93
- if __name__ == '__main__':
93
+ def exportMain():
94
94
  from argparse import ArgumentParser, FileType
95
95
 
96
96
  ap = DefaultSubcommandArgParse(description='Create draft VASSAL module')
@@ -178,7 +178,11 @@ if __name__ == '__main__':
178
178
  patchIt(args)
179
179
  else:
180
180
  exportIt(args)
181
-
181
+
182
+ # ====================================================================
183
+ if __name__ == '__main__':
184
+ exportMain()
185
+
182
186
  #
183
187
  # EOF
184
188
  #
@@ -64,3 +64,4 @@ from . save import *
64
64
  from . vsav import *
65
65
  from . vmod import *
66
66
  from . exporter import *
67
+ from . merger import Merger
@@ -3,7 +3,7 @@ from .. common import VerboseGuard
3
3
  from . base import *
4
4
  from . element import Element
5
5
  from . game import Game
6
- from . xml import xmlns
6
+ from . xmlns import xmlns
7
7
  ## END_IMPORT
8
8
 
9
9
  # --------------------------------------------------------------------
@@ -28,7 +28,7 @@ if __name__ == '__main__':
28
28
  '../common/verbose.py',
29
29
  '../common/verboseguard.py',
30
30
  '../common/dicedraw.py',
31
- 'xml.py',
31
+ 'xmlns.py',
32
32
  'base.py',
33
33
  'element.py',
34
34
  'folder.py',
@@ -93,6 +93,7 @@ if __name__ == '__main__':
93
93
  'vsav.py',
94
94
  'vmod.py',
95
95
  'upgrade.py',
96
- 'exporter.py')
96
+ 'exporter.py',
97
+ 'merger.py')
97
98
 
98
99