D17500: Restore mobipocket extractor

2019-04-09 Thread Alexander Stippich
astippich updated this revision to Diff 55848.
astippich added a comment.


  - rebase and update
  - update test
  - disable mobi extractor

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17500?vs=47335=55848

BRANCH
  mobi

REVISION DETAIL
  https://phabricator.kde.org/D17500

AFFECTED FILES
  CMakeLists.txt
  autotests/CMakeLists.txt
  autotests/mobiextractortest.cpp
  autotests/samplefiles/test.mobi
  src/extractors/CMakeLists.txt
  src/extractors/mobiextractor.cpp

To: astippich, bruns
Cc: ltoscano, mgallien, aacid, kde-frameworks-devel, #baloo, gennad, domson, 
ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2019-01-04 Thread Alexander Stippich
astippich planned changes to this revision.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: ltoscano, mgallien, aacid, kde-frameworks-devel, #baloo, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-16 Thread Albert Astals Cid
aacid added a comment.


  I would really like the module to be in the mobipocket repo, would serve as 
actual proof the extractors outside the main module work if we have an example 
of it :)

INLINE COMMENTS

> FindQMobipocket.cmake:1
> +# - Find QMobipocket
> +# Find the Qmobipocket library.

This is wrong, mobipocket installs its own cmake files so you don't need a find 
module.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: ltoscano, mgallien, aacid, kde-frameworks-devel, #baloo, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-14 Thread Luigi Toscano
ltoscano added a comment.


  In D17500#376854 , @astippich 
wrote:
  
  > In D17500#376221 , @aacid wrote:
  >
  > > In D17500#375753 , @astippich 
wrote:
  > >
  > > > Oh, thanks for the hint, didn't know that. That makes it a lot more 
