skilleter-thingy 0.2.1__tar.gz → 0.2.4__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.
Potentially problematic release.
This version of skilleter-thingy might be problematic. Click here for more details.
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/PKG-INFO +1 -46
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/README.md +0 -45
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/pyproject.toml +1 -10
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/PKG-INFO +1 -46
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/SOURCES.txt +0 -9
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/entry_points.txt +0 -9
- skilleter_thingy-0.2.1/skilleter_thingy/borger.py +0 -273
- skilleter_thingy-0.2.1/skilleter_thingy/diskspacecheck.py +0 -67
- skilleter_thingy-0.2.1/skilleter_thingy/localphotosync.py +0 -201
- skilleter_thingy-0.2.1/skilleter_thingy/moviemover.py +0 -133
- skilleter_thingy-0.2.1/skilleter_thingy/photodupe.py +0 -135
- skilleter_thingy-0.2.1/skilleter_thingy/phototidier.py +0 -248
- skilleter_thingy-0.2.1/skilleter_thingy/splitpics.py +0 -99
- skilleter_thingy-0.2.1/skilleter_thingy/sysmon.py +0 -435
- skilleter_thingy-0.2.1/skilleter_thingy/window_rename.py +0 -92
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/LICENSE +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/setup.cfg +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/__init__.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/addpath.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/console_colours.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/docker_purge.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/ffind.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/ggit.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/ggrep.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_br.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_ca.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_cleanup.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_co.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_common.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_hold.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_mr.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_parent.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_retag.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_review.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_update.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/git_wt.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/gitcmp_helper.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/gitprompt.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/gl.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/linecount.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/multigit.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/py_audit.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/readable.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/remdir.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/rmdupe.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/rpylint.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/strreplace.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/tfm.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/tfparse.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/__init__.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/colour.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/dc_curses.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/dc_defaults.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/dc_util.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/dircolors.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/docker.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/files.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/git.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/git2.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/gitlab.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/path.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/popup.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/process.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/run.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/tfm_pane.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/tidy.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/thingy/venv_template.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/trimpath.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/venv_create.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/xchmod.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy/yamlcheck.py +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/dependency_links.txt +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/requires.txt +0 -0
- {skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -597,55 +597,10 @@ YAML validator - checks that a file is valid YAML (use yamllint to verify that i
|
|
|
597
597
|
|
|
598
598
|
These will be moved to the skilleter-extras package in due course.
|
|
599
599
|
|
|
600
|
-
## borger
|
|
601
|
-
|
|
602
|
-
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
603
|
-
|
|
604
600
|
## consolecolours
|
|
605
601
|
|
|
606
602
|
Display all available colours in the console.
|
|
607
603
|
|
|
608
|
-
## diskspacecheck
|
|
609
|
-
|
|
610
|
-
Check how much free space is available on all filesystems, ignoring read-only filesystems, /dev and tmpfs.
|
|
611
|
-
|
|
612
|
-
Issue a warning if any are above 90% used.
|
|
613
|
-
|
|
614
|
-
## gphotosync & localphotosync
|
|
615
|
-
|
|
616
|
-
Utilities for syncing photos from Google Photos or a local directory to local storage
|
|
617
|
-
|
|
618
|
-
## moviemover
|
|
619
|
-
|
|
620
|
-
Search for files matching a wildcard in a directory tree and move them to an equivalent location in a different tree
|
|
621
|
-
|
|
622
|
-
## phototidier
|
|
623
|
-
|
|
624
|
-
Perform various tidying operations on a directory full of photos:
|
|
625
|
-
|
|
626
|
-
* Remove leading '$' and '_' from filenames
|
|
627
|
-
* Move files in hidden directories up 1 level
|
|
628
|
-
* If the EXIF data in a photo indicates that it was taken on date that doesn't match the name of the directory it is stored in (in YYYY-MM-DD format) then it is moved to the correct directory, creating it if necessary.
|
|
629
|
-
|
|
630
|
-
All move/rename operations are carried out safely with the file being moved having
|
|
631
|
-
a numeric suffix added to the name if it conflicts with an existing file.
|
|
632
|
-
|
|
633
|
-
## photodupe
|
|
634
|
-
|
|
635
|
-
Search for duplicate images in a directory tree
|
|
636
|
-
|
|
637
|
-
## splitpics
|
|
638
|
-
|
|
639
|
-
Copy a directory full of pictures to a destination, creating subdiretories with a fixed number of pictures in each in the destination directory for use with FAT filesystems and digital photo frames.
|
|
640
|
-
|
|
641
|
-
## sysmon
|
|
642
|
-
|
|
643
|
-
Simple console system monitor
|
|
644
|
-
|
|
645
|
-
## window-rename
|
|
646
|
-
|
|
647
|
-
Monitor window titles and rename them to fit an alphabetical grouping in 'Appname - Document' format.
|
|
648
|
-
|
|
649
604
|
# Obsolescent Commands
|
|
650
605
|
|
|
651
606
|
These commands will probably be retired in future versions of Thingy
|
|
@@ -574,55 +574,10 @@ YAML validator - checks that a file is valid YAML (use yamllint to verify that i
|
|
|
574
574
|
|
|
575
575
|
These will be moved to the skilleter-extras package in due course.
|
|
576
576
|
|
|
577
|
-
## borger
|
|
578
|
-
|
|
579
|
-
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
580
|
-
|
|
581
577
|
## consolecolours
|
|
582
578
|
|
|
583
579
|
Display all available colours in the console.
|
|
584
580
|
|
|
585
|
-
## diskspacecheck
|
|
586
|
-
|
|
587
|
-
Check how much free space is available on all filesystems, ignoring read-only filesystems, /dev and tmpfs.
|
|
588
|
-
|
|
589
|
-
Issue a warning if any are above 90% used.
|
|
590
|
-
|
|
591
|
-
## gphotosync & localphotosync
|
|
592
|
-
|
|
593
|
-
Utilities for syncing photos from Google Photos or a local directory to local storage
|
|
594
|
-
|
|
595
|
-
## moviemover
|
|
596
|
-
|
|
597
|
-
Search for files matching a wildcard in a directory tree and move them to an equivalent location in a different tree
|
|
598
|
-
|
|
599
|
-
## phototidier
|
|
600
|
-
|
|
601
|
-
Perform various tidying operations on a directory full of photos:
|
|
602
|
-
|
|
603
|
-
* Remove leading '$' and '_' from filenames
|
|
604
|
-
* Move files in hidden directories up 1 level
|
|
605
|
-
* If the EXIF data in a photo indicates that it was taken on date that doesn't match the name of the directory it is stored in (in YYYY-MM-DD format) then it is moved to the correct directory, creating it if necessary.
|
|
606
|
-
|
|
607
|
-
All move/rename operations are carried out safely with the file being moved having
|
|
608
|
-
a numeric suffix added to the name if it conflicts with an existing file.
|
|
609
|
-
|
|
610
|
-
## photodupe
|
|
611
|
-
|
|
612
|
-
Search for duplicate images in a directory tree
|
|
613
|
-
|
|
614
|
-
## splitpics
|
|
615
|
-
|
|
616
|
-
Copy a directory full of pictures to a destination, creating subdiretories with a fixed number of pictures in each in the destination directory for use with FAT filesystems and digital photo frames.
|
|
617
|
-
|
|
618
|
-
## sysmon
|
|
619
|
-
|
|
620
|
-
Simple console system monitor
|
|
621
|
-
|
|
622
|
-
## window-rename
|
|
623
|
-
|
|
624
|
-
Monitor window titles and rename them to fit an alphabetical grouping in 'Appname - Document' format.
|
|
625
|
-
|
|
626
581
|
# Obsolescent Commands
|
|
627
582
|
|
|
628
583
|
These commands will probably be retired in future versions of Thingy
|
|
@@ -7,7 +7,7 @@ name = "skilleter_thingy"
|
|
|
7
7
|
|
|
8
8
|
# Version must be incremented to install updated Thingy
|
|
9
9
|
|
|
10
|
-
version = "0.2.
|
|
10
|
+
version = "0.2.4"
|
|
11
11
|
|
|
12
12
|
authors = [
|
|
13
13
|
{name="John Skilleter", email="john@skilleter.org.uk"},
|
|
@@ -42,9 +42,7 @@ Home = "https://skilleter.org.uk"
|
|
|
42
42
|
|
|
43
43
|
[project.scripts]
|
|
44
44
|
addpath = "skilleter_thingy:addpath.addpath"
|
|
45
|
-
borger = "skilleter_thingy:borger.borger"
|
|
46
45
|
consolecolours = "skilleter_thingy:console_colours.console_colours"
|
|
47
|
-
diskspacecheck = "skilleter_thingy:diskspacecheck.diskspacecheck"
|
|
48
46
|
docker-purge = "skilleter_thingy:docker_purge.docker_purge"
|
|
49
47
|
ffind = "skilleter_thingy:ffind.ffind"
|
|
50
48
|
ggit = "skilleter_thingy:ggit.ggit"
|
|
@@ -66,26 +64,19 @@ gitprompt = "skilleter_thingy:gitprompt.gitprompt"
|
|
|
66
64
|
gl = "skilleter_thingy:gl.gl"
|
|
67
65
|
gphotosync = "skilleter_thingy:gphotosync.gphotosync"
|
|
68
66
|
linecount = "skilleter_thingy:linecount.linecount"
|
|
69
|
-
localphotosync = "skilleter_thingy:localphotosync.localphotosync"
|
|
70
67
|
mg = "skilleter_thingy:mg.mg"
|
|
71
|
-
moviemover = "skilleter_thingy:moviemover.moviemover"
|
|
72
68
|
multigit = "skilleter_thingy:multigit.multigit"
|
|
73
|
-
photodupe = "skilleter_thingy:photodupe.photodupe"
|
|
74
|
-
phototidier = "skilleter_thingy:phototidier.phototidier"
|
|
75
69
|
py-audit = "skilleter_thingy:py_audit.py_audit"
|
|
76
70
|
readable = "skilleter_thingy:readable.readable"
|
|
77
71
|
remdir = "skilleter_thingy:remdir.remdir"
|
|
78
72
|
rmdupe = "skilleter_thingy:rmdupe.rmdupe"
|
|
79
73
|
rpylint = "skilleter_thingy:rpylint.rpylint"
|
|
80
74
|
s3-sync = "skilleter_thingy:s3_sync.s3_sync"
|
|
81
|
-
splitpics = "skilleter_thingy:splitpics.splitpics"
|
|
82
75
|
strreplace = "skilleter_thingy:strreplace.strreplace"
|
|
83
|
-
sysmon = "skilleter_thingy:sysmon.sysmon"
|
|
84
76
|
tfm = "skilleter_thingy:tfm.tfm"
|
|
85
77
|
tfparse = "skilleter_thingy:tfparse.tfparse"
|
|
86
78
|
trimpath = "skilleter_thingy:trimpath.trimpath"
|
|
87
79
|
venv-create = "skilleter_thingy:venv_create.venv_create"
|
|
88
80
|
webwatch = "skilleter_thingy:webwatch.webwatch"
|
|
89
|
-
window-rename = "skilleter_thingy:window_rename.window_rename"
|
|
90
81
|
xchmod = "skilleter_thingy:xchmod.xchmod"
|
|
91
82
|
yamlcheck = "skilleter_thingy:yamlcheck.yamlcheck"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -597,55 +597,10 @@ YAML validator - checks that a file is valid YAML (use yamllint to verify that i
|
|
|
597
597
|
|
|
598
598
|
These will be moved to the skilleter-extras package in due course.
|
|
599
599
|
|
|
600
|
-
## borger
|
|
601
|
-
|
|
602
|
-
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
603
|
-
|
|
604
600
|
## consolecolours
|
|
605
601
|
|
|
606
602
|
Display all available colours in the console.
|
|
607
603
|
|
|
608
|
-
## diskspacecheck
|
|
609
|
-
|
|
610
|
-
Check how much free space is available on all filesystems, ignoring read-only filesystems, /dev and tmpfs.
|
|
611
|
-
|
|
612
|
-
Issue a warning if any are above 90% used.
|
|
613
|
-
|
|
614
|
-
## gphotosync & localphotosync
|
|
615
|
-
|
|
616
|
-
Utilities for syncing photos from Google Photos or a local directory to local storage
|
|
617
|
-
|
|
618
|
-
## moviemover
|
|
619
|
-
|
|
620
|
-
Search for files matching a wildcard in a directory tree and move them to an equivalent location in a different tree
|
|
621
|
-
|
|
622
|
-
## phototidier
|
|
623
|
-
|
|
624
|
-
Perform various tidying operations on a directory full of photos:
|
|
625
|
-
|
|
626
|
-
* Remove leading '$' and '_' from filenames
|
|
627
|
-
* Move files in hidden directories up 1 level
|
|
628
|
-
* If the EXIF data in a photo indicates that it was taken on date that doesn't match the name of the directory it is stored in (in YYYY-MM-DD format) then it is moved to the correct directory, creating it if necessary.
|
|
629
|
-
|
|
630
|
-
All move/rename operations are carried out safely with the file being moved having
|
|
631
|
-
a numeric suffix added to the name if it conflicts with an existing file.
|
|
632
|
-
|
|
633
|
-
## photodupe
|
|
634
|
-
|
|
635
|
-
Search for duplicate images in a directory tree
|
|
636
|
-
|
|
637
|
-
## splitpics
|
|
638
|
-
|
|
639
|
-
Copy a directory full of pictures to a destination, creating subdiretories with a fixed number of pictures in each in the destination directory for use with FAT filesystems and digital photo frames.
|
|
640
|
-
|
|
641
|
-
## sysmon
|
|
642
|
-
|
|
643
|
-
Simple console system monitor
|
|
644
|
-
|
|
645
|
-
## window-rename
|
|
646
|
-
|
|
647
|
-
Monitor window titles and rename them to fit an alphabetical grouping in 'Appname - Document' format.
|
|
648
|
-
|
|
649
604
|
# Obsolescent Commands
|
|
650
605
|
|
|
651
606
|
These commands will probably be retired in future versions of Thingy
|
|
@@ -3,9 +3,7 @@ README.md
|
|
|
3
3
|
pyproject.toml
|
|
4
4
|
skilleter_thingy/__init__.py
|
|
5
5
|
skilleter_thingy/addpath.py
|
|
6
|
-
skilleter_thingy/borger.py
|
|
7
6
|
skilleter_thingy/console_colours.py
|
|
8
|
-
skilleter_thingy/diskspacecheck.py
|
|
9
7
|
skilleter_thingy/docker_purge.py
|
|
10
8
|
skilleter_thingy/ffind.py
|
|
11
9
|
skilleter_thingy/ggit.py
|
|
@@ -26,24 +24,17 @@ skilleter_thingy/gitcmp_helper.py
|
|
|
26
24
|
skilleter_thingy/gitprompt.py
|
|
27
25
|
skilleter_thingy/gl.py
|
|
28
26
|
skilleter_thingy/linecount.py
|
|
29
|
-
skilleter_thingy/localphotosync.py
|
|
30
|
-
skilleter_thingy/moviemover.py
|
|
31
27
|
skilleter_thingy/multigit.py
|
|
32
|
-
skilleter_thingy/photodupe.py
|
|
33
|
-
skilleter_thingy/phototidier.py
|
|
34
28
|
skilleter_thingy/py_audit.py
|
|
35
29
|
skilleter_thingy/readable.py
|
|
36
30
|
skilleter_thingy/remdir.py
|
|
37
31
|
skilleter_thingy/rmdupe.py
|
|
38
32
|
skilleter_thingy/rpylint.py
|
|
39
|
-
skilleter_thingy/splitpics.py
|
|
40
33
|
skilleter_thingy/strreplace.py
|
|
41
|
-
skilleter_thingy/sysmon.py
|
|
42
34
|
skilleter_thingy/tfm.py
|
|
43
35
|
skilleter_thingy/tfparse.py
|
|
44
36
|
skilleter_thingy/trimpath.py
|
|
45
37
|
skilleter_thingy/venv_create.py
|
|
46
|
-
skilleter_thingy/window_rename.py
|
|
47
38
|
skilleter_thingy/xchmod.py
|
|
48
39
|
skilleter_thingy/yamlcheck.py
|
|
49
40
|
skilleter_thingy.egg-info/PKG-INFO
|
{skilleter_thingy-0.2.1 → skilleter_thingy-0.2.4}/skilleter_thingy.egg-info/entry_points.txt
RENAMED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
[console_scripts]
|
|
2
2
|
addpath = skilleter_thingy:addpath.addpath
|
|
3
|
-
borger = skilleter_thingy:borger.borger
|
|
4
3
|
consolecolours = skilleter_thingy:console_colours.console_colours
|
|
5
|
-
diskspacecheck = skilleter_thingy:diskspacecheck.diskspacecheck
|
|
6
4
|
docker-purge = skilleter_thingy:docker_purge.docker_purge
|
|
7
5
|
ffind = skilleter_thingy:ffind.ffind
|
|
8
6
|
ggit = skilleter_thingy:ggit.ggit
|
|
@@ -24,26 +22,19 @@ gitprompt = skilleter_thingy:gitprompt.gitprompt
|
|
|
24
22
|
gl = skilleter_thingy:gl.gl
|
|
25
23
|
gphotosync = skilleter_thingy:gphotosync.gphotosync
|
|
26
24
|
linecount = skilleter_thingy:linecount.linecount
|
|
27
|
-
localphotosync = skilleter_thingy:localphotosync.localphotosync
|
|
28
25
|
mg = skilleter_thingy:mg.mg
|
|
29
|
-
moviemover = skilleter_thingy:moviemover.moviemover
|
|
30
26
|
multigit = skilleter_thingy:multigit.multigit
|
|
31
|
-
photodupe = skilleter_thingy:photodupe.photodupe
|
|
32
|
-
phototidier = skilleter_thingy:phototidier.phototidier
|
|
33
27
|
py-audit = skilleter_thingy:py_audit.py_audit
|
|
34
28
|
readable = skilleter_thingy:readable.readable
|
|
35
29
|
remdir = skilleter_thingy:remdir.remdir
|
|
36
30
|
rmdupe = skilleter_thingy:rmdupe.rmdupe
|
|
37
31
|
rpylint = skilleter_thingy:rpylint.rpylint
|
|
38
32
|
s3-sync = skilleter_thingy:s3_sync.s3_sync
|
|
39
|
-
splitpics = skilleter_thingy:splitpics.splitpics
|
|
40
33
|
strreplace = skilleter_thingy:strreplace.strreplace
|
|
41
|
-
sysmon = skilleter_thingy:sysmon.sysmon
|
|
42
34
|
tfm = skilleter_thingy:tfm.tfm
|
|
43
35
|
tfparse = skilleter_thingy:tfparse.tfparse
|
|
44
36
|
trimpath = skilleter_thingy:trimpath.trimpath
|
|
45
37
|
venv-create = skilleter_thingy:venv_create.venv_create
|
|
46
38
|
webwatch = skilleter_thingy:webwatch.webwatch
|
|
47
|
-
window-rename = skilleter_thingy:window_rename.window_rename
|
|
48
39
|
xchmod = skilleter_thingy:xchmod.xchmod
|
|
49
40
|
yamlcheck = skilleter_thingy:yamlcheck.yamlcheck
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
#! /usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Wrapper for the borg backup command
|
|
5
|
-
|
|
6
|
-
Copyright (C) 2018 John Skilleter
|
|
7
|
-
|
|
8
|
-
TODO: Major tidy-up as this is a translation of a Bash script.
|
|
9
|
-
TODO: Merge with the usb-backup script since both do almost the same job
|
|
10
|
-
TODO: Default configuration file should be named for the hostname
|
|
11
|
-
TODO: Move all configuration data into the configuration file
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
################################################################################
|
|
15
|
-
# Imports
|
|
16
|
-
|
|
17
|
-
import sys
|
|
18
|
-
import os
|
|
19
|
-
import time
|
|
20
|
-
import argparse
|
|
21
|
-
import configparser
|
|
22
|
-
import subprocess
|
|
23
|
-
from pathlib import Path
|
|
24
|
-
|
|
25
|
-
################################################################################
|
|
26
|
-
# Variables
|
|
27
|
-
|
|
28
|
-
DEFAULT_CONFIG_FILE = Path('borger.ini')
|
|
29
|
-
|
|
30
|
-
COMMANDS = ('backup', 'mount', 'umount', 'compact', 'info', 'prune', 'check', 'init')
|
|
31
|
-
|
|
32
|
-
# TODO: NOT USED
|
|
33
|
-
PRUNE_OPTIONS = [
|
|
34
|
-
'--keep-within', '7d',
|
|
35
|
-
'--keep-daily', '30',
|
|
36
|
-
'--keep-weekly', '26',
|
|
37
|
-
'--keep-monthly', '24',
|
|
38
|
-
'--keep-yearly', '10',
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
################################################################################
|
|
42
|
-
|
|
43
|
-
def run(args, cmd):
|
|
44
|
-
"""Run a subprocess."""
|
|
45
|
-
|
|
46
|
-
if args.debug:
|
|
47
|
-
cmd_str = ' '.join(cmd)
|
|
48
|
-
print(f'Running "{cmd_str}"')
|
|
49
|
-
|
|
50
|
-
try:
|
|
51
|
-
return subprocess.run(cmd, check=True)
|
|
52
|
-
except FileNotFoundError:
|
|
53
|
-
print('Borg backup is not installed')
|
|
54
|
-
sys.exit(1)
|
|
55
|
-
|
|
56
|
-
################################################################################
|
|
57
|
-
|
|
58
|
-
def borg_backup(args, exclude_list):
|
|
59
|
-
"""Perform a backup."""
|
|
60
|
-
|
|
61
|
-
create_options = ['--compression', 'auto,lzma']
|
|
62
|
-
|
|
63
|
-
version = time.strftime('%Y-%m-%d-%H:%M:%S')
|
|
64
|
-
|
|
65
|
-
print(f'Creating backup version {version}')
|
|
66
|
-
|
|
67
|
-
if args.verbose:
|
|
68
|
-
create_options += ['--list', '--filter=AMC']
|
|
69
|
-
|
|
70
|
-
if args.dryrun:
|
|
71
|
-
create_options.append('--dry-run')
|
|
72
|
-
else:
|
|
73
|
-
create_options.append('--stats')
|
|
74
|
-
|
|
75
|
-
exclude_opts = []
|
|
76
|
-
|
|
77
|
-
if exclude_list:
|
|
78
|
-
for exclude in exclude_list:
|
|
79
|
-
exclude_opts += ['--exclude', exclude]
|
|
80
|
-
|
|
81
|
-
os.chdir(args.source)
|
|
82
|
-
|
|
83
|
-
run(args,
|
|
84
|
-
['borg'] + args.options + ['create', f'{str(args.destination)}::{version}', str(args.source)] + create_options +
|
|
85
|
-
['--show-rc', '--one-file-system', '--exclude-caches'] + exclude_opts)
|
|
86
|
-
|
|
87
|
-
################################################################################
|
|
88
|
-
|
|
89
|
-
def borg_prune(args):
|
|
90
|
-
"""Prune the repo by limiting the number of backups stored."""
|
|
91
|
-
|
|
92
|
-
print('Pruning old backups')
|
|
93
|
-
|
|
94
|
-
# Keep all backups for at least 7 days, 1 per day for 30 days, 1 per week for 2 years
|
|
95
|
-
# 1 per month for 4 years and 1 per year for 10 years.
|
|
96
|
-
|
|
97
|
-
run(args, ['borg'] + args.options + ['prune', str(args.destination)] + PRUNE_OPTIONS)
|
|
98
|
-
|
|
99
|
-
################################################################################
|
|
100
|
-
|
|
101
|
-
def borg_compact(args):
|
|
102
|
-
"""Compact the repo."""
|
|
103
|
-
|
|
104
|
-
print('Compacting the backup')
|
|
105
|
-
|
|
106
|
-
# Keep all backups for at least 7 days, 1 per day for 30 days, 1 per week for 2 years
|
|
107
|
-
# 1 per month for 4 years and 1 per year for 10 years.
|
|
108
|
-
|
|
109
|
-
run(args, ['borg'] + args.options + ['compact', str(args.destination)])
|
|
110
|
-
|
|
111
|
-
################################################################################
|
|
112
|
-
|
|
113
|
-
def borg_info(args):
|
|
114
|
-
"""Info."""
|
|
115
|
-
|
|
116
|
-
run(args, ['borg'] + args.options + ['info', str(args.destination)])
|
|
117
|
-
|
|
118
|
-
################################################################################
|
|
119
|
-
|
|
120
|
-
def borg_mount(args):
|
|
121
|
-
"""Mount."""
|
|
122
|
-
|
|
123
|
-
print(f'Mounting Borg backups at {args.mount_dir}')
|
|
124
|
-
|
|
125
|
-
mount = Path(args.mount_dir)
|
|
126
|
-
|
|
127
|
-
if not mount.is_dir():
|
|
128
|
-
mount.mkdir()
|
|
129
|
-
|
|
130
|
-
run(args, ['borg'] + args.options + ['mount', str(args.destination), str(mount)])
|
|
131
|
-
|
|
132
|
-
################################################################################
|
|
133
|
-
|
|
134
|
-
def borg_umount(args):
|
|
135
|
-
"""Unmount."""
|
|
136
|
-
|
|
137
|
-
print('Unmounting {args.mount}')
|
|
138
|
-
|
|
139
|
-
run(args, ['borg'] + args.options + ['umount', str(args.mount)])
|
|
140
|
-
|
|
141
|
-
################################################################################
|
|
142
|
-
|
|
143
|
-
def borg_check(args):
|
|
144
|
-
"""Check the status of a backup."""
|
|
145
|
-
|
|
146
|
-
run(args, ['borg'] + args.options + ['check', str(args.destination)])
|
|
147
|
-
|
|
148
|
-
################################################################################
|
|
149
|
-
|
|
150
|
-
def borg_init(args):
|
|
151
|
-
"""Initialise a backup."""
|
|
152
|
-
|
|
153
|
-
run(args, ['borg'] + args.options + ['init', str(args.destination), '--encryption=none'])
|
|
154
|
-
|
|
155
|
-
################################################################################
|
|
156
|
-
|
|
157
|
-
def process_excludes(exclude_data):
|
|
158
|
-
"""Process the include list from the configuration file."""
|
|
159
|
-
|
|
160
|
-
return exclude_data.replace('%', str(Path.cwd())).split('\n')
|
|
161
|
-
|
|
162
|
-
################################################################################
|
|
163
|
-
|
|
164
|
-
def main():
|
|
165
|
-
"""Entry point."""
|
|
166
|
-
|
|
167
|
-
command_list = ', '.join(COMMANDS)
|
|
168
|
-
|
|
169
|
-
parser = argparse.ArgumentParser(description='Wrapper app for Borg backup to make it easier to use')
|
|
170
|
-
parser.add_argument('--dryrun', '--dry-run', '-D', action='store_true', help='Dry-run comands')
|
|
171
|
-
parser.add_argument('--debug', '-d', action='store_true', help='Debug')
|
|
172
|
-
parser.add_argument('--verbose', '-v', action='store_true', help='Verbosity to the maximum')
|
|
173
|
-
parser.add_argument('--config', '-c', default=None, help='Specify the configuration file')
|
|
174
|
-
parser.add_argument('commands', nargs='+', help=f'One or more commands ({command_list})')
|
|
175
|
-
args = parser.parse_args()
|
|
176
|
-
|
|
177
|
-
# If no config file specified then look in all the usual places
|
|
178
|
-
|
|
179
|
-
if args.config:
|
|
180
|
-
args.config = Path(args.config)
|
|
181
|
-
elif DEFAULT_CONFIG_FILE.is_file():
|
|
182
|
-
args.config = DEFAULT_CONFIG_FILE
|
|
183
|
-
else:
|
|
184
|
-
args.config = Path.home() / DEFAULT_CONFIG_FILE
|
|
185
|
-
|
|
186
|
-
if not args.config.is_file():
|
|
187
|
-
args.config = Path(sys.argv[0]).parent / DEFAULT_CONFIG_FILE
|
|
188
|
-
|
|
189
|
-
# Check that the configuration file exists
|
|
190
|
-
|
|
191
|
-
if not args.config.is_file():
|
|
192
|
-
print(f'Configuration file "{args.config}" not found')
|
|
193
|
-
sys.exit(1)
|
|
194
|
-
|
|
195
|
-
# Default options
|
|
196
|
-
|
|
197
|
-
args.options = []
|
|
198
|
-
|
|
199
|
-
# Read the configuration file
|
|
200
|
-
|
|
201
|
-
config = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
|
|
202
|
-
config.read(args.config)
|
|
203
|
-
|
|
204
|
-
if 'borger' not in config:
|
|
205
|
-
print('Invalid configuration file "args.config"')
|
|
206
|
-
sys.exit(1)
|
|
207
|
-
|
|
208
|
-
exclude = process_excludes(config['borger']['exclude']) if 'exclude' in config['borger'] else []
|
|
209
|
-
|
|
210
|
-
if 'prune' in config['borger']:
|
|
211
|
-
# TODO: Stuff
|
|
212
|
-
print('Parser for the prune option is not implemented yet')
|
|
213
|
-
sys.exit(1)
|
|
214
|
-
|
|
215
|
-
if 'destination' in config['borger']:
|
|
216
|
-
args.destination = config['borger']['destination']
|
|
217
|
-
else:
|
|
218
|
-
print('Destination directory not specified')
|
|
219
|
-
sys.exit(1)
|
|
220
|
-
|
|
221
|
-
if 'source' in config['borger']:
|
|
222
|
-
args.source = Path(config['borger']['source'])
|
|
223
|
-
else:
|
|
224
|
-
print('Source directory not specified')
|
|
225
|
-
sys.exit(1)
|
|
226
|
-
|
|
227
|
-
# Initialise if necessary
|
|
228
|
-
|
|
229
|
-
if args.debug:
|
|
230
|
-
args.options.append('--verbose')
|
|
231
|
-
|
|
232
|
-
if args.verbose:
|
|
233
|
-
args.options.append('--progress')
|
|
234
|
-
|
|
235
|
-
# Decide what to do
|
|
236
|
-
|
|
237
|
-
for command in args.commands:
|
|
238
|
-
if command == 'backup':
|
|
239
|
-
borg_backup(args, exclude)
|
|
240
|
-
elif command == 'mount':
|
|
241
|
-
borg_mount(args)
|
|
242
|
-
elif command == 'umount':
|
|
243
|
-
borg_umount(args)
|
|
244
|
-
elif command == 'info':
|
|
245
|
-
borg_info(args)
|
|
246
|
-
elif command == 'prune':
|
|
247
|
-
borg_prune(args)
|
|
248
|
-
elif command == 'check':
|
|
249
|
-
borg_check(args)
|
|
250
|
-
elif command == 'init':
|
|
251
|
-
borg_init(args)
|
|
252
|
-
elif command == 'compact':
|
|
253
|
-
borg_compact(args)
|
|
254
|
-
else:
|
|
255
|
-
print(f'Unrecognized command: {command}')
|
|
256
|
-
sys.exit(2)
|
|
257
|
-
|
|
258
|
-
################################################################################
|
|
259
|
-
|
|
260
|
-
def borger():
|
|
261
|
-
"""Entry point"""
|
|
262
|
-
|
|
263
|
-
try:
|
|
264
|
-
main()
|
|
265
|
-
except KeyboardInterrupt:
|
|
266
|
-
sys.exit(1)
|
|
267
|
-
except BrokenPipeError:
|
|
268
|
-
sys.exit(2)
|
|
269
|
-
|
|
270
|
-
################################################################################
|
|
271
|
-
|
|
272
|
-
if __name__ == '__main__':
|
|
273
|
-
borger()
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
#! /usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
################################################################################
|
|
4
|
-
""" Check how much free space is available on all filesystems, ignoring
|
|
5
|
-
read-only filesystems, /dev and tmpfs.
|
|
6
|
-
|
|
7
|
-
Issue a warning if any are above 90% used.
|
|
8
|
-
"""
|
|
9
|
-
################################################################################
|
|
10
|
-
|
|
11
|
-
import sys
|
|
12
|
-
import argparse
|
|
13
|
-
import psutil
|
|
14
|
-
|
|
15
|
-
################################################################################
|
|
16
|
-
|
|
17
|
-
WARNING_LEVEL = 15
|
|
18
|
-
|
|
19
|
-
################################################################################
|
|
20
|
-
|
|
21
|
-
def main():
|
|
22
|
-
""" Do everything """
|
|
23
|
-
|
|
24
|
-
parser = argparse.ArgumentParser(description='Check for filesystems that are running low on space')
|
|
25
|
-
parser.add_argument('--level', action='store', type=int, default=WARNING_LEVEL,
|
|
26
|
-
help='Warning if less than this amount of space is available on any writeable, mounted filesystem (default=%d)' % WARNING_LEVEL)
|
|
27
|
-
args = parser.parse_args()
|
|
28
|
-
|
|
29
|
-
if args.level < 0 or args.level > 100:
|
|
30
|
-
print('Invalid value: %d' % args.level)
|
|
31
|
-
sys.exit(3)
|
|
32
|
-
|
|
33
|
-
disks = psutil.disk_partitions()
|
|
34
|
-
devices = []
|
|
35
|
-
warning = []
|
|
36
|
-
|
|
37
|
-
for disk in disks:
|
|
38
|
-
if 'ro' not in disk.opts.split(',') and disk.device not in devices:
|
|
39
|
-
devices.append(disk.device)
|
|
40
|
-
usage = psutil.disk_usage(disk.mountpoint)
|
|
41
|
-
|
|
42
|
-
disk_space = 100 - usage.percent
|
|
43
|
-
|
|
44
|
-
if disk_space < args.level:
|
|
45
|
-
warning.append('%s has only %2.1f%% space available' % (disk.mountpoint, disk_space))
|
|
46
|
-
|
|
47
|
-
if warning:
|
|
48
|
-
print('Filesystems with less than %d%% available space:' % args.level)
|
|
49
|
-
print('\n'.join(warning))
|
|
50
|
-
|
|
51
|
-
################################################################################
|
|
52
|
-
|
|
53
|
-
def diskspacecheck():
|
|
54
|
-
"""Entry point"""
|
|
55
|
-
|
|
56
|
-
try:
|
|
57
|
-
main()
|
|
58
|
-
|
|
59
|
-
except KeyboardInterrupt:
|
|
60
|
-
sys.exit(1)
|
|
61
|
-
except BrokenPipeError:
|
|
62
|
-
sys.exit(2)
|
|
63
|
-
|
|
64
|
-
################################################################################
|
|
65
|
-
|
|
66
|
-
if __name__ == '__main__':
|
|
67
|
-
diskspacecheck()
|