External tools

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

External tools

kinnalru@gmail.com
Hello

I want to implement "External tools" feature(as in kate was), and I already take look at digikam software compillation.
Feature must allow to use custom script(external) to operate with image lists. For examplt to create solid archive with currently selected images.
As see it is a 3 ways to implement such feature:
1. as batch tool

advantages: 

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
Hello

I want to implement "External tools" feature(as in kate was), and I already take look at digikam software compillation sources.
Feature must allow to use custom script(external) to operate with image files. For examplt to create solid archive file with currently selected images.
As see it is a 3 ways to implement such feature:
1. as batch tool
advantages:
 - easy to implement(simple BatchTool API - inherit BatchTool class and implement toolOperation as for example croptool does)
 - settings and settingswidget factory out of the box
disadvatages:
 - is it possible to embed batch tool to context menu (right mouse click)?

2. as kipi plugin
advantages:
 - settings and settingswidget factory out of the box
 - context menu integration out of the box
disadvatages:
 - little more complex kipi plugins API 
 - breaking semantics(as I think) of "image manipulation"... is for example 'creating archive' appear to be 'image manipulation'?

3. directrly embed to context menu like "open with" and other actions
advantages:
 - i don't know
disadvatages:
 - i don't know how to implement

What do you think about this?
Sorry for my english.


2013/10/25 Yuri Samoilenko <[hidden email]>
Hello

I want to implement "External tools" feature(as in kate was), and I already take look at digikam software compillation.
Feature must allow to use custom script(external) to operate with image lists. For examplt to create solid archive with currently selected images.
As see it is a 3 ways to implement such feature:
1. as batch tool

advantages: 


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4



2013/10/25 Yuri Samoilenko <[hidden email]>
Hello

I want to implement "External tools" feature(as in kate was), and I already take look at digikam software compillation sources.
Feature must allow to use custom script(external) to operate with image files. For examplt to create solid archive file with currently selected images.
As see it is a 3 ways to implement such feature:
1. as batch tool
advantages:
 - easy to implement(simple BatchTool API - inherit BatchTool class and implement toolOperation as for example croptool does)
 - settings and settingswidget factory out of the box
disadvatages:
 - is it possible to embed batch tool to context menu (right mouse click)?

2. as kipi plugin
advantages:
 - settings and settingswidget factory out of the box
 - context menu integration out of the box
disadvatages:
 - little more complex kipi plugins API 
 - breaking semantics(as I think) of "image manipulation"... is for example 'creating archive' appear to be 'image manipulation'?

3. directrly embed to context menu like "open with" and other actions
advantages:
 - i don't know
disadvatages:
 - i don't know how to implement

What do you think about this?

None of these 3 solutions are the best.

A BQM tool is problematic. If you take a look, you will see that all tool workflow use Digikam::DImg container to process images. A BQM tool is to process one items, not more than one at the same time (to make tarball for ex).

A kipi-plugins is problematic because it's a stand alone operation, where you want to do it and end of BQM workflow. Typically Batch operation from kipi-plugins migrate to digiKam BQM, because all can be serialized in one workflow, ans saved to be reprocessed later. You cannot do it with kipi-plugins.

With kipi, we have this problem with all export tools which are a stand alone processing in a dedicated dialog.

A solution can be to export kipi tool settings + core operations to kipi host application, but this need to change a lots libkipi API and patch whole plugins. Typically, a student have been planed to work a ths project with GSoC, but he have found a real job and project have been canceled. See details here :


The KDE service way is too... limited and cannot be serialized in BQM.

My proposal is more simplest : In BQM, patch Queue "Target" settings to include new options to perform "export features". This can include tarball processing, export to a remote computer, export to a web service, etc..

Best

Gilles Caulier

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com

Please correct me if i make a mistake.
BQM processing files as pipeline(one tool applied on result of another) but on each file separately, not on whole image group.
The best sollution will be to implement group processing into BQM engine(into batchTool) to allow tool operate on whole file group. And to export KIPI export plugins as such batch tools. Right?


2013/10/26 Gilles Caulier <[hidden email]>

With kipi, we have this problem with all export tools which are a stand alone processing in a dedicated dialog.

