Closed benjamonnguyen closed 3 weeks ago
@benjamonnguyen Maybe also add the new option by something like -tags="YOUR-TAG-NAME"
to the readme.md table which lists common commands like here ?: https://github.com/benjamonnguyen/immich-go/tree/feature/tags?tab=readme-ov-file#shared-options-with-all-commands
@simulot Can this be merged please?
Thx!
@tobiasgraeber updated the readme!
Let's actually hold off on merging this.
I'm seeing an issue where sometimes assets aren't being tagged.
Opened an issue here: https://github.com/immich-app/immich/issues/13633
I'm wondering if it possible to leverage the tagging system to track immich-go uploads, and implement a kind of UNDO.
I can definitely see immich-go upload -tag-session
tagging all uploaded assets with the same format log files are suffixed with. Then immich-go delete -tags=20241022xx
.
I can add the -tag-session flag to this PR.
@simulot implemented tag-session flag:
For now I've had to add a 5 second sleep. It looks like there's a race condition where the assets are being moved out of the upload directory into the library directory resulting in a stale path when the tagAssets request is made.
Waiting on a response from the immich team.
@simulot implemented tag-session flag:
Nice! The session tag could be hierarchical has well. All upload would be under one master tag like "immich-go/session_2006-01-02_15-04-05"
For now I've had to add a 5 second sleep. It looks like there's a race condition where the assets are being moved out of the upload directory into the library directory resulting in a stale path from the tagAssets request is made.
Waiting on a response from the immich team.
Let's see how the discussion goes.
Thinking loud: Imagine your personal collection of assets is sorted patiently by years, topic and so one... 2009 / Petrified forest 2009 / Grand canyon 2009 / Cousins meeting ...
Using the path as tags makes sense, isn't it?
Using the path as tags makes sense, isn't it?
Silly of me to not think of this considering it's what motivated this PR in the first place. My wife has her folder structure like
|--Holidays
|-- New Years
|-- Halloween
|-- Thanksgiving
and simply providing a flag -tag-by-path
would be ideal.
Running list of possible flags... -tag-by-path -tag-with-session -tags
@simulot Got a workaround from an immich maintainer (https://github.com/immich-app/immich/discussions/13637#discussioncomment-11017586)
If things look ok to you, I think it's mergeable
How about a -tag-by-path-separators
to further split the path component by a given set of chars?
My existing archive has folders named 2024/2024-02-05-event-name-or-such
, and I have subfolders named out
for results of processing.
If that's a bit esoteric it's no problem for me, as I'll just use a bash script to call immich-go for each folder separately, building the tags list for each folder as it goes.
But either way, I'm keen to see this merged! :-)
@agittins I think the 3 current flags covers our bases and a bash script leveraging them would be a cleaner
@simulot after using it to upload and tag a few of my wife's albums, I think it'll be a cleaner CLI to break it out into its own tag
command and treat it as a two step process. Upload then tag. Am also planning to implement -remove-tags=LIST
and -tag-cleanup
.
This could be one of the maintenance tools that we can propose through immich-go
fyi: I'm still on the code reorganization
The immich-go next version is more mature now.
Could you envisage to port the tag functionality in the next
branch?
Feel free to discuss this
Don't rush on it... I'm still shaking the code
If you don't mind, do you have a summary of the direction your taking with this next branch?
I'll move the changes onto the next branch but you can look at my latest commits if you want to see the new tag command's options and implementation.
I changed completely the command line management. I think I made it too difficult for a easy merge. I'll do it.
I'm ready to merge your PR. The next branch is so different now, than I don't know where to start while keep you credited for the feature.
Are you going to merge next into main branch?
Can we chat on discord?
Sure can you link me to the channel?
I'm reviewing your PR in details.
1/ I'm sorry for having shacked all the source while you have worked on it. 2/ I would like to include the tag functionality in the upload command. Then it will be available for any source of photos 3/ I'm think to group immich editing functions like tag maintenance, raw/jpeg cleaning, stack bursts....
My channel is @simulot, Paris time zone.
Linking to #522
Description
UpsertTags
,TagAssets
,BulkTagAssets
, andSendJobCommand
immich endpoints.Verification
test command:
immich-go upload -tags="test" -tag-with-session -tag-with-path ~/test