skilleter-thingy 0.0.46__py3-none-any.whl → 0.0.47__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.

Potentially problematic release.


This version of skilleter-thingy might be problematic. Click here for more details.

@@ -0,0 +1,33 @@
1
+ #! /usr/bin/env python3
2
+
3
+ ################################################################################
4
+ """ Draw a box with text in
5
+ """
6
+ ################################################################################
7
+
8
+ import os
9
+ import sys
10
+ import argparse
11
+ import thingy.colour as colour
12
+
13
+ ################################################################################
14
+
15
+ def main():
16
+ """The guts"""
17
+ return
18
+ ################################################################################
19
+
20
+ def box():
21
+ """Entry point"""
22
+
23
+ try:
24
+ main()
25
+ except KeyboardInterrupt:
26
+ sys.exit(1)
27
+ except BrokenPipeError:
28
+ sys.exit(2)
29
+
30
+ ################################################################################
31
+
32
+ if __name__ == '__main__':
33
+ box()
@@ -39,6 +39,11 @@ TF_UNCHANGED_TAG = re.compile(r' +".*" += +".*"')
39
39
  TF_OBJECTS_CHANGED = 'Note: Objects have changed outside of Terraform'
40
40
  TF_UNCHANGED_HIDDEN = re.compile(r' +# \(\d+ unchanged (?:attribute|block|element)s? hidden\)')
41
41
 
42
+ TF_MISC_REGEX = \
43
+ [
44
+ { 'regex': re.compile(r'(Read complete after) \d+s'), 'replace': r'\1 {SECONDS}'}
45
+ ]
46
+
42
47
  ################################################################################
43
48
 
44
49
  def parse_command_line():
@@ -146,6 +151,8 @@ def cleanfile(args, infile, outfile):
146
151
  # Do things with Terraform log data
147
152
 
148
153
  if args.terraform:
154
+ clean = tidy.regex_replace(clean, TF_MISC_REGEX)
155
+
149
156
  if TF_HAS_CHANGED.fullmatch(clean):
150
157
  ignore_until = ' }'
151
158
 
@@ -59,30 +59,30 @@ RE_TIME = [
59
59
 
60
60
  {'regex': re.compile(r'[0-9]([.][0-9]*)*\s*(second[s]?)'), 'replace': '{ELAPSED}'},
61
61
 
62
- {'find': '{DATE} {TIME}', 'replace': '{DATE+TIME}'},
62
+ {'find': r'{DATE} {TIME}', 'replace': '{DATE+TIME}'},
63
63
  ]
64
64
 
65
65
  # SHA values
66
66
 
67
67
  RE_SHA256 = [
68
- {'regex': re.compile('[0-9a-f]{64}'), 'replace': '{SHA256}'},
68
+ {'regex': re.compile(r'[0-9a-f]{64}'), 'replace': '{SHA256}'},
69
69
  ]
70
70
 
71
71
  RE_SHA1 = [
72
- {'regex': re.compile('[0-9a-f]{40}'), 'replace': '{SHA1}'},
72
+ {'regex': re.compile(r'[0-9a-f]{40}'), 'replace': '{SHA1}'},
73
73
  ]
74
74
 
75
75
  # AWS ids
76
76
 
77
77
  RE_AWS = \
78
78
  [
79
- {'regex': re.compile('eni-0[0-9a-f]{16}'), 'replace': '{ENI-ID}'},
80
- {'regex': re.compile('ami-0[0-9a-f]{16}'), 'replace': '{AMI-ID}'},
81
- {'regex': re.compile('snap-0[0-9a-f]{16}'), 'replace': '{AMI-SNAP}'},
82
- {'regex': re.compile('vol-0[0-9a-f]{16}'), 'replace': '{AMI-VOL}'},
83
- {'regex': re.compile('sir-[0-9a-z]{8}'), 'replace': '{SPOT-INSTANCE}'},
84
- {'regex': re.compile('i-0[0-9a-f]{16}'), 'replace': '{EC2-ID}'},
85
- {'regex': re.compile('request id: [0-0a-f]{8}-[0-0a-f]{4}-[0-0a-f]{4}-[0-0a-f]{4}-[0-0a-f]{12}'), 'replace': 'request id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'},
79
+ {'regex': re.compile(r'eni-0[0-9a-f]{16}'), 'replace': '{ENI-ID}'},
80
+ {'regex': re.compile(r'ami-0[0-9a-f]{16}'), 'replace': '{AMI-ID}'},
81
+ {'regex': re.compile(r'snap-0[0-9a-f]{16}'), 'replace': '{AMI-SNAP}'},
82
+ {'regex': re.compile(r'vol-0[0-9a-f]{16}'), 'replace': '{AMI-VOL}'},
83
+ {'regex': re.compile(r'sir-[0-9a-z]{8}'), 'replace': '{SPOT-INSTANCE}'},
84
+ {'regex': re.compile(r'i-0[0-9a-f]{16}'), 'replace': '{EC2-ID}'},
85
+ {'regex': re.compile(r'request id: [0-0a-f]{8}-[0-0a-f]{4}-[0-0a-f]{4}-[0-0a-f]{4}-[0-0a-f]{12}'), 'replace': 'request id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'},
86
86
  ]
87
87
 
88
88
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: skilleter_thingy
3
- Version: 0.0.46
3
+ Version: 0.0.47
4
4
  Summary: A collection of useful utilities, mainly aimed at making Git more friendly