A solution can be to export kipi tool settings + core operations to kipi host application, but this need to change a lots libkipi API and patch whole plugins. Typically, a student have been planed to work a ths project with GSoC, but he have found a real job and project have been canceled. See details here :


The KDE service way is too... limited and cannot be serialized in BQM.

My proposal is more simplest : In BQM, patch Queue "Target" settings to include new options to perform "export features". This can include tarball processing, export to a remote computer, export to a web service, etc..


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
2013/10/26 Yuri Samoilenko <[hidden email]>:
>
> Please correct me if i make a mistake.
> BQM processing files as pipeline(one tool applied on result of another)

yes.

> but
> on each file separately

yes, and in parallel.

>, not on whole image group.

yes.


> The best sollution will be to implement group processing into BQM
> engine(into batchTool) to allow tool operate on whole file group.

This is typically what's i explained previously in my mail, to add
something in Queue settings. Sure it's not too many flexible as
current batch tool mechanism, that can be set as you need in a tool
list.


> And to
> export KIPI export plugins as such batch tools. Right?

No.

To big plan is to be create a framework in libkipi to be able to plug
some parts from kipi tool to BQM make group processing. The idea is to
re-use some kipi tools implementation like this (web export tool for
ex). But it's a very complex and long task. There is a lot of code to
touch.

Giles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
Hello.

Nonetheless i have already implemented "External Tools" export plugin for KIPI :) . I have no experience in contributing to KDE software yet.
Please tell me where to start if I want my plugin to be embedded into official kipi sources.


2013/10/28 Gilles Caulier <[hidden email]>
To big plan is to be create a framework in libkipi to be able to plug
some parts from kipi tool to BQM make group processing. The idea is to
re-use some kipi tools implementation like this (web export tool for
ex). But it's a very complex and long task. There is a lot of code to
touch.

Giles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
2013/10/28 Yuri Samoilenko <[hidden email]>:
> Hello.
>
> Nonetheless i have already implemented "External Tools" export plugin for
> KIPI :) . I have no experience in contributing to KDE software yet.
> Please tell me where to start if I want my plugin to be embedded into
> official kipi sources.

Kipi source repository is located in KDE server using Git versioning framework :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository

But why no to plug core core of you tool in BQM core. This will be
more powerful...

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
As you can see in bugzilla, this feature already exist as high
priority BQM request :

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

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

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

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

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

Gilles Caulier

2013/10/28 Gilles Caulier <[hidden email]>:

> 2013/10/28 Yuri Samoilenko <[hidden email]>:
>> Hello.
>>
>> Nonetheless i have already implemented "External Tools" export plugin for
>> KIPI :) . I have no experience in contributing to KDE software yet.
>> Please tell me where to start if I want my plugin to be embedded into
>> official kipi sources.
>
> Kipi source repository is located in KDE server using Git versioning framework :
>
> https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository
>
> But why no to plug core core of you tool in BQM core. This will be
> more powerful...
>
> Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
In reply to this post by Gilles Caulier-4

2013/10/28 Gilles Caulier <[hidden email]>

But why no to plug core core of you tool in BQM core. This will be
more powerful...

Sorry for my misunderstanding, but BQM does not allow to process list of file, in opposite KIPI export API allow to it very simple...

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
2013/10/28 Yuri Samoilenko <[hidden email]>:

>
> 2013/10/28 Gilles Caulier <[hidden email]>
>>
>>
>> But why no to plug core core of you tool in BQM core. This will be
>> more powerful...
>
>
> Sorry for my misunderstanding, but BQM does not allow to process list of
> file, in opposite KIPI export API allow to it very simple...

Of course (:=))) BQM allow to process lists of files (queues), and in
parallel (kipi cannot do), else there is no interest of BQM...

In opposite of KIPI, BQM has all tool in one interface. With KIPI, you
need to start one tool, wait end of process, and start another tool,
wait end, etc...

Definitively, BQM is the future for batch processing, not KIPI.

The only interest of KIPI currently is web export tools that doesn't
exists in BQM.

Gilles Caulier

>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com

And so...

1. Can I start working on implementing "External Tools" AND possibility pass list of images(files) into bach tool at once (for example for creating archive) an hope my work to be included in official repo?
2. It is possible to include already implemented kipi-plugin into official tree or creating new plugins in kipi frozen?



