OCRmyPDF icon indicating copy to clipboard operation
OCRmyPDF copied to clipboard

[Feature]: Flatpak support + Flathub

Open PunkPangolin opened this issue 1 year ago • 10 comments

Describe the proposed feature

I made a manifest to build OCRmyPDF as a flatpak (see here). I would like to get it accepted on FlatHub (although I am not sure how exactly they deal with CLI applications).

Would you be okay with that (FlatHub actually requires contacting upstream on that)? And would you like to take part as a maintainer?

For the metainfo.xml file, I took the data from pyproject.toml and used author id=io.github.jbarlow83, is that fine for you, or would you prefer something like OCRmyPDF Developers?

I don't know if you are familiar with flatpak packaging and/or FlatHub, please have no hesitation to ask any questions.

PunkPangolin avatar Jan 15 '25 15:01 PunkPangolin

Yes, if you are able to do this I would much appreciate it.

Use ocrmypdf.io or io.ocrmypdf for a domain name or reverse domain name. I own that domain, although it's not doing anything and I don't have an email tied to that. OCRmyPDF Developers works fine as well.

jbarlow83 avatar Jan 15 '25 17:01 jbarlow83

Thank you for the prompt response! I am glad I can finally do something to support OCRmyPDF.

Then I would use io.ocrmypdf.ocrmypdf as application ID and io.ocrmypdf as author ID according to FlatHub guidelines ({tld}.{vendor}.{product}). As the website is not used for anything, this might require some kind of verification in the admission process.

FlatHub would also prefer the metainfo.xml file to be part of upstream. Would that work for you? Besides adding new releases in, this should not result in any additional work.

Finally, would you like to be added as a maintainer?

PunkPangolin avatar Jan 15 '25 18:01 PunkPangolin

I can be maintainer, but would you be willing to also be listed as a maintainer?

Put any changes you need in a PR.

I can make io.ocrmypdf redirect to the github page, or does it need a landing page of some sort?

jbarlow83 avatar Jan 15 '25 19:01 jbarlow83

Yes, I am also willing to be listed as a maintainer and would be happy to assist the project in this way.

I think the only helpful upstream change would be the metainfo file, for which I made a PR for in #1462

Linking ocrmypdf.io to the GitHub page should be enough to get it accepted, for verification there maybe have to be a token placed (see documentation).

PunkPangolin avatar Jan 15 '25 19:01 PunkPangolin

I made a PR for submission to Flathub [here](https://github.com/flathub/flathub/pull/6035. The flaws regarding manifest and metadata should be sorted out (hopefully). Now only the verification of domain ownership remains. For that, forwarding to the GitHub repo should be enough.

PunkPangolin avatar Jan 17 '25 09:01 PunkPangolin

Could the flatpak be built with leptonica so --remove-background could be reimplemented?

v4u6h4n avatar Jan 23 '25 01:01 v4u6h4n

The flatpak build already includes leptonica, but --remove-background not working cannot be fixed by packaging, as it is no longer implemented by upstream (see here).

PunkPangolin avatar Jan 23 '25 10:01 PunkPangolin

@jbarlow83 (sorry for ping) The PR for Flathub is ready to be merged, only the website verification remains. Could you take care of this?

PunkPangolin avatar Mar 02 '25 13:03 PunkPangolin

@jbarlow83 Sorry for pinging you again, but if you have a moment, could you set up the website redirection? It's the only thing preventing the Flathub submission right now.

PunkPangolin avatar Jun 15 '25 12:06 PunkPangolin

Alternatively we could also use io.github.ocrmypdf.ocrmypdf, which could also maybe simplify verification of the app on Flathub.

PunkPangolin avatar Jun 15 '25 21:06 PunkPangolin