gImageReader icon indicating copy to clipboard operation
gImageReader copied to clipboard

Flatpak package

Open scx opened this issue 6 years ago • 2 comments
trafficstars

I created the flatpak package for gImageReader. https://github.com/scx/gimagereader-flatpak (Gtk+3/Qt5) https://github.com/scx/gimagereader-flatpak/tree/qt5 (Qt5) https://github.com/scx/gimagereader-flatpak/tree/gtk3 (Gtk+3)

I am in the process of submitting it to the Flathub repo. https://github.com/flathub/flathub/pull/810 https://github.com/scx/flathub/tree/com.github.manisandro.gImageReader-qt5

It would be nice if the author decided to participate in the further development of this flatpak package.

scx avatar Jan 13 '19 03:01 scx

Thank you for working on this! I haven't yet looked in depth at flatpack, so currently I'm not really able to partecipate, but if there are specific issues, I'm happy to help as time allows.

manisandro avatar Jan 13 '19 21:01 manisandro

The gtk variant is here: https://github.com/flathub/flathub/pull/842 https://github.com/scx/flathub/tree/com.github.manisandro.gImageReader-gtk

scx avatar Feb 05 '19 22:02 scx

Another try: https://github.com/flathub/flathub/pull/3883

proletarius101 avatar Feb 05 '23 11:02 proletarius101

@manisandro Since it's merged, it would be nice if you add a download badge (https://flathub.org/badges) or so to this repo

proletarius101 avatar Mar 22 '23 15:03 proletarius101