5
5
  Author-email: John Skilleter <john@skilleter.org.uk>
6
6
  Project-URL: Home, https://skilleter.org.uk
@@ -1,6 +1,7 @@
1
1
  skilleter_thingy/__init__.py,sha256=rVPTxm8L5w52U0YdTd7r_D44SBP7pS3JCJtsf0iIsow,110
2
2
  skilleter_thingy/addpath.py,sha256=4Yhhgjjz1XDI98j0dAiQpNA2ejLefeWUTeSg3nIXQq0,3842
3
3
  skilleter_thingy/borger.py,sha256=AQX7OHeGXcUjkgyXEWE2h_oOey9eczZBbKjrreXvRAs,7832
4
+ skilleter_thingy/box.py,sha256=6ciOMyER62fNUIs5SwGS0g3VsnnHQN9SITJ_vBNFxAY,771
4
5
  skilleter_thingy/console_colours.py,sha256=BOS9mo3jChx_FE8L1j488MDoVNgib11KjTRhrz_YRYE,1781
5
6
  skilleter_thingy/diskspacecheck.py,sha256=7xsj4egXXV6jPhXZTe2b5rS03XAmm5uLC5TeiO1NJoE,2072
6
7
  skilleter_thingy/docker_purge.py,sha256=2t6yjlxmHCHKMAejLViYyOQNzyqSXGiV59df4Wlojaw,3349
@@ -27,7 +28,7 @@ skilleter_thingy/moviemover.py,sha256=j_Xb9_jFdgpFBAXcF4tEqbnKH_FonlnUU39LiCK980
27
28
  skilleter_thingy/photodupe.py,sha256=FssLgbLnqHPuSvMGtRyOa7bRdowufJOQaJJ56f9ybxk,4195
28
29
  skilleter_thingy/phototidier.py,sha256=5gSjlINUxf3ZQl3NG0o7CsWwODvTbokIMIafLFvn8Hc,7818
29
30
  skilleter_thingy/py_audit.py,sha256=ZyKN8O0fM4xnwVspk1qH_Dnv5ujM7lJfKxC87xWilr0,4395
30
- skilleter_thingy/readable.py,sha256=eZ6nI5TDMncwP74sdPMXrvGTNR7M51-NUGOxRwJpAvA,9474
31
+ skilleter_thingy/readable.py,sha256=2KAhc45ZwjEHrvWrMZUTbpY7xPKFJiP5vxIsmLizHfc,9645
31
32
  skilleter_thingy/remdir.py,sha256=-C-LAOaphdKLbBwm--rEwrsDdyldXps-C4s8iDNOKw8,4610
32
33
  skilleter_thingy/rmdupe.py,sha256=tcX3w8XvliGwBMdSt9BUu07kuDtQEc0IiU8sCxmgzHA,17117
33
34
  skilleter_thingy/rpylint.py,sha256=TzZ5GvWrqgTKYKZwadTvzdbX-DJ8ll4WfVJqtN6IzO0,2635
@@ -58,11 +59,11 @@ skilleter_thingy/thingy/popup.py,sha256=jW-nbpdeswqEMTli7OmBv1J8XQsvFoMI0J33O6dO
58
59
  skilleter_thingy/thingy/process.py,sha256=88pKHQZXBP1m3Ja7t3DtKJ4Njn7HS2OtcI0Z0i1KwUs,3560
59
60
  skilleter_thingy/thingy/run.py,sha256=051lGahG4liYLckQFpmSaGuE9Chd-lFdmJO85LdmeXE,12607
60
61
  skilleter_thingy/thingy/tfm_pane.py,sha256=40DmQeLMEUPiKKIJkgN1MEpIen00V70I1HB7Q6git44,19814
61
- skilleter_thingy/thingy/tidy.py,sha256=wzkyxzCsHXyY46G3Rjqu4ZrqiL8QMbRXyJEeYOmpy-o,5402
62
+ skilleter_thingy/thingy/tidy.py,sha256=adm-09WLOSj6_8UId23Hb7LgJowFgoEtDAvv00ni2mA,5412
62
63
  skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
63
- skilleter_thingy-0.0.46.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
64
- skilleter_thingy-0.0.46.dist-info/METADATA,sha256=RtT0thW60tu7gdRnk7xyNn6NlyblaIZbpF7D55atgDY,5313
65
- skilleter_thingy-0.0.46.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
66
- skilleter_thingy-0.0.46.dist-info/entry_points.txt,sha256=IT6cZSbGHrd2UzIQbiMRotKiTJnYJBkESC4fAe8gjsE,2026
67
- skilleter_thingy-0.0.46.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
68
- skilleter_thingy-0.0.46.dist-info/RECORD,,
64
+ skilleter_thingy-0.0.47.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
+ skilleter_thingy-0.0.47.dist-info/METADATA,sha256=DGBavdrmT12M3pEyGR9C9WPJEQzruxbBvZPKSCungF0,5313
66
+ skilleter_thingy-0.0.47.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
67
+ skilleter_thingy-0.0.47.dist-info/entry_points.txt,sha256=IT6cZSbGHrd2UzIQbiMRotKiTJnYJBkESC4fAe8gjsE,2026
68
+ skilleter_thingy-0.0.47.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
+ skilleter_thingy-0.0.47.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5