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

@@ -120,6 +120,7 @@ def parse_command_line():
120
120
  parser.add_argument('--rclone', '-r', action='store', default=DEFAULT_RCLONE_REMOTE, help=f'rclone remote name for Google photos (defaults to {DEFAULT_RCLONE_REMOTE})')
121
121
  parser.add_argument('--no-update', '-N', action='store_true', help='Do not update local cache')
122
122
  parser.add_argument('--keep', '-k', action='store', type=int, default=DEFAULT_KEEP, help=f'Keep this number of months before the start date in the cache (defaults to {DEFAULT_KEEP})')
123
+ parser.add_argument('--skip-no-day', '-z', action='store_true', help='Don\'t sync files where the day of the month could not be determined')
123
124
  parser.add_argument('action', nargs='*', help='Actions to perform (report or sync)')
124
125
 
125
126
  args = parser.parse_args()
@@ -319,7 +320,7 @@ def get_media_date(name, info):
319
320
 
320
321
  ################################################################################
321
322
 
322
- def sync_media_local(dryrun, media_files, destination_dir):
323
+ def sync_media_local(dryrun, skip_no_day, media_files, destination_dir):
323
324
  """Sync files from the cache to local storage"""
324
325
 
325
326
  # Iterate through the list of remote media_files to try work out the date and
@@ -328,6 +329,11 @@ def sync_media_local(dryrun, media_files, destination_dir):
328
329
  for media_file in media_files:
329
330
  year, month, day = get_media_date(media_file, media_files[media_file])
330
331
 
332
+ # If specified, skip files where the day of the month could not be determined
333
+
334
+ if skip_no_day and day == '00':
335
+ day = None
336
+
331
337
  if year and month and day:
332
338
  destination_media_file_path = os.path.join(destination_dir, year, f'{year}-{month}-{day}', os.path.basename(media_file))
333
339
 
@@ -385,7 +391,7 @@ def update_cache(args, year, month):
385
391
 
386
392
  ################################################################################
387
393
 
388
- def media_sync(dryrun, media, media_files, local_dir):
394
+ def media_sync(dryrun, skip_no_day, media, media_files, local_dir):
389
395
  """Given a media type and list of local and remote files of the type, check
390
396
  for out-of-sync files and sync any missing remote files to local storage"""
391
397
 
@@ -422,7 +428,7 @@ def media_sync(dryrun, media, media_files, local_dir):
422
428
 
423
429
  if media_files['remote']:
424
430
  colour.write(f' [BOLD:{len(media_files["remote"])} remote {media} files are out of sync]')
425
- sync_media_local(dryrun, media_files['remote'], local_dir)
431
+ sync_media_local(dryrun, skip_no_day, media_files['remote'], local_dir)
426
432
  else:
427
433
  colour.write(f' [BOLD:No remote {media} files are out of sync]')
428
434
 
@@ -542,7 +548,7 @@ def gphoto_sync(args, year, month):
542
548
  colour.write(f'[BOLD:Syncing files for {month:02}/{year}]')
543
549
 
544
550
  for media in ('photo', 'video'):
545
- media_sync(args.dryrun, media, media_files[media], args.local_dir[media])
551
+ media_sync(args.dryrun, args.skip_no_day, media, media_files[media], args.local_dir[media])
546
552
 
547
553
  ################################################################################
548
554
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: skilleter_thingy
3
- Version: 0.0.48
3
+ Version: 0.0.49
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,7 +1,6 @@
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
5
4
  skilleter_thingy/console_colours.py,sha256=BOS9mo3jChx_FE8L1j488MDoVNgib11KjTRhrz_YRYE,1781
6
5
  skilleter_thingy/diskspacecheck.py,sha256=7xsj4egXXV6jPhXZTe2b5rS03XAmm5uLC5TeiO1NJoE,2072
7
6
  skilleter_thingy/docker_purge.py,sha256=2t6yjlxmHCHKMAejLViYyOQNzyqSXGiV59df4Wlojaw,3349
@@ -22,7 +21,7 @@ skilleter_thingy/git_wt.py,sha256=kMxA3f39-gMjXfhLH4DHw9klsgPbJzn1Ae4osehbtD8,34
22
21
  skilleter_thingy/gitcmp_helper.py,sha256=_3ji-PyIF2oI6a4zyUPjLeCFgAtACykxPpOrbjD6-aw,11245
23
22
  skilleter_thingy/gitprompt.py,sha256=SzSMd0EGI7ftPko80Q2PipwbVA-qjU1jsmdpmTCM5GI,8912
24
23
  skilleter_thingy/gl.py,sha256=9zbGpKxw6lX9RghLkdy-Q5sZlqtbB3uGFO04qTu1dH8,5954
25
- skilleter_thingy/gphotosync.py,sha256=TBxGEwhbMKv47tw1R-9roGPXZE_XYfZTNEe8FsA4AxI,22035
24
+ skilleter_thingy/gphotosync.py,sha256=Vb2zYTEFp26BYdkG810SRg9afyfDqvq4CLHTk-MFf60,22388
26
25
  skilleter_thingy/linecount.py,sha256=5voQtjJjDCVx4zjPwVRy620NpuLiwwFitzxjIsRGtxQ,4310
27
26
  skilleter_thingy/moviemover.py,sha256=j_Xb9_jFdgpFBAXcF4tEqbnKH_FonlnUU39LiCK980k,4470
28
27
  skilleter_thingy/photodupe.py,sha256=FssLgbLnqHPuSvMGtRyOa7bRdowufJOQaJJ56f9ybxk,4195
@@ -61,9 +60,9 @@ skilleter_thingy/thingy/run.py,sha256=051lGahG4liYLckQFpmSaGuE9Chd-lFdmJO85LdmeX
61
60
  skilleter_thingy/thingy/tfm_pane.py,sha256=40DmQeLMEUPiKKIJkgN1MEpIen00V70I1HB7Q6git44,19814
62
61
  skilleter_thingy/thingy/tidy.py,sha256=adm-09WLOSj6_8UId23Hb7LgJowFgoEtDAvv00ni2mA,5412
63
62
  skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
64
- skilleter_thingy-0.0.48.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
- skilleter_thingy-0.0.48.dist-info/METADATA,sha256=NHtEQ7p4XSYJHK5GSSWvYO4gHC8VHU5A6xZ9rlwlA6w,5313
66
- skilleter_thingy-0.0.48.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
67
- skilleter_thingy-0.0.48.dist-info/entry_points.txt,sha256=IT6cZSbGHrd2UzIQbiMRotKiTJnYJBkESC4fAe8gjsE,2026
68
- skilleter_thingy-0.0.48.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
- skilleter_thingy-0.0.48.dist-info/RECORD,,
63
+ skilleter_thingy-0.0.49.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
64
+ skilleter_thingy-0.0.49.dist-info/METADATA,sha256=BryF-1KGwXobPiiN60EmDKuqAtIBSPadlgmJ72xZhMk,5313
65
+ skilleter_thingy-0.0.49.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
66
+ skilleter_thingy-0.0.49.dist-info/entry_points.txt,sha256=IT6cZSbGHrd2UzIQbiMRotKiTJnYJBkESC4fAe8gjsE,2026
67
+ skilleter_thingy-0.0.49.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
68
+ skilleter_thingy-0.0.49.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (71.0.3)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
skilleter_thingy/box.py DELETED
@@ -1,33 +0,0 @@
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()