2013/10/28 Gilles Caulier <[hidden email]>
Definitively, BQM is the future for batch processing, not KIPI.

The only interest of KIPI currently is web export tools that doesn't
exists in BQM.


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
2013/10/28 Yuri Samoilenko <[hidden email]>:
>
> And so...
>
> 1. Can I start working on implementing "External Tools" AND possibility pass
> list of images(files) into bach tool at once (for example for creating
> archive) an hope my work to be included in official repo?

As i said previously, i would to see "BQM external tools" appears in
Queue settings view, in a new section after "Raw Decoding".

In this view, user can choose between multiple way, as make a tarball,
or build a LibreOffice sildeshow for ex...

For export stuff, the best way is to patch "Target" view which
currently copy target items in a local collection registered by
digiKam DB.


> 2. It is possible to include already implemented kipi-plugin into official
> tree or creating new plugins in kipi frozen?

KIPI is not Frozen, but i would to see you code before.

Which features are implemented currently ?

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com


2013/10/28 Gilles Caulier <[hidden email]>

Which features are implemented currently ?

1. kipi export plugin: http://paste.opensuse.org/63691711 
2. managing tools(add/remove)
3. selecting interpretter for tool (bash, ruby...)
4. writing script body
6. show in context menu and hotkey: http://paste.opensuse.org/39462024
8. executing by hotkey without asking 

PS:  Partially localization provided by i18n()

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
Hum,

I want to see the code.

Please make me a tarball with your tool implementation, ready to
compile and test...

Gilles Caulier

2013/10/28 Yuri Samoilenko <[hidden email]>:

>
>
> 2013/10/28 Gilles Caulier <[hidden email]>
>>
>>
>> Which features are implemented currently ?
>>
> 1. kipi export plugin: http://paste.opensuse.org/63691711
> 2. managing tools(add/remove)
> 3. selecting interpretter for tool (bash, ruby...)
> 4. writing script body
> 5. executing http://paste.opensuse.org/54340769
> 6. show in context menu and hotkey: http://paste.opensuse.org/39462024
> 7. http://paste.opensuse.org/76739106
> 8. executing by hotkey without asking
>
> PS:  Partially localization provided by i18n()
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
Here is tarball with full sources.
1. Unpack it into kipi-plugins source tree
2. add ADD_SUBDIRECTORY(externaltools) directive to kipi-plugins/CMakeLists.txt
3. mkdir -p build && cd build && cmake ../ && make

I dont know how to install plugin only for user, i'am link plugin to system instead:
1. link build/lib/kipiplugin_externaltools.so -> /usr/lib/kde4
2. link build/externaltools/kipiplugin_externaltools.desktop -> ~/.local/share/applications

Please tell me if you know how to develop/debug plugin more easly

2013/10/29 Gilles Caulier <[hidden email]>
I want to see the code.

Please make me a tarball with your tool implementation, ready to
compile and test...

Gilles Caulier


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

externaltools.tar.gz (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
In reply to this post by Gilles Caulier-4
Oops, i have remove TheMainRun function during code cleaning before show sorry :)
This is fixed and tested sources.


2013/10/29 Gilles Caulier <[hidden email]>
Hum,

I want to see the code.

Please make me a tarball with your tool implementation, ready to
compile and test...

Gilles Caulier

2013/10/28 Yuri Samoilenko <[hidden email]>:
>
>
> 2013/10/28 Gilles Caulier <[hidden email]>
>>
>>
>> Which features are implemented currently ?
>>
> 1. kipi export plugin: http://paste.opensuse.org/63691711
> 2. managing tools(add/remove)
> 3. selecting interpretter for tool (bash, ruby...)
> 4. writing script body
> 5. executing http://paste.opensuse.org/54340769
> 6. show in context menu and hotkey: http://paste.opensuse.org/39462024
> 7. http://paste.opensuse.org/76739106
> 8. executing by hotkey without asking
>
> PS:  Partially localization provided by i18n()
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

