Add the ability to export the selected images to the jAlbum application.
Created attachment 78061 [details]
Initial patch to create plugin
I get this error while applying this patch on the latest pulled version.
error: patch failed: CMakeLists.txt:432
error: CMakeLists.txt: patch does not apply
0001-Add-kipi-plugin-for-exporting-to-jAlbum.patch:92: new blank line at EOF.
I believe changes in CMakeLists.txt is the cause of the problem.
It would be better if you could post the jalbumexport plugin folder separately. It would make integration easier.
No problem here :
[gilles@localhost kipi-plugins]$ patch -p1 < 0001-Add-kipi-plugin-for-exporting-to-jAlbum.patch
patching file CMakeLists.txt
patching file jalbumexport/CMakeLists.txt
patching file jalbumexport/icons/CMakeLists.txt
patching file jalbumexport/jalbum.cpp
patching file jalbumexport/jalbum.h
patching file jalbumexport/jalbumconfig.cpp
patching file jalbumexport/jalbumconfig.h
patching file jalbumexport/jalbumwindow.cpp
patching file jalbumexport/jalbumwindow.h
patching file jalbumexport/kipiplugin_jalbumexport.desktop.cmake
patching file jalbumexport/kipiplugin_jalbumexportui.rc
patching file jalbumexport/plugin_jalbumexport.cpp
patching file jalbumexport/plugin_jalbumexport.h
[gilles@localhost kipi-plugins]$ pwd
[gilles@localhost kipi-plugins]$ ls
0001-Add-kipi-plugin-for-exporting-to-jAlbum.patch cmake/ dlnaexport/ gpssync/ ipodexport/ mediawiki/ picasawebexport/ removeredeyes/ videoslideshow/
acquireimages/ CMakeLists.txt dngconverter/ HACKING jalbumexport/ Messages.sh piwigoexport/ sendimages/ vkontakte/
advancedslideshow/ common/ expoblending/ htmlexport/ jpeglossless/ metadataedit/ printimages/ shwup/ wallpaper/
AUTHORS COPYING facebook/ imageshackexport/ kioexportimport/ NEWS project/ smug/ yandexfotki/
batchprocessimages/ COPYING-ADOBE flashexport/ imageviewer/ kipi-plugins.lsm.cmake panorama/ rajceexport/ tests/
calendar/ COPYING-CMAKE-SCRIPTS flickrexport/ imgurexport/ kmlexport/ photivointegration/ rawconverter/ timeadjust/
ChangeLog debianscreenshots/ galleryexport/ INSTALL kopete/ photolayoutseditor/ README TODO
And it compile fine too :
[gilles@localhost jalbumexport]$ pwd
[gilles@localhost jalbumexport]$ make
Scanning dependencies of target kipiplugin_jalbumexport_automoc
[ 0%] Built target kipiplugin_jalbumexport_automoc
[ 0%] Built target kexiv2_automoc
[ 16%] Built target kexiv2
[ 16%] Built target kipi_automoc
[ 33%] Built target kipi
[ 33%] Built target kdcraw_automoc
[ 66%] Built target libraw
[ 83%] Built target kdcraw
[ 83%] Built target kipiplugins_automoc
[100%] Built target kipiplugins
Scanning dependencies of target kipiplugin_jalbumexport
[100%] Building CXX object extra/kipi-plugins/jalbumexport/CMakeFiles/kipiplugin_jalbumexport.dir/kipiplugin_jalbumexport_automoc.cpp.o
[100%] Building CXX object extra/kipi-plugins/jalbumexport/CMakeFiles/kipiplugin_jalbumexport.dir/jalbum.cpp.o
[100%] Building CXX object extra/kipi-plugins/jalbumexport/CMakeFiles/kipiplugin_jalbumexport.dir/jalbumconfig.cpp.o
[100%] Building CXX object extra/kipi-plugins/jalbumexport/CMakeFiles/kipiplugin_jalbumexport.dir/jalbumwindow.cpp.o
[100%] Building CXX object extra/kipi-plugins/jalbumexport/CMakeFiles/kipiplugin_jalbumexport.dir/plugin_jalbumexport.cpp.o
Linking CXX shared module ../../../lib/kipiplugin_jalbumexport.so
[100%] Built target kipiplugin_jalbumexport
I am still working on this code to make it have correct default paths for Windows as well as Linux. I don't have access to a Mac so unless someone else can tell me what to use, the user will have to choose the correct paths in that case.
I will rebase the code when I have it ready and fix the extra newline in icons/CMakeLists.txt.
Gilles, Thank you, I got it working.[I patched in the wrong directory]
I couldn't find Export to jAlbum option in the Export menu. Is it yet to be added?
For OSX, just use the same way than Linux. After all, it's an UNIX system. As, i'm OSX user, i can check later if all is fine.
Anyway, look how ExpoBlending and Panorama do to check runtime dependencies as hugin command line tool. In internal libkipiplugins, there are widget and code dedicated to find command line programs on host computer, including right version.
Following release plan for 3.2.0 :
It still few weeks before final release, including a beta2.
Why not to push you code in git master and try to complete a first version suitable for this release ?
Note : I delegate to Gowtham the task to test your code and report problem here (he is a candidate for GoSC 2013). I personaly busy with Marcel to test huge code relevant of Face Recognition currently implemented by another student.
Git commit 04b37f7dbdde404bfe38030ec40e38c12f02a457 by Andrew Goodbody.
Committed on 14/04/2013 at 19:26.
Pushed by goodbody into branch 'master'.
Add kipi plugin for exporting to jAlbum
Create the minimal files for creating an album in jAlbum from the
selected images in digikam. The user must choose where to create
the directory for the album and the files are then created in
this directory. Finally jAlbum will be launched for the user
to make further alterations and actually create the album.
Requires a JVM and jAlbum both to be installed.
M +1 -0 CMakeLists.txt
M +2 -1 NEWS
A +27 -0 jalbumexport/CMakeLists.txt
A +1 -0 jalbumexport/icons/CMakeLists.txt
A +- -- jalbumexport/icons/hi16-action-jalbum.png
A +- -- jalbumexport/icons/hi24-action-jalbum.png
A +- -- jalbumexport/icons/hi32-action-jalbum.png
A +169 -0 jalbumexport/jalbum.cpp [License: GPL (v2+)]
A +62 -0 jalbumexport/jalbum.h [License: GPL (v2+)]
A +285 -0 jalbumexport/jalbumconfig.cpp [License: GPL (v2+)]
A +73 -0 jalbumexport/jalbumconfig.h [License: GPL (v2+)]
A +277 -0 jalbumexport/jalbumwindow.cpp [License: GPL (v2+)]
A +80 -0 jalbumexport/jalbumwindow.h [License: GPL (v2+)]
A +13 -0 jalbumexport/kipiplugin_jalbumexport.desktop.cmake
A +15 -0 jalbumexport/kipiplugin_jalbumexportui.rc
A +136 -0 jalbumexport/plugin_jalbumexport.cpp [License: GPL (v2+)]
A +66 -0 jalbumexport/plugin_jalbumexport.h [License: GPL (v2+)]
Thanks Gilles, I pushed to master as you suggested although I have not done the runtime dependency checks yet.
Gowtham, the entry should appear in the export menu already although I had problems making it appear. I am not sure what fixed it for me, maybe a complete uninstall of digikam and then re-install. Gilles, do you have any idea why this might be?
I will checkout code and take a look
your album is not listed in digiKam setup page about KIPI
I cannot see it in Export main menu. Are you sure that your tool is installed by cmake ?
Running kbuildsycoca4 fix the problem... Your plugin is loaded by digiKam properly now.
A quick test your plugin :
- Your tool is a sequence of dialog openned. Why not to use an assistant as with DLNAExport tool.
- In first dialog, you plug a button to select album to export. We have a dedicated widget to do it, including to export Tags or Labels virtual albums. Again look in DLNAExport tool for details.
- JAlbum tool binary detection. We have dedicated widget and tools to do it in libkipiplugins. Again, look in DLNAExport tool...
Is there something I need to do about kbuildsycoca4?
There are two dialogs in the plugin. The first that you see is only for setting some per user config values. This should only be seen once per user unless they want to change things.
I think there may be a terminology problem, the albums referenced are for the jAlbum albums, they are not the digikam albums. This plugin operates on pre-selected images in digikam, you select the images you want and then launch the plugin. I think it is by far the better way of working.
I will look at the runtime dependency checks as soon as I can find some time...
>Is there something I need to do about kbuildsycoca4?
No. It's just an internal KDE command to update .desktop cache list of files installed on the system (in this case)...
Created attachment 78937 [details]
I got to run it without running kbuildsycoca4.
I just ran sudo make install. I saw in your CMakeLists.txt that you install the .rc file to the //usr/share/kde4/apps/kipi/ . Removing that file causes the option to be disabled in the menu.
But just making it without installing it, doesn't copy the .rc file. That's why I didn't get the option the previous time.
The tool worked perfectly for me. First, it asked for my settings[to point out the path of jAlbum. and the album directory]. Once I set it and reopened digiKam, the settings were preserved.
However, the dialog containing export option could have better wording. Instead of "Album name", "jAlbum Album name to export to:" would be more appropriate.
Also, Instead of "New Album", "Export" would be better. The dialog should close after export operation is successfully completed.
Individual pictures have to be selected to export to jAlbum. Is it possible to export digiKam Album to jAlbum Album?
I have attached a screenshot. The left part is the jAlbum jar.
An empty album with the same name as that of the jAlbum's Album name is created in digiKam(visible in Screenshot). It is unnecessary.
(In reply to comment #18)
> An empty album with the same name as that of the jAlbum's Album name is
> created in digiKam(visible in Screenshot). It is unnecessary.
What you are seeing is the jAlbum album directory. This is where jAlbum stores all its information for the HTML album that it will create. You are seeing it in digikam because in the settings dialogue, you set the location where jAlbum will store its albums to be the same as the root of the collection in digikam. If you had left the jAlbum albums location as the default of ~/Documents/My Albums/ then you would not see this directory appear in digikam.
(In reply to comment #17)
I have changed the strings as you suggested.
No, there is no way to select a digikam album for export, you must select images. If you want all images in an album then use Ctrl+A to select all images.
I will look for a solution to close the dialogue after the export operation completes.
Does it have localization support? I have not found it in code. Please include if it is necessary.
What do you mean by localization support. i18n is implemented and exported to KDE translation teams. Do you mean a localization relevant of JAlbum feature ?
Ok. I thought translation was to be done by creator.
If these languages are supported by i18n, then its fine.
Update: Videos also get exported perfectly.
Why this file is not closed ? I miss something to do ?
There was a final change requested to close the dialogue after the export completes. I have not had the time to do this yet.
What's about this file ?
Still trying to find the time for two more tweaks to the code. One is to close the dialog automatically after the export is complete, any hints on how to do this would be welcome. The second is to add the runtime dependency check. I took a look at that this evening. As the main dependency is for a JAlbum.jar file that is not in a normally executable directory on Linux the KPBinaryIface code is not quite sufficient as there seems no way to say I need this file but that it needs a different method of invoking than simply launching it. Adding the directory to the search path should be OK but I don't see how to prefix the launched command with the necessary java executable and arguments.
Created attachment 103171 [details]
Port to Qt5 and fix final issue about close after export
Finally found some time for this
Created attachment 103476 [details]
Updated patch for port to KF5
Git commit 0d2080cee78829448f557e98b38680238eaecb1a by Maik Qualmann.
Committed on 20/01/2017 at 22:14.
Pushed by mqualmann into branch 'master'.
apply patch #103171 and #103476 from Andrew Goodbody to porting JAlbum to Qt5 and polish
M +1 -0 CMakeLists.txt
D +0 -33 PORT.KF5/UNFINALIZED/jalbumexport/CMakeLists.txt
D +0 -292 PORT.KF5/UNFINALIZED/jalbumexport/jalbumconfig.cpp
A +34 -0 jalbum/CMakeLists.txt
R +1 -1 jalbum/Messages.sh [from: PORT.KF5/UNFINALIZED/jalbumexport/Messages.sh - 087% similarity]
R +- -- jalbum/icons/16-apps-kipi-jalbum.png [from: PORT.KF5/UNFINALIZED/jalbumexport/icons/16-apps-kipi-jalbum.png - 100% similarity]
R +- -- jalbum/icons/24-apps-kipi-jalbum.png [from: PORT.KF5/UNFINALIZED/jalbumexport/icons/24-apps-kipi-jalbum.png - 100% similarity]
R +- -- jalbum/icons/32-apps-kipi-jalbum.png [from: PORT.KF5/UNFINALIZED/jalbumexport/icons/32-apps-kipi-jalbum.png - 100% similarity]
R +0 -0 jalbum/icons/CMakeLists.txt [from: PORT.KF5/UNFINALIZED/jalbumexport/icons/CMakeLists.txt - 100% similarity]
R +29 -37 jalbum/jalbum.cpp [from: PORT.KF5/UNFINALIZED/jalbumexport/jalbum.cpp - 066% similarity]
R +0 -3 jalbum/jalbum.h [from: PORT.KF5/UNFINALIZED/jalbumexport/jalbum.h - 098% similarity]
A +266 -0 jalbum/jalbumconfig.cpp [License: GPL (v2+)]
R +3 -7 jalbum/jalbumconfig.h [from: PORT.KF5/UNFINALIZED/jalbumexport/jalbumconfig.h - 093% similarity]
R +96 -86 jalbum/jalbumwindow.cpp [from: PORT.KF5/UNFINALIZED/jalbumexport/jalbumwindow.cpp - 061% similarity]
R +15 -10 jalbum/jalbumwindow.h [from: PORT.KF5/UNFINALIZED/jalbumexport/jalbumwindow.h - 083% similarity]
R +1 -1 jalbum/kipiplugin_jalbum.desktop.cmake.in [from: PORT.KF5/UNFINALIZED/jalbumexport/kipiplugin_jalbumexport.desktop.cmake.in - 098% similarity]
R +2 -2 jalbum/kipiplugin_jalbumui.rc [from: PORT.KF5/UNFINALIZED/jalbumexport/kipiplugin_jalbumexportui.rc - 071% similarity]
R +23 -24 jalbum/plugin_jalbum.cpp [from: PORT.KF5/UNFINALIZED/jalbumexport/plugin_jalbumexport.cpp - 073% similarity]
R +3 -3 jalbum/plugin_jalbum.h [from: PORT.KF5/UNFINALIZED/jalbumexport/plugin_jalbumexport.h - 093% similarity]