@proletarius101: The FlatHub page displays old version info (see https://github.com/flathub/io.github.manisandro.gImageReader/issues/7)... why is that?

salim-b avatar Mar 22 '23 17:03 salim-b

The version in that page is extracted from the AppStream Metadata file produced in the build process, instead of the actual git tag name. Do you know if the produced .metainfo.xml contains the correct version information?

proletarius101 avatar Mar 22 '23 20:03 proletarius101

Do you know if the produced .metainfo.xml contains the correct version information?

I'm really not familiar with Flatpak internals. I tried to locate the appstream metadata of the installed gImageReader Flatpak and, if I'm not mistaken, it's found under /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml, right?

That file contains the same outdated info as is found on FlatHub:

cat /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml
Output
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
 <id>io.github.manisandro.gImageReader</id>
 <metadata_license>CC0-1.0</metadata_license>
 <project_license>GPL-3.0+</project_license>
 <name>gImageReader</name>
 <name xml:lang="cs_CZ">gImageReader</name>
 <summary>A graphical (gtk) frontend to tesseract-ocr</summary>
 <summary xml:lang="cs_CZ">Grafická (gtk) nadstavba pro engine tesseract-ocr</summary>
 <keywords>
 <keyword>ocr</keyword>
 <keyword>optical</keyword>
 <keyword>recognition</keyword>
 <keyword>tesseract</keyword>
 <keyword>pdf</keyword>
 <keyword>gtk</keyword>
 </keywords>
 <keywords xml:lang="cs_CZ">
 <keyword xml:lang="cs_CZ">ocr</keyword>
 <keyword xml:lang="cs_CZ">optické</keyword>
 <keyword xml:lang="cs_CZ">rozpoznávání</keyword>
 <keyword xml:lang="cs_CZ">tesseract</keyword>
 <keyword xml:lang="cs_CZ">pdf</keyword>
 </keywords>
 <description>
 <p>gImageReader is a simple optical character recognition (OCR) application which acts as a frontend to the tesseract OCR engine. Features include:</p>
 <p xml:lang="cs_CZ">gImageReader je jednoduše použitelná aplikace pro rozpoznávání textu z obrázků, využívající OCR engine tesseract. Mezi funkce patří:</p>
 <ul>
  <li>Import PDF documents and images from disk, scanning devices, clipboard and screenshots</li>
  <li xml:lang="cs_CZ">Import PDF dokumentů a obrázků z počítače, skenovacích zařízení, schránky a snímků obrazovky</li>
  <li>Process multiple images and documents in one go</li>
  <li xml:lang="cs_CZ">Zpracování vícero obrázků a dokumentů naráz</li>
  <li>Manual or automatic recognition area definition</li>
  <li xml:lang="cs_CZ">Ruční nebo automatická definice oblasti k rozpoznávání</li>
  <li>Recognize to plain text or to hOCR documents</li>
  <li xml:lang="cs_CZ">Rozpoznání do holého textu nebo hOCR dokumentů</li>
  <li>Recognized text displayed directly next to the image</li>
  <li xml:lang="cs_CZ">Rozpoznaný text je zobrazen hned vedle zdrojového obrázku</li>
  <li>Post-process the recognized text, including spellchecking</li>
  <li xml:lang="cs_CZ">Následné zpracování rozpoznaného textu včetně kontroly překlepů</li>
  <li>Generate PDF/ODT documents from hOCR documents</li>
  <li xml:lang="cs_CZ">Vytváření PDF/ODT dokumentů z hOCR dokumentů</li>
 </ul>
 </description>
 <screenshots>
 <screenshot type="default">
  <image>https://raw.githubusercontent.com/manisandro/gImageReader/gh-pages/gimagereader-gtk.jpg</image>
  <caption>gImageReader-gtk</caption>
 </screenshot>
 </screenshots>
 <url type="bugtracker">https://github.com/manisandro/gImageReader/issues</url>
 <url type="faq">https://github.com/manisandro/gImageReader/wiki/FAQ</url>
 <url type="homepage">https://github.com/manisandro/gImageReader</url>
 <url type="translate">https://github.com/manisandro/gImageReader/blob/master/README.md</url>
 <update_contact>[email protected]</update_contact>
 <translation type="gettext">gimagereader</translation>
 <provides>
 <binary>gimagereader-gtk</binary>
 </provides>
 <launchable type="desktop-id">io.github.manisandro.gImageReader.desktop</launchable>
 <content_rating type="oars-1.0">
 <content_attribute id="social-info">mild</content_attribute>
 </content_rating>
 <releases>
 <release version="3.3.0" date="2018-09-26"/>
 </releases>
</component>

The gImageReader metadata found in /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml (this is locally cached FlatHub metadata I suppose?) also contains the outdated info.

The metadata seems to be generated from https://github.com/manisandro/gImageReader/blob/ca4bd9d4e066ea03b74ee86396afebee192c4d8e/data/gimagereader.appdata.xml.in#L67

so @PACKAGE_VERSION@ and @PACKAGE_ISO_DATE@ somehow get resolved to the outdated info during the Flatpak build process, I suppose...

salim-b avatar Mar 25 '23 09:03 salim-b

Do you know if the produced .metainfo.xml contains the correct version information?

I'm really not familiar with Flatpak internals. I tried to locate the appstream metadata of the installed gImageReader Flatpak and, if I'm not mistaken, it's found under /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml, right?

That file contains the same outdated info as is found on FlatHub:

cat /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml

Output

<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
 <id>io.github.manisandro.gImageReader</id>
 <metadata_license>CC0-1.0</metadata_license>
 <project_license>GPL-3.0+</project_license>
 <name>gImageReader</name>
 <name xml:lang="cs_CZ">gImageReader</name>
 <summary>A graphical (gtk) frontend to tesseract-ocr</summary>
 <summary xml:lang="cs_CZ">Grafická (gtk) nadstavba pro engine tesseract-ocr</summary>
 <keywords>
 <keyword>ocr</keyword>
 <keyword>optical</keyword>
 <keyword>recognition</keyword>
 <keyword>tesseract</keyword>
 <keyword>pdf</keyword>
 <keyword>gtk</keyword>
 </keywords>
 <keywords xml:lang="cs_CZ">
 <keyword xml:lang="cs_CZ">ocr</keyword>
 <keyword xml:lang="cs_CZ">optické</keyword>
 <keyword xml:lang="cs_CZ">rozpoznávání</keyword>
 <keyword xml:lang="cs_CZ">tesseract</keyword>
 <keyword xml:lang="cs_CZ">pdf</keyword>
 </keywords>
 <description>
 <p>gImageReader is a simple optical character recognition (OCR) application which acts as a frontend to the tesseract OCR engine. Features include:</p>
 <p xml:lang="cs_CZ">gImageReader je jednoduše použitelná aplikace pro rozpoznávání textu z obrázků, využívající OCR engine tesseract. Mezi funkce patří:</p>
 <ul>
  <li>Import PDF documents and images from disk, scanning devices, clipboard and screenshots</li>
  <li xml:lang="cs_CZ">Import PDF dokumentů a obrázků z počítače, skenovacích zařízení, schránky a snímků obrazovky</li>
  <li>Process multiple images and documents in one go</li>
  <li xml:lang="cs_CZ">Zpracování vícero obrázků a dokumentů naráz</li>
  <li>Manual or automatic recognition area definition</li>
  <li xml:lang="cs_CZ">Ruční nebo automatická definice oblasti k rozpoznávání</li>
  <li>Recognize to plain text or to hOCR documents</li>
  <li xml:lang="cs_CZ">Rozpoznání do holého textu nebo hOCR dokumentů</li>
  <li>Recognized text displayed directly next to the image</li>
  <li xml:lang="cs_CZ">Rozpoznaný text je zobrazen hned vedle zdrojového obrázku</li>
  <li>Post-process the recognized text, including spellchecking</li>
  <li xml:lang="cs_CZ">Následné zpracování rozpoznaného textu včetně kontroly překlepů</li>
  <li>Generate PDF/ODT documents from hOCR documents</li>
  <li xml:lang="cs_CZ">Vytváření PDF/ODT dokumentů z hOCR dokumentů</li>
 </ul>
 </description>
 <screenshots>
 <screenshot type="default">
  <image>https://raw.githubusercontent.com/manisandro/gImageReader/gh-pages/gimagereader-gtk.jpg</image>
  <caption>gImageReader-gtk</caption>
 </screenshot>
 </screenshots>
 <url type="bugtracker">https://github.com/manisandro/gImageReader/issues</url>
 <url type="faq">https://github.com/manisandro/gImageReader/wiki/FAQ</url>
 <url type="homepage">https://github.com/manisandro/gImageReader</url>
 <url type="translate">https://github.com/manisandro/gImageReader/blob/master/README.md</url>
 <update_contact>[email protected]</update_contact>
 <translation type="gettext">gimagereader</translation>
 <provides>
 <binary>gimagereader-gtk</binary>
 </provides>
 <launchable type="desktop-id">io.github.manisandro.gImageReader.desktop</launchable>
 <content_rating type="oars-1.0">
 <content_attribute id="social-info">mild</content_attribute>
 </content_rating>
 <releases>
 <release version="3.3.0" date="2018-09-26"/>
 </releases>
</component>

The gImageReader metadata found in /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml (this is locally cached FlatHub metadata I suppose?) also contains the outdated info.

The metadata seems to be generated from

https://github.com/manisandro/gImageReader/blob/ca4bd9d4e066ea03b74ee86396afebee192c4d8e/data/gimagereader.appdata.xml.in#L67

so @PACKAGE_VERSION@ and @PACKAGE_ISO_DATE@ somehow get resolved to the outdated info during the Flatpak build process, I suppose...

Yes. But the in flatpak it's generated exactly the same way. Can you confirm whether in traditional packages the metainfo file contains the latest tag? Maybe the version generation script has some bugs.

proletarius101 avatar Mar 25 '23 09:03 proletarius101

Yes. But the in flatpak it's generated exactly the same way. Can you confirm whether in traditional packages the metainfo file contains the latest tag? Maybe the version generation script has some bugs.

Your suspicion seems correct. The latest DEB package for Ubuntu 22.04 (jammy) from the ppa:sandromani/gimagereader repo ships the same outdated metadata (found in /usr/share/metainfo/gimagereader-gtk.appdata.xml after installation).

salim-b avatar Mar 25 '23 09:03 salim-b

@manisandro It would be nice if you can release a new version, as in the latest tagged version, the metainfo file has not been updated to satisfy the requirements of Flathub.

proletarius101 avatar Feb 04 '24 11:02 proletarius101

I've tagged v3.4.2. Closing this ticket as I believe there is nothing more to be done? Many thanks @proletarius101 for your work on the flatpack build!

manisandro avatar Feb 05 '24 09:02 manisandro

I've tagged v3.4.2. Closing this ticket as I believe there is nothing more to be done? Many thanks @proletarius101 for your work on the flatpack build!

Yes it works. Thanks

proletarius101 avatar Feb 05 '24 14:02 proletarius101