[Kde-imaging] [Bug 302755] New: Improve usability and fix bugs (patch)

Peter Potrowl peter017 at gmail.com
Fri Jun 29 17:24:01 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=302755

            Bug ID: 302755
          Severity: wishlist
               URL: https://www.mediawiki.org/wiki/User:Jean-Frédéric/digi
                    Kam
           Version: unspecified
          Priority: NOR
          Assignee: kde-imaging at kde.org
           Summary: Improve usability and fix bugs (patch)
    Classification: Unclassified
                OS: Linux
          Reporter: peter017 at gmail.com
          Hardware: Compiled Sources
            Status: UNCONFIRMED
         Component: MediaWiki
           Product: kipiplugins

Jean-Frédéric and I have tutored two students (Nathan and Iliya) who improved a
lot this KIPI plugin. I also participated in the coding.

Here is the description of what we have done, which is present in the attached
patch.

We add text fields so that the user can view and edit the metadata that will be
uploaded on the distant wiki: title, date, text description, categories,
latitude, longitude.

Those metadata are pre-filled with the information that digiKam possesses: file
name for title, EXIF date and time for date, title for text description, tags
for categories, geo-localization for latitude and longitude.

Those metadata can be edited field-by-field, image per image or by groups of
images. If one image is selected in the image list on the left, the
modifications will be applied to it. If several images are selected, the
modifications will be applied to all the selected images. Only the modified
fields are applied to the selected images: the fields that were not modified
stay different for each file, which is believed to be the most expected and
easy-to-use behavior.

In order to allow the modification of those metadata for each file, we store
them in a QMap, based on the file path.

The metadata are used to generate a wikitext that will be imported on the
distant wiki along with the image. This was already the case in the previous
version, but we corrected it: the wikitext syntax was incorrect (spaces at the
beginning of the lines, missing line breaks, incorrect position of the
categories):
http://test.wikipedia.org/w/index.php?title=File:Saint-Vallier-gare.jpg&diff=prev&oldid=127448
; also, the encoding was wrong:
http://commons.wikimedia.org/w/index.php?title=File:Fleur_de_la_Passion.jpg&curid=20037941&diff=73308538&oldid=73308378
; we set it to UTF-8 which is the default encoding on MediaWiki.

Instead of having the user type the URL of the API (api.php) of the distant
wiki (most of users don't even know this exist), we provide a prefilled list of
wikis. More experimented users can input their own api.php URL along with the
name of their wiki, to be added to the list.

For simplicity, we split the interface in two tabs: upload information and
configuration. The first contains the fields meant to view and edit the
metadata of each file. The second contains the information that is valid for
all the group of files: destination wiki, login form, license, resize option.

We fix a problem with space ("%20" instead of "_") in file names.
We fix the resizing of the image, which was not performed even when the
checkbox was checked.

Those changes are summed up (in French) in this page: [1]
The edited source code is hosted on GitHub: [2]
This code has been successfully compiled and tested by a few people (including
me). Some images have been successfully uploaded on Wikimedia Commons: [3]
A documentation will be written here: [4]
Screenshots of the current version can be seen here: [5]

[1] https://www.mediawiki.org/wiki/User:Jean-Frédéric/digiKam
[2] https://github.com/peter17/kipi-plugins
[3] http://commons.wikimedia.org/wiki/Category:Uploaded_with_KIPI_uploader
[4] http://commons.wikimedia.org/wiki/Commons:Tools/KIPI_uploader
[5] http://commons.wikimedia.org/wiki/Category:MediaWiki_KIPI_uploader

Known bugs:
* When the user selects more than one image on the left, the description and
categories fields are not updated on the right, whereas title, date, latitude
and longitude are. This is due to a limitation of KTextEdit and avoids a loss
of data (if we update those fields, textChanged() will be called and the
changed field will be applied to all the selected files even if not modified,
which is unexpected)
* The upload fails behind a proxy (bug #302598 reported on libmediawiki)
* The login and/or upload sometimes fails unexpectedly. This was already the
case with the previous version.
* The login/error messages are poorly detailed, which does not help to
understand the previous point.
* The presence of a file with the same name or same SHA1 on the distant wiki is
not yet tested.

I intend to work on some of the above points in a not-to-far future, but I
would like the current improvements be merged before.

So, we are asking that this code should be merged into kipi-plugins trunk.

Thanks in advance

Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kde-imaging mailing list