cloudsh 0.0.0__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.
cloudsh-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.3
2
+ Name: cloudsh
3
+ Version: 0.0.0
4
+ Summary: A Python CLI wrapping common Linux commands for local/cloud files.
5
+ Author: Your Name
6
+ Author-email: you@example.com
7
+ Requires-Python: >=3.9,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Provides-Extra: all
15
+ Provides-Extra: aws
16
+ Provides-Extra: azure
17
+ Provides-Extra: gcs
18
+ Provides-Extra: gs
19
+ Requires-Dist: argcomplete (>=3.5.3,<4.0.0)
20
+ Requires-Dist: argx (>=0.2,<0.3)
21
+ Requires-Dist: azure-storage-blob (>=12,<13) ; extra == "azure" or extra == "all"
22
+ Requires-Dist: azure-storage-file-datalake (>=12,<13) ; extra == "azure" or extra == "all"
23
+ Requires-Dist: boto3 (>=1.34,<2.0) ; extra == "aws" or extra == "all"
24
+ Requires-Dist: cloudpathlib (>=0.20,<0.21)
25
+ Requires-Dist: google-cloud-storage (>=2.19,<3.0) ; extra == "gs" or extra == "gcs" or extra == "all"
26
+ Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
27
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
@@ -0,0 +1,2 @@
1
+ from . import cloudpathlib_patch
2
+ from .utils import __version__
@@ -0,0 +1,4 @@
1
+ from .main import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,58 @@
1
+ name = "cat"
2
+ help = "Concatenate files and print on the standard output"
3
+ description = """
4
+ Concatenate FILE(s) to standard output.
5
+ With no FILE, or when FILE is -, read standard input.
6
+ """
7
+ path_options = "file"
8
+
9
+ [[arguments]]
10
+ flags = ["file"]
11
+ metavar = "FILE"
12
+ nargs = "*"
13
+ help = "Files to concatenate (use - for stdin)"
14
+
15
+ [[arguments]]
16
+ flags = ["-A", "--show-all"]
17
+ help = "equivalent to -vET"
18
+ action = "store_true"
19
+
20
+ [[arguments]]
21
+ flags = ["-b", "--number-nonblank"]
22
+ help = "number nonempty output lines, overrides -n"
23
+ action = "store_true"
24
+
25
+ [[arguments]]
26
+ flags = ["-e"]
27
+ help = "equivalent to -vE"
28
+ action = "store_true"
29
+
30
+ [[arguments]]
31
+ flags = ["-E", "--show-ends"]
32
+ help = "display $ at end of each line"
33
+ action = "store_true"
34
+
35
+ [[arguments]]
36
+ flags = ["-n", "--number"]
37
+ help = "number all output lines"
38
+ action = "store_true"
39
+
40
+ [[arguments]]
41
+ flags = ["-s", "--squeeze-blank"]
42
+ help = "suppress repeated empty output lines"
43
+ action = "store_true"
44
+
45
+ [[arguments]]
46
+ flags = ["-t"]
47
+ help = "equivalent to -vT"
48
+ action = "store_true"
49
+
50
+ [[arguments]]
51
+ flags = ["-T", "--show-tabs"]
52
+ help = "display TAB characters as ^I"
53
+ action = "store_true"
54
+
55
+ [[arguments]]
56
+ flags = ["-v", "--show-nonprinting"]
57
+ help = "use ^ and M- notation, except for LFD and TAB"
58
+ action = "store_true"
@@ -0,0 +1,34 @@
1
+ name = "complete"
2
+ help = "Generate shell completion"
3
+ description = """
4
+ Generate shell completion script for the specified shell (bash, fish or zsh).
5
+ Or update/clear completion cache for given cloud paths.
6
+ """
7
+ path_options = "path"
8
+
9
+ [[arguments]]
10
+ flags = ["-s", "--shell"]
11
+ help = "Shell to generate completion for. Detected automatically if not specified."
12
+ choices = ["bash", "fish", "zsh"]
13
+
14
+ [[arguments]]
15
+ flags = ["path"]
16
+ metavar = "Path"
17
+ help = "Cloud paths to generate completion for"
18
+ nargs = "*"
19
+
20
+ [[arguments]]
21
+ flags = ["-d", "--depth"]
22
+ help = "Depth of directories to scan for completion from the buckets. -1 means no limit."
23
+ type = "int"
24
+ default = -1
25
+
26
+ [[arguments]]
27
+ flags = ["--update-cache"]
28
+ help = "Update completion cache for given buckets"
29
+ action = "store_true"
30
+
31
+ [[arguments]]
32
+ flags = ["--clear-cache"]
33
+ help = "Clear completion cache for given buckets"
34
+ action = "store_true"
@@ -0,0 +1,62 @@
1
+ name = "cp"
2
+ help = "Copy files and directories"
3
+ description = """
4
+ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
5
+ """
6
+ path_options = ["SOURCE", "DEST", "target_directory"]
7
+
8
+ [[arguments]]
9
+ flags = ["SOURCE"]
10
+ metavar = "SOURCE"
11
+ help = "Source file(s) to copy"
12
+ nargs = "+"
13
+
14
+ [[arguments]]
15
+ flags = ["DEST"]
16
+ metavar = "DEST"
17
+ help = "Destination file or directory"
18
+
19
+ [[arguments]]
20
+ flags = ["-r", "-R", "--recursive"]
21
+ help = "Copy directories recursively"
22
+ action = "store_true"
23
+
24
+ [[arguments]]
25
+ flags = ["-i", "--interactive"]
26
+ help = "Prompt before overwrite"
27
+ action = "store_true"
28
+
29
+ [[arguments]]
30
+ flags = ["-f", "--force"]
31
+ help = "Force overwrite of existing files"
32
+ action = "store_true"
33
+
34
+ [[arguments]]
35
+ flags = ["-n", "--no-clobber"]
36
+ help = "Do not overwrite existing files"
37
+ action = "store_true"
38
+
39
+ [[arguments]]
40
+ flags = ["-v", "--verbose"]
41
+ help = "Explain what is being done"
42
+ action = "store_true"
43
+
44
+ [[arguments]]
45
+ flags = ["-p", "--preserve"]
46
+ help = "Preserve mode, ownership, timestamps"
47
+ action = "store_true"
48
+
49
+ [[arguments]]
50
+ flags = ["-t", "--target-directory"]
51
+ help = "Copy all SOURCE arguments into DIRECTORY"
52
+ metavar = "DIRECTORY"
53
+
54
+ [[arguments]]
55
+ flags = ["-T", "--no-target-directory"]
56
+ help = "Treat DEST as a normal file"
57
+ action = "store_true"
58
+
59
+ [[arguments]]
60
+ flags = ["--parents"]
61
+ help = "Use full source file name under DIRECTORY"
62
+ action = "store_true"
@@ -0,0 +1,52 @@
1
+ usage = "cloudsh head [OPTION]... [FILE]..."
2
+ description = """
3
+ Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name.
4
+ When no FILE is given, read from standard input.
5
+
6
+ With no FILE, or when FILE is -, read standard input.
7
+ """
8
+ epilog = """
9
+ NUM may have a multiplier suffix:
10
+ b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
11
+ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y, R, Q.
12
+ Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
13
+ For the orginal GNU head documentation, see:
14
+ https://www.gnu.org/software/coreutils/head
15
+ """
16
+ path_options = "file"
17
+
18
+ [[arguments]]
19
+ flags = ["-c", "--bytes"]
20
+ metavar = "[-]NUM"
21
+ help = "print the first NUM bytes of each file; with the leading '-', print all but the last NUM bytes of each file"
22
+ type = "str" # Changed from int to str to handle suffixes
23
+
24
+ [[arguments]]
25
+ flags = ["-n", "--lines"]
26
+ metavar = "[-]NUM"
27
+ default = "10"
28
+ help = "print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file"
29
+ type = "str" # Changed from int to str to handle suffixes
30
+
31
+ [[arguments]]
32
+ flags = ["-q", "--quiet", "--silent"]
33
+ help = "never print headers giving file names"
34
+ action = "store_true"
35
+
36
+ [[arguments]]
37
+ flags = ["-v", "--verbose"]
38
+ help = "always print headers giving file names"
39
+ action = "store_true"
40
+
41
+ [[arguments]]
42
+ flags = ["-z", "--zero-terminated"]
43
+ help = "line delimiter is NUL, not newline"
44
+ action = "store_true"
45
+
46
+ [[arguments]]
47
+ flags = ["file"]
48
+ metavar = "FILE"
49
+ nargs = "*"
50
+ default = []
51
+ action = "extend"
52
+ help = "the file to read"
@@ -0,0 +1,64 @@
1
+ usage = "cloudsh ls [OPTION]... [FILE]..."
2
+ description = """
3
+ List information about the FILEs (the current directory by default).
4
+ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
5
+ """
6
+ path_options = "file"
7
+
8
+ [[arguments]]
9
+ flags = ["-a", "--all"]
10
+ help = "do not ignore entries starting with ."
11
+ action = "store_true"
12
+
13
+ [[arguments]]
14
+ flags = ["-A", "--almost-all"]
15
+ help = "do not list implied . and .."
16
+ action = "store_true"
17
+
18
+ [[arguments]]
19
+ flags = ["-l"]
20
+ help = "use a long listing format"
21
+ action = "store_true"
22
+
23
+ [[arguments]]
24
+ flags = ["-H", "--human-readable"]
25
+ help = "with -l, print sizes like 1K 234M 2G etc."
26
+ action = "store_true"
27
+
28
+ [[arguments]]
29
+ flags = ["--si"]
30
+ help = "likewise, but use powers of 1000 not 1024"
31
+ action = "store_true"
32
+
33
+ [[arguments]]
34
+ flags = ["-R", "--recursive"]
35
+ help = "list subdirectories recursively"
36
+ action = "store_true"
37
+
38
+ [[arguments]]
39
+ flags = ["-r", "--reverse"]
40
+ help = "reverse order while sorting"
41
+ action = "store_true"
42
+
43
+ [[arguments]]
44
+ flags = ["-S"]
45
+ help = "sort by file size, largest first"
46
+ action = "store_true"
47
+
48
+ [[arguments]]
49
+ flags = ["-t"]
50
+ help = "sort by time, newest first"
51
+ action = "store_true"
52
+
53
+ [[arguments]]
54
+ flags = ["-1"]
55
+ dest = "one"
56
+ help = "list one file per line"
57
+ action = "store_true"
58
+
59
+ [[arguments]]
60
+ flags = ["file"]
61
+ metavar = "FILE"
62
+ nargs = "*"
63
+ default = []
64
+ help = "files to list"
@@ -0,0 +1,27 @@
1
+ name = "mkdir"
2
+ help = "Create directories"
3
+ description = """
4
+ Create the DIRECTORY(ies), if they do not already exist.
5
+ """
6
+ path_options = "directory"
7
+
8
+ [[arguments]]
9
+ flags = ["directory"]
10
+ metavar = "DIRECTORY"
11
+ nargs = "+"
12
+ help = "Directory(ies) to create"
13
+
14
+ [[arguments]]
15
+ flags = ["-m", "--mode"]
16
+ help = "Set file mode (as in chmod), not a=rwx - umask. Ignored for cloud directories."
17
+ type = "str"
18
+
19
+ [[arguments]]
20
+ flags = ["-p", "--parents"]
21
+ help = "No error if existing, make parent directories as needed"
22
+ action = "store_true"
23
+
24
+ [[arguments]]
25
+ flags = ["-v", "--verbose"]
26
+ help = "Print a message for each created directory"
27
+ action = "store_true"
@@ -0,0 +1,68 @@
1
+ usage = """
2
+ mv [OPTION]... [-T] SOURCE DEST
3
+ mv [OPTION]... SOURCE... DIRECTORY
4
+ mv [OPTION]... -t DIRECTORY SOURCE...
5
+ """
6
+ help = "Move (rename) files"
7
+ description = """
8
+ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
9
+ """
10
+ path_options = ["SOURCE", "DEST", "target_directory"]
11
+
12
+ [[arguments]]
13
+ flags = ["SOURCE"]
14
+ metavar = "SOURCE"
15
+ nargs = "+"
16
+ help = "Source file(s) to move"
17
+
18
+ [[arguments]]
19
+ flags = ["DEST"]
20
+ metavar = "DEST"
21
+ help = "Destination file or directory"
22
+
23
+ [[arguments]]
24
+ flags = ["-f", "--force"]
25
+ help = "Do not prompt before overwriting"
26
+ action = "store_true"
27
+
28
+ [[arguments]]
29
+ flags = ["-i", "--interactive"]
30
+ help = "Prompt before overwrite"
31
+ action = "store_true"
32
+
33
+ [[arguments]]
34
+ flags = ["-n", "--no-clobber"]
35
+ help = "Do not overwrite an existing file"
36
+ action = "store_true"
37
+
38
+ [[arguments]]
39
+ flags = ["-t", "--target-directory"]
40
+ metavar = "DIRECTORY"
41
+ help = "Move all SOURCE arguments into DIRECTORY"
42
+ type = "str"
43
+
44
+ [[arguments]]
45
+ flags = ["-T", "--no-target-directory"]
46
+ help = "Treat DEST as a normal file"
47
+ action = "store_true"
48
+
49
+ [[arguments]]
50
+ flags = ["-v", "--verbose"]
51
+ help = "Explain what is being done"
52
+ action = "store_true"
53
+
54
+ [[arguments]]
55
+ flags = ["-u"]
56
+ help = "equivalent to --update[=older]"
57
+ action = "store_true"
58
+
59
+ [[arguments]]
60
+ flags = ["--update"]
61
+ help = """Control which existing files are updated:
62
+ 'all' is default when --update not specified (replace all),
63
+ 'none' is like --no-clobber but skips don't cause failure,
64
+ 'older' is default when --update used (replace if older)"""
65
+ choices = ["all", "none", "older"]
66
+ default = "older"
67
+ nargs = "?"
68
+ const = "older"
@@ -0,0 +1,43 @@
1
+ name = "rm"
2
+ help = "Remove files or directories"
3
+ description = """
4
+ Remove (unlink) the FILE(s).
5
+ By default, does not remove directories. Use --recursive (-r or -R) to remove directories.
6
+ """
7
+ path_options = "file"
8
+
9
+ [[arguments]]
10
+ flags = ["file"]
11
+ metavar = "FILE"
12
+ nargs = "+"
13
+ help = "File(s) to remove"
14
+
15
+ [[arguments]]
16
+ flags = ["-f", "--force"]
17
+ help = "Ignore nonexistent files and arguments, never prompt"
18
+ action = "store_true"
19
+
20
+ [[arguments]]
21
+ flags = ["-i"]
22
+ help = "Prompt before every removal"
23
+ action = "store_true"
24
+
25
+ [[arguments]]
26
+ flags = ["-I"]
27
+ help = "Prompt once before removing more than three files or recursively"
28
+ action = "store_true"
29
+
30
+ [[arguments]]
31
+ flags = ["-r", "-R", "--recursive"]
32
+ help = "Remove directories and their contents recursively"
33
+ action = "store_true"
34
+
35
+ [[arguments]]
36
+ flags = ["-d", "--dir"]
37
+ help = "Remove empty directories"
38
+ action = "store_true"
39
+
40
+ [[arguments]]
41
+ flags = ["-v", "--verbose"]
42
+ help = "Explain what is being done"
43
+ action = "store_true"
@@ -0,0 +1,16 @@
1
+ name = "sink"
2
+ help = "Save piped data to a file"
3
+ description = """
4
+ Save data from stdin to a file, either local or cloud.
5
+ """
6
+ path_options = "file"
7
+
8
+ [[arguments]]
9
+ flags = ["file"]
10
+ metavar = "FILE"
11
+ help = "Target file path (local or cloud)"
12
+
13
+ [[arguments]]
14
+ flags = ["-a", "--append"]
15
+ help = "Append to file instead of replacing"
16
+ action = "store_true"
@@ -0,0 +1,85 @@
1
+ usage = "cloudsh tail [OPTION]... [FILE]..."
2
+ description = """
3
+ Print the last 10 lines of each FILE to standard output.
4
+ With more than one FILE, precede each with a header giving the file name.
5
+
6
+ With no FILE, or when FILE is -, read standard input.
7
+ """
8
+ epilog = """
9
+ NUM may have a multiplier suffix:
10
+ b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
11
+ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y, R, Q.
12
+ Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
13
+ For the orginal GNU tail documentation, see:
14
+ https://www.gnu.org/software/coreutils/tail
15
+ """
16
+ path_options = "file"
17
+
18
+ [[arguments]]
19
+ flags = ["-c", "--bytes"]
20
+ metavar = "[+]NUM"
21
+ help = "output the last NUM bytes; or use -c +NUM to output starting with byte NUM of each file"
22
+ type = "str"
23
+
24
+ [[arguments]]
25
+ flags = ["-f", "--follow"]
26
+ help = "output appended data as the file grows"
27
+ action = "store_true"
28
+
29
+ [[arguments]]
30
+ flags = ["-F"]
31
+ help = "same as --follow=name --retry"
32
+ action = "store_true"
33
+
34
+ [[arguments]]
35
+ flags = ["-n", "--lines"]
36
+ metavar = "[+]NUM"
37
+ default = "10"
38
+ help = "output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM"
39
+ type = "str"
40
+
41
+ [[arguments]]
42
+ flags = ["--max-unchanged-stats"]
43
+ metavar = "N"
44
+ help = "with --follow=name, reopen a FILE which has not changed size after N iterations"
45
+ type = "str"
46
+
47
+ [[arguments]]
48
+ flags = ["--pid"]
49
+ metavar = "PID"
50
+ help = "with -f, terminate after process ID, PID dies"
51
+ type = "str"
52
+
53
+ [[arguments]]
54
+ flags = ["-q", "--quiet", "--silent"]
55
+ help = "never output headers giving file names"
56
+ action = "store_true"
57
+
58
+ [[arguments]]
59
+ flags = ["--retry"]
60
+ help = "keep trying to open a file if it is inaccessible"
61
+ action = "store_true"
62
+
63
+ [[arguments]]
64
+ flags = ["-s", "--sleep-interval"]
65
+ metavar = "N"
66
+ help = "with -f, sleep for approximately N seconds between iterations"
67
+ type = "str"
68
+
69
+ [[arguments]]
70
+ flags = ["-v", "--verbose"]
71
+ help = "always output headers giving file names"
72
+ action = "store_true"
73
+
74
+ [[arguments]]
75
+ flags = ["-z", "--zero-terminated"]
76
+ help = "line delimiter is NUL, not newline"
77
+ action = "store_true"
78
+
79
+ [[arguments]]
80
+ flags = ["file"]
81
+ metavar = "FILE"
82
+ nargs = "*"
83
+ default = []
84
+ action = "extend"
85
+ help = "the file to read"
@@ -0,0 +1,48 @@
1
+ usage = "touch [OPTION]... FILE..."
2
+ help = "Update file timestamps"
3
+ description = """
4
+ Update the access and modification times of each FILE to the current time.
5
+ A FILE argument that does not exist is created empty, unless -c is supplied.
6
+ """
7
+ path_options = "file"
8
+
9
+ [[arguments]]
10
+ flags = ["file"]
11
+ metavar = "FILE"
12
+ nargs = "+"
13
+ help = "Files to touch"
14
+
15
+ [[arguments]]
16
+ flags = ["-a"]
17
+ help = "Change only the access time"
18
+ action = "store_true"
19
+
20
+ [[arguments]]
21
+ flags = ["-m"]
22
+ help = "Change only the modification time"
23
+ action = "store_true"
24
+
25
+ [[arguments]]
26
+ flags = ["-c", "--no-create"]
27
+ help = "Do not create any files"
28
+ action = "store_true"
29
+
30
+ [[arguments]]
31
+ flags = ["-d", "--date"]
32
+ help = "Parse STRING and use it instead of current time"
33
+ type = "str"
34
+
35
+ [[arguments]]
36
+ flags = ["-r", "--reference"]
37
+ help = "Use this file's times instead of current time"
38
+ type = "str"
39
+
40
+ [[arguments]]
41
+ flags = ["-t"]
42
+ help = "Use [[CC]YY]MMDDhhmm[.ss] instead of current time"
43
+ type = "str"
44
+
45
+ [[arguments]]
46
+ flags = ["--time"]
47
+ choices = ["access", "atime", "use", "modify", "mtime"]
48
+ help = "Change the specified time: access/atime/use='-a', modify/mtime='-m'"