complicated than a straight port :(
  > > >  Looking at the code of kdegraphics-mobipocket, shouldn't the thumbnail 
extractor actually be part of kio-extras? Seems quite KIO-specific, and a quick 
look at lxr didn't reveal any usages of the thumbnailer.
  > >
  > >
  > > Why would it be part of kio-extras? the beauty of plugins is that they 
can live wherever, no?
  >
  >
  > My thinking here was that a lot of other thumbnailers are located in 
kio-extras. Moving the thumbnailer there too would lift the KIO dependency and 
make qmobipocket easier to deploy and to be used by others.
  
  
  Just a note about this: kio-extras was not meant to be a collector of all 
possible kios. It's becaming as such, but if this continues we may end up 
revisiting it and splitting it.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: ltoscano, mgallien, aacid, kde-frameworks-devel, #baloo, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-14 Thread Alexander Stippich
astippich added a comment.


  In D17500#376221 , @aacid wrote:
  
  > In D17500#375753 , @astippich 
wrote:
  >
  > > Oh, thanks for the hint, didn't know that. That makes it a lot more 
complicated than a straight port :(
  > >  Looking at the code of kdegraphics-mobipocket, shouldn't the thumbnail 
extractor actually be part of kio-extras? Seems quite KIO-specific, and a quick 
look at lxr didn't reveal any usages of the thumbnailer.
  >
  >
  > Why would it be part of kio-extras? the beauty of plugins is that they can 
live wherever, no?
  
  
  My thinking here was that a lot of other thumbnailers are located in 
kio-extras. Moving the thumbnailer there too would lift the KIO dependency and 
make qmobipocket easier to deploy and to be used by others.
  
  > Do I understand that the answer to my "Is it possible to move the extractor 
to kdegraphics-mobipocket instead of having it in kfilemetadata? " question is 
no?
  > 
  > If so, that probably needs fixing, the fact that you can't have external 
plugins means that the code is probably not as good as it should
  
  No, the answer was I don't know :) But as @mgallien and @bruns stated, it's 
possible. But I lack the time and motivation to work on this.
  
  But honestly, I'm not super interested in this, I don't have any mobipocket 
files. I just saw that this code lay there disabled for years, and thought it 
would be easy to enable, which it isn't.
  Would you be fine if I disable the mobiextractor like before, and merge the 
changes anyways? This way, it does at least compile and runs if someone enables 
it in cmake.
  Otherwise I will abandon this revision.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: mgallien, aacid, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-13 Thread Stefan BrĂ¼ns
bruns added a comment.


  In D17500#376324 , @mgallien wrote:
  
  > In D17500#376221 , @aacid wrote:
  >
  > > Do I understand that the answer to my "Is it possible to move the 
extractor to kdegraphics-mobipocket instead of having it in kfilemetadata? " 
question is no?
  >
  >
  > There is support for external extractors in KFileMetaData. As far as I 
know, it has not yeet been used.
  >  That is probably the safest way to do what you suggest.
  
  
  KFM supports two kinds of extractors, one QPlugin based, and one using 
external processes.
  
  The first one uses the interface defined **and exported** in 
kfilemetadata/extractor.h. Although it is AFAIK currently only used by by the 
extractors bundled in KFM, it can be used by any other Framework or Application.
  
  The second one uses Json over pipes to communicate with a forked process. The 
only available documentation is the sourcecode, i.e. `externalextractor.cpp`. 
It has more overhead (serializing/deserializing json data), but can be used 
where incompatible licenses would forbid linking with KFM.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: mgallien, aacid, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-12 Thread Matthieu Gallien
mgallien added a comment.


  In D17500#376221 , @aacid wrote:
  
  > In D17500#375753 , @astippich 
wrote:
  >
  > > Oh, thanks for the hint, didn't know that. That makes it a lot more 
complicated than a straight port :(
  > >  Looking at the code of kdegraphics-mobipocket, shouldn't the thumbnail 
extractor actually be part of kio-extras? Seems quite kio-specific, and a quick 
look at lxr didn't reveal any usages of the thumbnailer.
  >
  >
  > Why would it be part of kio-extras? the beauty of plugins is that they can 
live wherever, no?
  >
  > Do I understand that the answer to my "Is it possible to move the extractor 
to kdegraphics-mobipocket instead of having it in kfilemetadata? " question is 
no?
  
  
  There is support for external extractors in KFileMetaData. As far as I know, 
it has not yeet been used.
  That is probably the safest way to do what you suggest.
  
  > If so, that probably needs fixing, the fact that you can't have external 
plugins means that the code is probably not as good as it should

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: mgallien, aacid, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-12 Thread Albert Astals Cid
aacid added a comment.


  In D17500#375753 , @astippich 
wrote:
  
  > Oh, thanks for the hint, didn't know that. That makes it a lot more 
complicated than a straight port :(
  >  Looking at the code of kdegraphics-mobipocket, shouldn't the thumbnail 
extractor actually be part of kio-extras? Seems quite kio-specific, and a quick 
look at lxr didn't reveal any usages of the thumbnailer.
  
  
  Why would it be part of kio-extras? the beauty of plugins is that they can 
live wherever, no?
  
  Do I understand that the answer to my "Is it possible to move the extractor 
to kdegraphics-mobipocket instead of having it in kfilemetadata? " question is 
no?
  
  If so, that probably needs fixing, the fact that you can't have external 
plugins means that the code is probably not as good as it should

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: aacid, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-12 Thread Alexander Stippich
astippich added a comment.


  Oh, thanks for the hint, didn't know that. That makes it a lot more 
complicated than a straight port :(
  Looking at the code of kdegraphics-mobipocket, shouldn't the thumbnail 
extractor actually be part of kio-extras? Seems quite kio-specific, and a quick 
look at lxr didn't reveal any usages of the thumbnailer.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: aacid, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-11 Thread Albert Astals Cid
aacid added a comment.


  I'm afraid this could be a bit of a dependency loop since 
kdegraphics-mobipocket has a thumbnailer that depends on kio which is a tier 3 
framework while kfilemetadata is a tier2 framework.
  
  Is it possible to move the extractor to kdegraphics-mobipocket instead of 
having it in kfilemetadata? or does it depend on non installed include files?

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: aacid, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-11 Thread Alexander Stippich
astippich updated this revision to Diff 47335.
astippich added a comment.


  - add missing test file

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17500?vs=47334=47335

BRANCH
  mobi

REVISION DETAIL
  https://phabricator.kde.org/D17500

AFFECTED FILES
  CMakeLists.txt
  autotests/mobiextractortest.cpp
  autotests/samplefiles/test.mobi
  cmake/FindQMobipocket.cmake
  src/extractors/mobiextractor.cpp

To: astippich, bruns
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-11 Thread Alexander Stippich
astippich added a comment.


  I was unable to get a version check running with cmake, any help is 
appreciated

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-11 Thread Alexander Stippich
astippich edited the summary of this revision.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D17500

To: astippich, bruns
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D17500: Restore mobipocket extractor

2018-12-11 Thread Alexander Stippich
astippich created this revision.
astippich added a reviewer: bruns.
Herald added projects: Frameworks, Baloo.
Herald added subscribers: Baloo, kde-frameworks-devel.
astippich requested review of this revision.

REVISION SUMMARY
  Restore the mobipocket extractor based
  on the QMobipocket library, which was
  apparently dormant since the KF5 transition. 
  Adjust existing code where needed and fix tests.

REPOSITORY
  R286 KFileMetaData

BRANCH
  mobi

REVISION DETAIL
  https://phabricator.kde.org/D17500

AFFECTED FILES
  CMakeLists.txt
  autotests/mobiextractortest.cpp
  cmake/FindQMobipocket.cmake
  src/extractors/mobiextractor.cpp

To: astippich, bruns
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams