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

@@ -58,6 +58,7 @@ TF_IGNORE_LIST = [
58
58
  {'start': TF_READ_DURING_APPLY, 'end': TF_READ_DURING_APPLY_END},
59
59
  {'start': re.compile(r'(Releasing|Acquiring) state lock. This may take a few moments\.+')},
60
60
  {'start': re.compile(r'.*: Still reading\.{3} \[.* elapsed\]')},
61
+ {'start': re.compile(r' +# .* will be destroyed'), 'end': TF_HAS_CHANGED_END, 'skip': 2},
61
62
  ]
62
63
 
63
64
  ################################################################################
@@ -146,6 +147,10 @@ def cleanfile(args, infile, outfile):
146
147
 
147
148
  ignore_until = None
148
149
 
150
+ # Number of lines at the top of an ignore block to skip before starting to ignore
151
+
152
+ pre_ignore_count = 0
153
+
149
154
  # Collects data that we are going to output in alphabetical order
150
155
 
151
156
  collection = []
@@ -208,14 +213,16 @@ def cleanfile(args, infile, outfile):
208
213
 
209
214
  for ignore in TF_IGNORE_LIST:
210
215
  if ignore['start'].fullmatch(clean):
211
- if 'end' in ignore:
212
- ignore_until = ignore['end']
216
+ ignore_until = ignore.get('end', None)
217
+ pre_ignore_count = ignore.get('skip', 0)
218
+
219
+ logging.info('Found ignore start marker: "%s"', clean)
213
220
 
214
- logging.info('Found ignore start marker: "%s"', clean)
221
+ if ignore_until:
215
222
  logging.info('Skipping until end marker: "%s"', ignore_until.pattern)
216
- else:
217
- clean = None
218
223
 
224
+ if pre_ignore_count:
225
+ logging.info('Pre-ignore skip count: %d', pre_ignore_count)
219
226
  break
220
227
  else:
221
228
  if TF_TAG_CHANGE_BLOCK_START.fullmatch(clean):
@@ -251,9 +258,15 @@ def cleanfile(args, infile, outfile):
251
258
  if in_tag_block and clean and TF_TAG_ENTRY_IGNORE.fullmatch(clean):
252
259
  clean = None
253
260
 
254
- # Write normal output, skipping >1 blank lines
261
+ # If we are ignoring and not in the pre-ignore section and not matching the end then, then ignore
262
+
263
+ if ignore_until and not pre_ignore_count and not ignore_until.fullmatch(clean):
264
+ clean = None
265
+
266
+ # Write normal output, skipping >1 blank lines and skipping ignore blocks when the pre-ignore
267
+ # count has hit zero.
255
268
 
256
- if clean is not None and not ignore_until:
269
+ if clean is not None and not (ignore_until and pre_ignore_count==0):
257
270
  if clean != '' or prev_line != '':
258
271
  outfile.write(clean)
259
272
  outfile.write('\n')
@@ -262,10 +275,15 @@ def cleanfile(args, infile, outfile):
262
275
 
263
276
  # Clear the ignore flag if we've hid the end marker of the block
264
277
 
265
- if ignore_until and clean and ignore_until.fullmatch(clean):
278
+ if ignore_until and clean and pre_ignore_count == 0 and ignore_until.fullmatch(clean):
266
279
  ignore_until = None
267
280
  logging.info('Hit end of ignore section')
268
281
 
282
+ # Decrement the pre-ignore count if we have one
283
+
284
+ if pre_ignore_count > 0:
285
+ pre_ignore_count -= 1
286
+
269
287
  # If we've hit the end and are still ignoring stuff, something's up!
270
288
 
271
289
  if ignore_until:
@@ -301,6 +319,8 @@ def main():
301
319
  outfile = tempfile.NamedTemporaryFile(mode='wt+', delete=False)
302
320
  outfile_name = outfile.name
303
321
 
322
+ logging.info('Cleaning %s', infile)
323
+
304
324
  cleanfile(args, infile, outfile)
305
325
 
306
326
  if outfile_name:
skilleter_thingy/tfm.py CHANGED
@@ -14,6 +14,7 @@
14
14
  / TODO: 1. If you exit a directory via Backspace then re-enter it hasn't saved the current position
15
15
  / TODO: 1. Implement inotify as background thread as it is far too slow to run everytime we process a keypress
16
16
  / TODO: 2. Use inotify to check for updates and update panes
17
+ TODO: 1. Config file - keyboard config, override apps used to open particular file types
17
18
  TODO: 2. Wildcard tagging/untagging
18
19
  TODO: 3. Allow copy/move to overwrite files (prompt first)
19
20
  TODO: 3. Create directory
@@ -652,7 +653,7 @@ class FileManager():
652
653
  """ Edit the current file
653
654
  TODO: Write internal file viewer """
654
655
 
655
- pager = os.environ.get('PAGER', 'more')
656
+ pager = os.environ.get('TFM_PAGER', os.environ.get('PAGER', 'more'))
656
657
  self.run_external_command([pager, os.path.basename(self.current_pane.get_current_file()['name'])])
657
658
 
658
659
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: skilleter_thingy
3
- Version: 0.0.63
3
+ Version: 0.0.65
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
@@ -28,14 +28,14 @@ skilleter_thingy/moviemover.py,sha256=j_Xb9_jFdgpFBAXcF4tEqbnKH_FonlnUU39LiCK980
28
28
  skilleter_thingy/photodupe.py,sha256=l0hbzSLb2Vk2ceteg-x9fHXCEE1uUuFo84hz5rsZUPA,4184
29
29
  skilleter_thingy/phototidier.py,sha256=5gSjlINUxf3ZQl3NG0o7CsWwODvTbokIMIafLFvn8Hc,7818
30
30
  skilleter_thingy/py_audit.py,sha256=xJm5k5qyeA6ii8mODa4dOkmP8L1drv94UHuxR54RsIM,4384
31
- skilleter_thingy/readable.py,sha256=urBwbhs12ckBQa_mj2InbhQWFsKxs9irFOLTiJ8QdTE,13066
31
+ skilleter_thingy/readable.py,sha256=SsXKQgDin8u2onSHFs3vUB_BJc5Cv5jJEisBf0lT0Y8,13944
32
32
  skilleter_thingy/remdir.py,sha256=SkN9xEc1ckFGRP4zS2LUbx7Ihw697YMV0ybr_-afiyE,4653
33
33
  skilleter_thingy/rmdupe.py,sha256=tcX3w8XvliGwBMdSt9BUu07kuDtQEc0IiU8sCxmgzHA,17117
34
34
  skilleter_thingy/rpylint.py,sha256=TzZ5GvWrqgTKYKZwadTvzdbX-DJ8ll4WfVJqtN6IzO0,2635
35
35
  skilleter_thingy/splitpics.py,sha256=qRlJrqet7TEI6SodS4bkuKXQUpOdMaqmjE4c1CR7ouo,3266
36
36
  skilleter_thingy/strreplace.py,sha256=xsIWw0hc452rYEBtNEQFKIzmV03xjm_Taz-eDTmFFKI,2539
37
37
  skilleter_thingy/sysmon.py,sha256=XRZG6EVSzoVYan_N16qVB1l1RaU51uvLWlRA0CDjC54,11348
38
- skilleter_thingy/tfm.py,sha256=3ejKNI2P65lGz-50mxRMxW_o5NmoeMDcmhji_0uALhI,33703
38
+ skilleter_thingy/tfm.py,sha256=xMsqcuNJ32PwKF5vO3SO6etlbJKbCLUJhSdC2w0clwE,33829
39
39
  skilleter_thingy/tfparse.py,sha256=u1IZH2J_WH1aORyMozKSI2JKok7_S1MMJhiobzmhlUI,2988
40
40
  skilleter_thingy/trimpath.py,sha256=25On5OHTT1rXTzTuRWQeS3FWtTd0XZr5NFDDACR6AGM,2294
41
41
  skilleter_thingy/venv_create.py,sha256=lMcGvWNwP-ZlyPJ1eZU-PHNOnscZHjtjhoT6sLfhIU4,1153
@@ -60,9 +60,9 @@ skilleter_thingy/thingy/run.py,sha256=6SNKWF01fSxzB10GMU9ajraXYZqAL1w0PXkqjJdr1U
60
60
  skilleter_thingy/thingy/tfm_pane.py,sha256=oqy5zBzKwfbjbGqetbbhpKi4x5He7sl4qkmhUeqtdZc,19789
61
61
  skilleter_thingy/thingy/tidy.py,sha256=71DCyj0VJrj52RmjQyj1eOiQJIfy5EIPHuThOrS6ZTA,5876
62
62
  skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
63
- skilleter_thingy-0.0.63.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
64
- skilleter_thingy-0.0.63.dist-info/METADATA,sha256=hrDs-f3Z4kaE9XUcRT9F9RgJ43s-RBhc8qtt4hXSstY,5313
65
- skilleter_thingy-0.0.63.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
66
- skilleter_thingy-0.0.63.dist-info/entry_points.txt,sha256=IT6cZSbGHrd2UzIQbiMRotKiTJnYJBkESC4fAe8gjsE,2026
67
- skilleter_thingy-0.0.63.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
68
- skilleter_thingy-0.0.63.dist-info/RECORD,,
63
+ skilleter_thingy-0.0.65.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
64
+ skilleter_thingy-0.0.65.dist-info/METADATA,sha256=sYWFxv9e_Hphz9vmnkUDx82BOHOnKMahvmCf-4ipV_8,5313
65
+ skilleter_thingy-0.0.65.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
66
+ skilleter_thingy-0.0.65.dist-info/entry_points.txt,sha256=LxYRrQHkCGK-zjLXHqRdsUSUOoBbh7e8YUN1IVs5vIs,2072
67
+ skilleter_thingy-0.0.65.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
68
+ skilleter_thingy-0.0.65.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -39,6 +39,7 @@ tfm = skilleter_thingy:tfm.tfm
39
39
  tfparse = skilleter_thingy:tfparse.tfparse
40
40
  trimpath = skilleter_thingy:trimpath.trimpath
41
41
  venv-create = skilleter_thingy:venv_create.venv_create
42
+ webwatch = skilleter_thingy:webwatch.webwatch
42
43
  window-rename = skilleter_thingy:window_rename.window_rename
43
44
  xchmod = skilleter_thingy:xchmod.xchmod
44
45
  yamlcheck = skilleter_thingy:yamlcheck.yamlcheck