externaltools.tar.gz (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
Ok, i take a look about your source code this week end and i give you
a feedback (i'm busy this evening and all tomorrow with my
family...sorry)

I will also take a look about your BQM review.

Best

Gilles Caulier

2013/10/30 Yuri Samoilenko <[hidden email]>:

> Oops, i have remove TheMainRun function during code cleaning before show
> sorry :)
> This is fixed and tested sources.
>
>
> 2013/10/29 Gilles Caulier <[hidden email]>
>>
>> Hum,
>>
>> I want to see the code.
>>
>> Please make me a tarball with your tool implementation, ready to
>> compile and test...
>>
>> Gilles Caulier
>>
>> 2013/10/28 Yuri Samoilenko <[hidden email]>:
>> >
>> >
>> > 2013/10/28 Gilles Caulier <[hidden email]>
>> >>
>> >>
>> >> Which features are implemented currently ?
>> >>
>> > 1. kipi export plugin: http://paste.opensuse.org/63691711
>> > 2. managing tools(add/remove)
>> > 3. selecting interpretter for tool (bash, ruby...)
>> > 4. writing script body
>> > 5. executing http://paste.opensuse.org/54340769
>> > 6. show in context menu and hotkey: http://paste.opensuse.org/39462024
>> > 7. http://paste.opensuse.org/76739106
>> > 8. executing by hotkey without asking
>> >
>> > PS:  Partially localization provided by i18n()
>> >
>> > _______________________________________________
>> > Digikam-devel mailing list
>> > [hidden email]
>> > https://mail.kde.org/mailman/listinfo/digikam-devel
>> >
>> _______________________________________________
>> Digikam-devel mailing list
>> [hidden email]
>> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
Yes it will great!


2013/10/31 Gilles Caulier <[hidden email]>
Ok, i take a look about your source code this week end and i give you
a feedback (i'm busy this evening and all tomorrow with my
family...sorry)

I will also take a look about your BQM review.

Best

Gilles Caulier

2013/10/30 Yuri Samoilenko <[hidden email]>:
> Oops, i have remove TheMainRun function during code cleaning before show
> sorry :)
> This is fixed and tested sources.
>
>
> 2013/10/29 Gilles Caulier <[hidden email]>
>>
>> Hum,
>>
>> I want to see the code.
>>
>> Please make me a tarball with your tool implementation, ready to
>> compile and test...
>>
>> Gilles Caulier
>>
>> 2013/10/28 Yuri Samoilenko <[hidden email]>:
>> >
>> >
>> > 2013/10/28 Gilles Caulier <[hidden email]>
>> >>
>> >>
>> >> Which features are implemented currently ?
>> >>
>> > 1. kipi export plugin: http://paste.opensuse.org/63691711
>> > 2. managing tools(add/remove)
>> > 3. selecting interpretter for tool (bash, ruby...)
>> > 4. writing script body
>> > 5. executing http://paste.opensuse.org/54340769
>> > 6. show in context menu and hotkey: http://paste.opensuse.org/39462024
>> > 7. http://paste.opensuse.org/76739106
>> > 8. executing by hotkey without asking
>> >
>> > PS:  Partially localization provided by i18n()
>> >
>> > _______________________________________________
>> > Digikam-devel mailing list
>> > [hidden email]
>> > https://mail.kde.org/mailman/listinfo/digikam-devel
>> >
>> _______________________________________________
>> Digikam-devel mailing list
>> [hidden email]
>> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

kinnalru@gmail.com
In reply to this post by Gilles Caulier-4
I have removed all extra code not related to BQM and renamed visible text to "Post-processing".
Also I have made some tests and all features seems to be working.

Is Digikam has translations to other languages? I'am familiar with Qt translation engine and tools, but I can't find something similar to translation po/mo files or script to generate/update translations. 

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: External tools

Gilles Caulier-4
Sorry for my delay, i'm a little bit busy currently...

2013/12/9 Yuri Samoilenko <[hidden email]>:
> I have removed all extra code not related to BQM and renamed visible text to
> "Post-processing".
> Also I have made some tests and all features seems to be working.
>

Ok. When time permit i will check your implementation.

> Is Digikam has translations to other languages? I'am familiar with Qt
> translation engine and tools, but I can't find something similar to
> translation po/mo files or script to generate/update translations.

We use KDE translations wrapper over Qt translations. All strings are
embeded with i18n("")

digiKam is trnaslated by KDE team to more than 40 languages. Strings
are extracted automatically to po files by scripts running on KDE
servers.

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel