Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add API for sprite/file timestamps

Đang mở
#174 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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 return sprite.lastOpened, when no saved, should return nil or 0.
  • sprite.lastOpened : Returns a timestamp for when this file was last opened using Aseprite
Image
  • app.fs.created(filepath) : Returns the timestamp for when the originally created
  • app.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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aseprite/api

Tất cả issue của aseprite/api

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.