Package Details: giara 1.0-2

Git Clone URL: https://aur.archlinux.org/giara.git (read-only, click to copy)
Package Base: giara
Description: Reddit gtk client
Upstream URL: https://gitlab.gnome.org/World/giara
Keywords: Reddit
Licenses: GPL3
Conflicts: redditgtk
Provides: redditgtk
Replaces: redditgtk
Submitter: otreblan
Maintainer: otreblan (gabmus)
Last Packager: otreblan
Votes: 5
Popularity: 0.001406
First Submitted: 2020-10-09 13:36 (UTC)
Last Updated: 2021-09-15 22:22 (UTC)

Latest Comments

dreieck commented on 2022-01-05 14:42 (UTC)

When running, it fails for me with AttributeError: type object 'ViewSwitcherPolicy' has no attribute 'AUTO':

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/giara/__main__.py", line 206, in do_activate
    self.get_reddit_client()
  File "/usr/lib/python3.10/site-packages/giara/__main__.py", line 178, in get_reddit_client
    return self.continue_activate(
  File "/usr/lib/python3.10/site-packages/giara/__main__.py", line 216, in continue_activate
    self.window = AppWindow()
  File "/usr/lib/python3.10/site-packages/giara/app_window.py", line 19, in __init__
    self.main_ui = MainUI()
  File "/usr/lib/python3.10/site-packages/giara/main_ui.py", line 21, in __init__
    self.deck = MainDeck()
  File "/usr/lib/python3.10/site-packages/giara/main_deck.py", line 19, in __init__
    self.left_stack = LeftStack(self.show_post)
  File "/usr/lib/python3.10/site-packages/giara/left_stack.py", line 133, in __init__
    self.search_view = SearchView(
  File "/usr/lib/python3.10/site-packages/giara/search_view.py", line 77, in __init__
    SearchViewHeaderbar(self.stack),
  File "/usr/lib/python3.10/site-packages/giara/search_view.py", line 12, in __init__
    super().__init__(
  File "/usr/lib/python3.10/site-packages/giara/squeezing_viewswitcher_headerbar.py", line 34, in __init__
    self.view_switcher.set_policy(Adw.ViewSwitcherPolicy.AUTO)
AttributeError: type object 'ViewSwitcherPolicy' has no attribute 'AUTO'

satcom886 commented on 2021-09-17 08:45 (UTC)

Woah, that was fast! Thank you!

satcom886 commented on 2021-09-15 18:26 (UTC)

The package doesn't build at the moment. Seems like the fix for issue 104 is not in 1.0.

Here's an updated PKGBUILD:

# Maintainer: Otreblan <otreblain@gmail.com>

pkgname=giara
pkgver=1.0
pkgrel=2
epoch=
pkgdesc="Reddit gtk client"
arch=('any')
url="https://gitlab.gnome.org/World/giara"
license=('GPL3')
groups=()
depends=(
    'gtk4'
    'gtksourceview5'
    'libadwaita'
    'python-beautifulsoup4'
    'python-dateutil'
    'python-gobject'
    'python-mistune'
    'python-pillow'
    'python-praw'
)
makedepends=('meson' 'gobject-introspection')
checkdepends=('appstream')
optdepends=('ffmpeg: For video')
provides=(redditgtk)
conflicts=(redditgtk)
replaces=(redditgtk)
source=(
        "$url/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
    "gtk4.patch")
sha256sums=(
            'ec8a7c7cba8ae6b79cf36db7cefe1ee58f8818d04a7ff305773ba5a317fba88f'
            'ff17bd32066d06cd4fd493bc18967e7493918fa90c0088d7292122c86b96bca1')

prepare() {
    cd "$srcdir/$pkgname-$pkgver/"
    patch -p1 < "$srcdir/gtk4.patch"
    cd "$srcdir/$pkgname-$pkgver/$pkgname"
    local _pver="$(python --version | sed "s/Python \(.*\)\..*/\1/")"
    local _ddir="/usr/lib/python$_pver/site-packages/$pkgname/"

    # Generate pycache, if you ran giara as root this will conflict
    for f in "" -O;
    do
        python $f -m compileall . --invalidation-mode checked-hash -d "$_ddir"
    done
}

build() {
    arch-meson "$pkgname-$pkgver" build

    meson compile -C build
}

package() {
    DESTDIR="$pkgdir" meson install -C build
}

And here's the patch to add:

diff --git a/meson.build b/meson.build
index 1eb2a91d4a77ad88af55014a54a6a6805c457b13..62efb39f2f3ae9bb518b0ffe00e3c1e668a93a8b 100644
--- a/meson.build
+++ b/meson.build
@@ -75,7 +75,8 @@ if not py_installation.found()
 endif
 dependency('glib-2.0')
 dependency('gobject-introspection-1.0', version: '>=1.35.9')
-dependency('gtk+-3.0', version :'>=3.24')
+dependency('gtk4', version :'>=4.4.0')
+dependency('libadwaita-1', version :'>=1.0.0')

 gnome = import('gnome')
 prefix = get_option('prefix') # should be /usr

Esgariot commented on 2021-05-17 20:40 (UTC) (edited on 2021-05-17 20:41 (UTC) by Esgariot)

There's a bug that results in authentication problems,

orggabmusgiaradesktop://authcallback?state=giara-<omitted>#_
Error authorizing Reddit client, retrying…
Error authorizing Reddit client after retry, quitting…

Current workaround is to trim #_ from end of url

https://gitlab.gnome.org/World/giara/-/issues/97#note_1076131

anonymous_user commented on 2020-11-19 05:25 (UTC)

webkit2gtk needs to be added as a dependency. Giara throws an error and doesn't launch without it.

otreblan commented on 2020-11-12 16:17 (UTC)

@nobicycle It appears that you're using mistune from pip. The pacman version is older and still has Renderer in mistune.py. It has been deleted almost 2 years ago https://github.com/lepture/mistune/commit/31a35a6ba58dfc030773f0821296f61630afe60e

nobicycle commented on 2020-11-12 14:13 (UTC)

Thanks for packaging.

Runtime error: $ giara Traceback (most recent call last): File "/usr/bin/giara", line 87, in <module> from giara import main File "/usr/lib/python3.8/site-packages/giara/main.py", line 25, in <module> from giara.app_window import AppWindow File "/usr/lib/python3.8/site-packages/giara/app_window.py", line 4, in <module> from giara.main_ui import MainUI File "/usr/lib/python3.8/site-packages/giara/main_ui.py", line 5, in <module> from giara.main_deck import MainDeck File "/usr/lib/python3.8/site-packages/giara/main_deck.py", line 2, in <module> from giara.left_stack import LeftStack File "/usr/lib/python3.8/site-packages/giara/left_stack.py", line 3, in <module> from giara.sections_stack import SectionsStack File "/usr/lib/python3.8/site-packages/giara/sections_stack.py", line 3, in <module> from giara.markdown_view import MarkdownView File "/usr/lib/python3.8/site-packages/giara/markdown_view.py", line 12, in <module> class PangoRenderer(mistune.Renderer): AttributeError: module 'mistune' has no attribute 'Renderer'