https://github.com/trougnouf/dtmediawiki
Wikimedia Commons export plugin for darktable
https://github.com/trougnouf/dtmediawiki
darktable mediawiki plugins wikimedia-commons
Last synced: 6 months ago
JSON representation
Wikimedia Commons export plugin for darktable
- Host: GitHub
- URL: https://github.com/trougnouf/dtmediawiki
- Owner: trougnouf
- License: gpl-3.0
- Created: 2018-09-01T16:43:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-05-29T15:03:46.000Z (about 1 year ago)
- Last Synced: 2025-05-29T16:49:16.293Z (about 1 year ago)
- Topics: darktable, mediawiki, plugins, wikimedia-commons
- Language: Lua
- Homepage:
- Size: 86.9 KB
- Stars: 11
- Watchers: 5
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dtMediaWiki
Wikimedia Commons export plugin for [darktable](https://www.darktable.org/)

See also: [Commons:DtMediaWiki](https://commons.wikimedia.org/wiki/Commons:DtMediaWiki)
## Dependencies
- [lua-sec](https://luarocks.org/modules/brunoos/luasec)
- Lua bindings for OpenSSL library to provide TLS/SSL communication
- [lua-luajson](https://luarocks.org/modules/harningt/luajson)
- JSON parser/encoder for Lua
- [lua-multipart-post](https://luarocks.org/modules/catwell/multipart-post)
- HTTP Multipart Post helper
Note that `mediawikiapi.lua` is independent of darktable.
## Installation
- Download the plugin from [https://github.com/trougnouf/dtMediaWiki/archive/master.zip](https://github.com/trougnouf/dtMediaWiki/archive/master.zip)
- Create the [darktable plugin directory](https://www.darktable.org/usermanual/en/lua_chapter.html#lua_usage) 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 Linux package](https://aur.archlinux.org/packages/darktable-plugin-dtmediawiki-git/) or [Gentoo package](https://github.com/gentoo/guru/tree/master/media-plugins/dtmediawiki) and activate the plugin.
## Usage
- 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 contains the following [metadata](https://docs.darktable.org/usermanual/stable/en/module-reference/utility-modules/shared/metadata-editor/) and [tags](https://docs.darktable.org/usermanual/stable/en/module-reference/utility-modules/shared/tagging/):
- **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}}`](https://commons.wikimedia.org/wiki/Template:Self) template, some options are [`cc-by-sa-4.0`](https://commons.wikimedia.org/wiki/Template:Cc-by-sa-4.0), [`cc-by-4.0`](https://commons.wikimedia.org/wiki/Template:Cc-by-4.0), [`GFDL`](https://commons.wikimedia.org/wiki/Template:GFDL), see [Commons:Copyright tags](https://commons.wikimedia.org/wiki/Commons:Copyright_tags)
- **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.
## See also
All tools for uploading to Wikimedia Commons https://commons.wikimedia.org/wiki/Commons:Upload_tools
## Thanks
- Iulia and Leslie for excellent coworking companionship and love
- darktable developers for an excellent open-source imaging software with a well documented [Lua API](https://docs.darktable.org/lua/stable/)
- [LrMediaWiki](https://github.com/Hasenlaeufer/LrMediaWiki) developers [robinkrahl](https://github.com/robinkrahl) and [Hasenlaeufer](https://github.com/Hasenlaeufer) for what inspired this and some base code
- MediaWiki [User:Platonides](https://www.mediawiki.org/wiki/User:Platonides) for helping me figure out the cookie issue
- [catwell](https://github.com/catwell): author of lua-multipart-post and a responsive fellow
- [simon04](https://github.com/simon04): second user and first contributor

--[Trougnouf](https://commons.wikimedia.org/wiki/User:Trougnouf)