use the shared function in s3tree.py
- ID
c6962f8- date
2023-05-15 19:53:46+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
5c08643- message
use the shared function in s3tree.py- changed files
1 file, 1 addition, 8 deletions
Changed files
aws/s3tree.py (8578) → aws/s3tree.py (8392)
diff --git a/aws/s3tree.py b/aws/s3tree.py
index e5368e6..d3023e6 100755
--- a/aws/s3tree.py
+++ b/aws/s3tree.py
@@ -51,7 +51,7 @@ import humanize
import natsort
import termcolor
-from _common import create_s3_session, parse_s3_uri
+from _common import create_link_text, create_s3_session, parse_s3_uri
def parse_args():
@@ -71,13 +71,6 @@ def list_s3_objects(sess, **kwargs):
yield from page.get("Contents", [])
-def create_link_text(*, url, label):
- # Based on https://stackoverflow.com/a/71309268/1558022
-
- # OSC 8 ; params ; URI ST <name> OSC 8 ;; ST
- return f"\033]8;;{url}\033\\{label}\033]8;;\033\\"
-
-
def pprint_nested_tree(bucket, tree, folder_counts, parents=None):
lines = []
parents = parents or []