Add API for sprite/file timestamps
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- api
Hướng nghiên cứu
Bắt đầu bằng cách đọc tài liệu scripting API hiện có và các API liên quan đến events và app.fs được đề cập trong issue. Xác định cách sprite.lastSaved, sprite.lastOpened và các timestamp của hệ thống tệp hoạt động, bao gồm các tệp chưa được lưu và việc so sánh timestamp; được xem là hoàn thành khi các giá trị được yêu cầu được cung cấp nhất quán trên tất cả các nền tảng được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I made a quick Sprite Reload plugin, and I was hoping to be able to add something to automatically reload a file if it was edited externally. For this, I'd need to store the last saved timestamp for each Aseprite file using events, and retrieve the last modified timestamp from the OS for the file, and see whether the last modified > last saved. While possible with io.popen, this causes CMD popups, requires additional user permissions and the platform dependent commands would make this difficult to do.
Therefore I'd love for the following to be added:
sprite.lastSaved: Returns a timestamp for the last time the sprite was saved using Aseprite. When not saved since opening, should returnsprite.lastOpened, when no saved, should returnnilor0.sprite.lastOpened: Returns a timestamp for when this file was last opened using Aseprite
app.fs.created(filepath): Returns the timestamp for when the originally createdapp.fs.lastModified(filepath): Return the timestamp for the last modification that was made to the file on disk.app.fs.lastAccessed(filepath: Returns the timestamp for the last time this file was accessed on disk
I don't quite see the utility of the last one, but since it's one of the main data timestamps that Windows provides, having access to it might be useful to someone someday!
I'm unsure on what the best format for the timestamps would be, but making it easy/possible to compare them would be useful.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 310
- Fork
- 68
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aseprite/api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Document dialog:entry placeholder propertyCó thể làm lại được @crashtestjava đã nhận 48 ngày trước và không có pull request nào đang mở. Đang mở
-
Document dialog:samerowCó thể làm lại được @crashtestjava đã nhận 48 ngày trước và không có pull request nào đang mở. Đang mở
-
Document onSave/beforeSave sprite.eventsCó thể làm lại được @crashtestjava đã nhận 48 ngày trước và không có pull request nào đang mở. Đang mở
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openfoodfacts/score-my-recipe#80 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
snapshot-labs/stamp#702 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Cainophile EXIT handler crashes on its own password redaction and logs the DB password in clear textĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Dev worker sometimes never starts: `runScript`'s `withUtf8` waits on the stdin GHCi is readingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
digitallyinduced/ihp#2832 ·
Maintainer thường phản hồi trong vòng 1 ngày