Commons:DtMediaWiki
dtMediaWiki is a Wikimedia Commons export plugin for darktable
Contents
Dependencies[edit]
- lua-sec
- Lua bindings for OpenSSL library to provide TLS/SSL communication
- lua-luajson
- JSON parser/encoder for Lua
note that mediawiki.lua is independent of darktable.
Installation[edit]
- Download the plugin from https://github.com/trougnouf/dtMediaWiki
- Create the darktable plugin directory if it doesn't exist
# mkdir /usr/share/darktable/lua/contrib
- Copy (or link) the dtMediaWiki directory over there
# cp -r /path/to/dtMediaWiki /usr/share/darktable/lua/contrib
- Activate the plugin in your darktable luarc config file by adding `require "contrib/dtMediaWiki/dtMediaWiki"`
$ echo 'require "contrib/dtMediaWiki/dtMediaWiki"' >> ~/.config/darktable/luarc
or simply use the arch installer and activate the plugin.
Usage[edit]
- Login to Wikimedia Commons by setting your "Wikimedia username" and "Wikimedia password" in *darktable preferences > lua options* then restarting darktable.
- This will add the "Wikimedia Commons" entry into target storage.
- Ensure your image metadata contains the following:
- a title and/or description.
- The default output filename is "title (filename) description.ext" or "title (filename).ext" depending on what is available
- rights
- Use something compatible with the {{self}} template, some options are "cc-by-sa-4.0", "cc-by-4.0", "GFDL", "GFDL|cc-by-sa-4.0,3.0,2.5,2.0,1.0", ...
- tags: Categories and templates
- Any tag that matches "Category:something" will be added as [[Category:something]] (no need to include the brackets), likewise any template matching "{{something}}" will be added as-is.
The image coordinates will be added if they exist, and the creator metadata will be added as [[User:Wikimedia username|creator]] if it has been set.
Thanks[edit]
- Iulia and Leslie for excellent coworking companionship and love
- darktable developers for an excellent open-source imaging software with a well documented lua API
- LrMediaWiki developers robinkrahl and Hasenlaeufer for what inspired this and some base code
- MediaWiki User:Platonides for helping me figure out the cookie issue
- 'catwell': author of lua-multipart-post and a responsive fellow
|