GithubHelp home page GithubHelp logo

hasenlaeufer / lrmediawiki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robinkrahl/lrmediawiki

4.0 4.0 5.0 442 KB

MediaWiki for Lightroom

Home Page: https://commons.wikimedia.org/wiki/Commons:LrMediaWiki

License: Other

Lua 96.94% Shell 3.06%

lrmediawiki's Introduction

LrMediaWiki Build Status

LrMediaWiki is a plugin for Adobe Photoshop Lightroom that allows users to upload images to Wikimedia Commons or any other MediaWiki installation directly from Lightroom.

Usage information

Usage information can be found on the page Commons:LrMediaWiki on Wikimedia Commons.

Developer information

LrMediaWiki is developed in Lua using the Lightroom SDK. It is released under the MIT/X11 license. LrMediaWiki works with Lightroom from version 4 up to latest "Classic" 10 installations – both on Windows and on macOS.

Code structure

The plugin code is located in the mediawiki.lrdevplugin directory. Info.lua defines the plugin metadata to be read by Lightroom. MediaWikiExportServiceProvider.lua defines the user interfaces and passes all necessary information to MediaWikiInterface.lua. This file evaluates the user input and prepares the file description and the file itself for the MediaWiki upload. The upload is done in MediaWikiApi.lua. MediaWikiUtils.lua provides common utility functions, and MediaWikiMetadataProvider.lua defines the custom metadata containing e. g. the file description and additional categories and templates.

Libraries

LrMediaWiki contains a copy of JSON.lua written by Jeffrey Friedl and released under CC-by 3.0.

APIs

Beside Lightroom SDK, LrMediaWiki uses these APIs:

lrmediawiki's People

Contributors

hasenlaeufer avatar hasenlaeufer42 avatar robinkrahl avatar jeanfred avatar

Stargazers

 avatar Lopez Hugo avatar Nicolas Raoul avatar  avatar

Watchers

 avatar Clyde Brown avatar  avatar  avatar

lrmediawiki's Issues

Additional color code "Unchanged" on export needed

Version 1.7 introduced the new feature "Set color label on export #46".

Unfortunately there is one use case not covered: A user might not be interested in this feature. Even if he sets the color to "None" a prior set color code will be changed to "None".

In addition to the six color codes (Red, Yellow, Green, Blue, Purple and None) we need an option to let a set color code unchanged: "Unchanged".

Support servers without structured data

To support servers without structured data, the usage should be made configurable by an on/off-switch, for example at the settings dialog. The default should be "on" for usage by the most used server, Wikimedia Commons.

Make categories modular (like keywords)

It would be a huge improvement, if the categories field works like keywords, instead of a single string.
That way one could easily add (or remove) categories to multiple files at once.

Doesn't work with two-factor authentication

TFA is a bit of a pain to implement, as I know from personal experience, but as someone who is just getting started with Lightroom, it would be really great to export quickly and easily to Commons

Version check fails

The check of new available version(s) fails at version 0.5: If the user has the version check enabled at configuration dialog ("Check for new plugin versions after Lightroom starts"), the plugin incorrectly states a newer version would be available: "New version available: Please update to LrMediaWiki v0.4.1.".

Location template default should be "On"

The implementation of issue "Do not fill location template if "Remove Location Info" is checked #13" introduced a new check box. The default value is "Off". It should be "On" to achieve backward compatibility.

No way to work around 'was-deleted' upload error

I uploaded a file using LrMediaWiki, then realised I'd accidentally uploaded it with private exif data. So I deleted it on Commons, and tried to re-upload it. However, I get the message 'Upload failed: was-deleted (1)' - and there doesn't seem to be any way around this.

I'll upload the file again manually in this case, but it would be good to have an option to turn this off.

HTTP 504 error after upload

After each upload batch (even if the upload actually went through), I will get the following error message:
"Warnung
Export nicht möglich:
HTTP-Status 504 erhalten"

My System:

  • Lightroom Classic for Windows v9.4
  • Windows 10.0.19041

Set color label on export

An idea and implementation by Martin Kraft (@martinkraft):

The possibility to mark MediaWiki exported images with a color is very handy to keep track of which images are already in the Commons.

Debugging

Ich verweise einfach auf den Phabricator-Task: https://phabricator.wikimedia.org/T318350

Dort wünscht man, dass ich mich hier melde. Warum auch immer. Ich bin ein Anwender, der ein Problem hat. Offenbar erwartet man aber, dass ich die Lösung selbst liefere, statt dass man sich dort kümmert und evtl. hier selbst konkret schreibt, was man genau erwartet, statt das den Anwender machen zu lassen.

Feature: Update only

Ability to restrict an export to "update only"

  • When the filename does not exist -> Error
  • (optional) One update comment for all files (saves the current having to enter the info for every file, which pauses the upload)

Warnings: Deprecated MediaWiki API calls

Version 0.5. If logging is enabled (see configuration: "Enable logging"), the log file states deprecated MediaWiki API calls:

  • Fetching a token via action=login is deprecated. Use action=query&meta=tokens&type=login instead.
  • Main-account login via action=login is deprecated and may stop working without warning. To continue login with action=login, see [[Special:BotPasswords]]. To safely continue using main-account login, see action=clientlogin.
  • action=tokens has been deprecated. Please use action=query&meta=tokens instead.

To improve sustainability, deprecated API calls should be substituted by recommended calls.

MetaWikiMetadataSetAll.lua has no com.adobe.title

MetaWikiMetadataSetAll.lua has no com.adobe.title, which makes it difficult to set the filenames as it means always switching between the standard and the "LRMediaWiki - Alle Felder" settings.

Potentially there is a conflict with the "title" in the artwork subsection.

Current date as placeholder

See https://commons.wikimedia.org/wiki/Commons_talk:LrMediaWiki#Current_Date_in_Categories_on_Export

New placeholders (with example values) should be added:
<currentIsoDate> – 2021-01-09
<currentLongDate> – 9. Januar 2021 (format depends on local settings)
<currentMediumDate> – 09.01.2021 (format depends on local settings)
<currentShortDate> – 09.01.21 (format depends on local settings)
<currentYear> – 2021
<currentYearXX> – 21
<currentMonth> – 1
<currentMonthXX> – 01
<currentMonthName> – January
<currentDay> – 9
<currentDayXX> – 09
<currentDayName> – Saturday
<currentTime> – 20:22:15
<currentHour> – 20
<currentMinute> – 22
<currentSecond> – 15

LrMediaWiki still includes coordinates in the file page when 'Remove Location Info' is selected

When uploading a file with LrMediaWiki, you have the option to 'Remove Location Info' under 'Metadata'. However, after uploading, the file information page still includes the coordinates, even though they have been removed from the Exif. This can be a privacy concern.

Expected behaviour: if 'Remove Location Info' is selected, then no coordinates should be uploaded, either in the fire information or in the metadata.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.