Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy dtMediaWiki v44 from trougnouf/dtMediaWiki #181

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

trougnouf
Copy link

dtMediaWiki adds Wikimedia Commons as a target storage. Latest documentation on https://commons.wikimedia.org/wiki/Commons:DtMediaWiki

@wpferguson
Copy link
Member

@supertobi I think @trougnouf has just triggered the next step(s) in the evolution of the lua-scripts repository. Here's what I think needs addressed:

  1. luarocks dependency. Currently we have one script that has a requirement for an external library and we've just kind of ignored it and left it up to the user to resolve. I've avoided using external lua dependencies because I could and I didn't want to figure it out at the time. I think the time has come to address it.

  2. script documentation. Currently we don't really have a good method of addressing script documentation. I rip the beginning comments from the scripts to use in the tooltips for script_manager, but that's the only script documentation that's available. Perhaps markdown formatted files in a doc directory?

  3. scripts in subdirectories. I'm currently working on the plugin API, which envisions each plugin in it's own directory. However, the plugin API is nowhere close to ready. A script in a subdirectory will probably break script_manager at the worst, or at the best it will just get ignored. One solution is to split this up and put the README.md in a doc directory, the MediaWikiAPI.lua in the lib directory, and dtMediaWiki.lua in the contrib directory. Or, I can change script manager to correctly handle scripts in subdirectories. I guess the real question is what do we want the repository tree to look like?

I propose opening issues for each of the above so that we can address them in their own thread.

@trougnouf could you point us at a page that has been populated using this script so that we can see what the output looks like? Thanks

@trougnouf
Copy link
Author

@wpferguson All files uploaded with the plugin are added to Uploaded_with_dtMediaWiki. File:SNCB_978_leaving_the_Ronet_classification_yard_(DSCF5536).jpg probably uses the latest revision (and makes uses the "other versions" feature).

@supertobi
Copy link
Contributor

  1. I'm not a really big fan of all the script repositories (luarocks, CPAN, note.js, ...) not managed from the standard system way to install software. On the other hand it brings a lot of power and we should not block them.
  2. Subfolder or document folder?
    I like subfolders more. Have you tested it with your script manager?

local dt = require "darktable"
local MediaWikiApi = require "contrib/dtMediaWiki/lib/mediawikiapi"
local version = 47

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translation would be nice. examples/gettextExample.lua shows how

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, but it might take a little while because I currently spend my free time getting a boat/radio/motorcycle license.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wpferguson done :-)

Copy link
Author

@trougnouf trougnouf Jan 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this crashes with unprotected error in call to Lua API when I use the "_" function inside one of the functions registered in the dt.register_storage function, namely register_storage_initialize and register_storage_finalize (although adding a print(_()) statement in register_storage_supported is an easy way to test).
Any idea what went wrong?

In the meantime I've worked around it by typing out the content of the function (gettext.dgettext("dtMediaWiki", AMESSAGE)) every time it's needed inside a register_storage function.

@wpferguson wpferguson closed this Mar 29, 2024
@trougnouf
Copy link
Author

Any feedback as to why this was rejected?

@wpferguson
Copy link
Member

Any feedback as to why this was rejected?

It had the label waiting for feedback and it had been almost 4 years so I assumed that you had lost interest (and I finally got around to some house cleaning). Now that I opened it, I see where you pushed some commits, so my bad for assuming.

I'll reopen it and we'll see if we can get it finished.

@wpferguson wpferguson reopened this Mar 29, 2024
commit 8a317078f6ca18767d90cab1786839d4d855b314 (HEAD -> master, origin/master, origin/HEAD)
Author: Trougnouf (Benoit Brummer) <[email protected]>
Date:   Sat Dec 2 02:20:45 2023 +0100

    fix fmt_flt for non-decimal trailing zeroes

commit ffcc5d9ec79e0a34ee836326e78d6f520fae15e5
Author: Trougnouf (Benoit Brummer) <[email protected]>
Date:   Sat Dec 2 00:10:35 2023 +0100

    fix camera categorization on non-US locale, add \comma workaround in categories

commit 40451425f786a5ffbc5ef7883f169e5b0cc445c5
Author: trougnouf (Benoit Brummer) <[email protected]>
Date:   Tue Aug 3 14:27:27 2021 +0200

    dtMediaWiki.lua: rm lint

commit 1949e76639a331f59d673a8570e701ae48ddd5c9
Author: trougnouf (Benoit Brummer) <[email protected]>
Date:   Tue Aug 3 14:18:55 2021 +0200

    dtMediaWiki.lua: workarounds for dt bug #9715

commit 25a9f8367ce94b129a3b6ebea0e106faadc155bc
Author: trougnouf (Benoit Brummer) <[email protected]>
Date:   Mon Mar 22 19:08:19 2021 +0100

    substitute_keywords: parse

commit 88373c8cb27b35da53c60238f9842df93fbaf997
Author: trougnouf (Benoit Brummer) <[email protected]>
Date:   Wed Feb 10 18:41:49 2021 +0100

    dtMediaWiki.get_alt_images: add debug info

commit 7c2a2c79e96c4ef3838eb6127ff4576996d9e337
Author: trougnouf (Benoit Brummer) <[email protected]>
Date:   Mon Jan 25 16:38:54 2021 +0100

    fix Localisation template with locales using comma decimal separator
@trougnouf
Copy link
Author

trougnouf commented Mar 29, 2024

Any feedback as to why this was rejected?

It had the label waiting for feedback and it had been almost 4 years so I assumed that you had lost interest (and I finally got around to some house cleaning). Now that I opened it, I see where you pushed some commits, so my bad for assuming.

I'll reopen it and we'll see if we can get it finished.

I think I addressed everything I can at the time.

I just pushed an update to the latest commit from my repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants