Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Option to add "renamed time" in formatting name like : "filename_attachmentFormat_indexNumber_renamed time.xxx" #24

Closed
OGGGGGG opened this issue Apr 22, 2023 · 5 comments

Comments

@OGGGGGG
Copy link

OGGGGGG commented Apr 22, 2023

Because renamed the attachment won't update file modify time, when I inserted attachment and formated name second time and synchronize file,the issue will occur on synchronized terminal.And then the synchronized terminal will distroy online data.Like this:

synchronized terminal will distroy online data:

Old_Attachment_Name Old_Modify_Time Old_Attachment_ID problem New_Attachment_Name New_Modify_Time New_Attachment_ID
attachment1 1:00 1 attachment1 1:00 1
attachment2 2:00 2 attachment2 7:00 7(inserted)
attachment3 3:00 3 wrong to replace→ attachment3 2:00 2
attachment4 4:00 4 wrong to replace→ attachment4 3:00 3
attachment5 5:00 5 wrong to replace→ attachment5 4:00 4
attachment6 6:00 6 wrong to replace→ attachment6 5:00 5
attachment7 6:00 6

online data is wrong:

Attachment_Name Modify_Time Attachment_ID problem
attachment1 1:00 1 none
attachment2 7:00 7(inserted) none
attachment3 3:00 3 ID must be 2
attachment4 4:00 4 ID must be 3
attachment5 5:00 5 ID must be 4
attachment6 6:00 6 ID must be 5
attachment7 6:00 6 ID must be 6

So I suggest adding a parameter to distinguish between files with the same name——add "renamed time" in formatting name like : "filename_attachmentFormat_indexNumber_renamed time.xxx"。Example:

Old_Attachment_Name Old_Modify_Time Old_Attachment_ID New_Attachment_Name New_Modify_Time New_Attachment_ID
attachment1_20230422230012 1:00 1 attachment1_20230422230512 1:00 1
attachment2_20230422230013 2:00 2 attachment2_20230422230513 7:00 7(inserted)
attachment3_20230422230014 3:00 3 won't replace→ attachment3_20230422230514 2:00 2
attachment4_20230422230015 4:00 4 won't replace→ attachment4_20230422230515 3:00 3
attachment5_20230422230016 5:00 5 won't replace→ attachment5_20230422230516 4:00 4
attachment6_20230422230017 6:00 6 won't replace→ attachment6_20230422230517 5:00 5
attachment7_20230423230518 6:00 6

This feature also can improve experience of "Automatic formatting" feature.

@JYC333
Copy link
Owner

JYC333 commented Apr 25, 2023

I'm not sure about what Old_attachment_ID (3rd column) and New_attachment_ID (7th column) in the first and third table. Is a attribute for the online data? I don't think this plugin has that attribute. Could you explain a bit more about this attachment ID?

@OGGGGGG
Copy link
Author

OGGGGGG commented Apr 26, 2023

The attachment ID corresponds to the attachment content. If the two Attachment_ID are identical, it means that these attachments have the same content, only the attachment names are different.

@JYC333
Copy link
Owner

JYC333 commented Apr 26, 2023

It's added in 1.9.7 now.

@JYC333 JYC333 closed this as completed Apr 26, 2023
@OGGGGGG
Copy link
Author

OGGGGGG commented Apr 26, 2023

Maybe we can use this code:
const date_String = "" + timeInterval.getFullYear() + ("0"+(timeInterval.getMonth() + 1)).slice(-2) + ("0"+timeInterval.getDate()).slice(-2) + ("0"+timeInterval.getHours()).slice(-2) + ("0"+timeInterval.getMinutes()).slice(-2) + ("0"+timeInterval.getSeconds()).slice(-2);

@JYC333
Copy link
Owner

JYC333 commented Apr 26, 2023

This is better, just forgot the zero stuff of date. Thanks for the help! Updated now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants