Skip to content

Support bucket/object tagging command#1283

Merged
fviard merged 1 commit intos3tools:masterfrom
jeffwang0516:tagging-support
Dec 12, 2023
Merged

Support bucket/object tagging command#1283
fviard merged 1 commit intos3tools:masterfrom
jeffwang0516:tagging-support

Conversation

@jeffwang0516
Copy link
Copy Markdown
Contributor

@jeffwang0516 jeffwang0516 commented Oct 21, 2022

@fviard fviard added this to the 2.4.0 milestone Oct 21, 2022
@fviard
Copy link
Copy Markdown
Contributor

fviard commented Oct 21, 2022

Looks nice, thank you.
I will try to review that fast!

@fviard
Copy link
Copy Markdown
Contributor

fviard commented Nov 8, 2022

So, after looking at this, I think that it would be nice to be able to directly take the "tag" values for settagging and have a pretty print for gettagging instead of having xml input/outputs.

Here the xml is kind of just the request content, but there is no complex logic or customization that could request to expose that to the user.

What I would think would be something like that:
`s3cmd settagging s3://mybucket/myfile "MyFirstTag=value1&OtherKey=value2"

s3cmd gettagging s3://mybucket/myfile
s3://mybucket/myfile (object):
     MyfirstTag: value1
     OtherKey: value2

The & is mostly not used for tags, so could be an ok separator I think, but it requires to use quotes otherwise "the shell" might interpret it. And I'm thinking better to not separate by space as different argument each tag, because it might be good, in the future, to allow to have multiple files set in one time.

What do you think about that?

(btw the way, not for now, but for the future, I'm thinking about adding --iformat and --oformat flags to be able to specify different formats for input or outputs.
for example, for input: "inline, xml", for output: "pretty,xml,csv,json".

@jeffwang0516
Copy link
Copy Markdown
Contributor Author

@fviard It looks better! I've updated the code.

@fviard fviard modified the milestones: 2.4.0, 2.5.0 Dec 6, 2023
@fviard fviard merged commit 4d97114 into s3tools:master Dec 12, 2023
@fviard
Copy link
Copy Markdown
Contributor

fviard commented Dec 12, 2023

Finally merged. Sorry for the delay and thank you for the feature :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object tagging feature

2 participants