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

get introspection in lua

Đang mở
#195 8 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
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
lua
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách xem xét script Darktable-xmp được liên kết và tệp base64.lua được đề cập trong danh sách TODO. Làm rõ interface introspection dự kiến và cách các thư viện XML Lua hiện có cần đọc và ghi params. Công việc được xem là hoàn tất khi đã thống nhất phạm vi, xử lý giá trị nén hoạt động và có khả năng tự động đọc/ghi tham số.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

hello,

I was willing to write a lua script that changes some values (like exposure) in a bunch of pictures, I didn't found any.

I thougth to start writing a "tool" to do this, it is far from ready but i think it is a good starting point if someone would like to collaborate

I never used lua before so you may find some weird syntax, you can find the code here
https://repl.it/@VincenzoG/Darktable-xmp

example code:

require "tools/xmp_utility"

input = "0000000010c7babce0ce773e00004842000080c0"

exposure_params = {mode = 1, black = 2, exposure = 3, deflicker_percentile = 4, deflicker_target_level = 5}
exposure_table = dt_xmp_decode(input)

print(table.concat(exposure_table, " "))
print("Mode:", exposure_table[exposure_params.mode])
print("black:", exposure_table[exposure_params.black])
print("exposure:", exposure_table[exposure_params.exposure])
print("deflicker_percentile:", exposure_table[exposure_params.deflicker_percentile])
print("deflicker_target_level:", exposure_table[exposure_params.deflicker_target_level])

print(dt_xmp_encode(exposure_table))

exposure_table[exposure_params.exposure] = exposure_table[exposure_params.exposure] - 0.02
print("new exposure:", exposure_table[exposure_params.exposure])
print(dt_xmp_encode(exposure_table))

and it's output:

0 -0.022799998521805 0.24200010299683 50 -4
Mode:   0
black:  -0.022799998521805
exposure:   0.24200010299683
deflicker_percentile:   50
deflicker_target_level: -4
0000000010c7babce0ce773e00004842000080c0
new exposure:   0.22200010299683
0000000010c7babcfe53633e00004842000080c0

todo list:

  • use compressed values: i found on google some part of code but i didn't integrated them, yet, you could find them in the base64.lua file
  • automatically read/write the params: this can be done knowing the file path and using one of the already existing xml library for lua

If someone would like to collaborate tell me!

Ngôn ngữ chính
Lua
Star
219
Fork
142
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 darktable-org/lua-scripts

Tất cả issue của darktable-org/lua-scripts

Issue tương tự

Thêm issue về Lua

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.