Project

General

Profile

anki without qt5-webengine

nona - 10 months ago -

Hello,

I would like to install anki (which is available in the repos), but it requires qt5-webengine

    resolving dependencies...
    warning: cannot resolve "qt5-webengine", a dependency of "anki" 
    warning: cannot resolve "python-pyqtwebengine", a dependency of "anki" 
    :: The following package cannot be upgraded due to unresolvable dependencies:
          anki

I have seen other packages which go around such dependencies. How to do it with this? Thanks.


Replies (13)

RE: anki without qt5-webengine - theova - 10 months ago -

Hi,

Thank you for the notification. Before posting a new issue, please have a look at the bug tracker and search for the package name.

There is already an open issue: #1426

nona wrote:

How to do it with this?

One would need to patch the code and modify the program s.t. it doesn't depend on qt5-webengine anymore. However this might not be an easy task.
If you are interested in building libre packages, you can find additional informations here.

RE: anki without qt5-webengine - nona - 10 months ago -

Sorry, I should have searched before, I usually do.

I assume that s.t. = so that

Yes, I am interested. I don't know if I have the drive to modify anki's source to use webkit, but I'll send an e-mail to the developers... who knows, may be they'll do it!

RE: anki without qt5-webengine - nona - 8 months ago -

Good news! I helped towards the liberation of software (for the first time? dunno)
https://anki.tenderapp.com/discussions/ankidesktop/37764-webkit
I attach a PKGBUILD.

This uses lovac42's repository for an Anki alternative called CCBC. Damien Elmes (who I assume is a developer of Anki) seems to be very keen on not migrating.

RE: anki without qt5-webengine - bill-auger - 5 months ago -

this sounds good - have you tried it? - are you familiar with
anki? - will people who like anki be satisfied with CCBC as a
replacement?

we would prefer to get PKGBUILDs and patches on the mailing
list, or attached to an open bug report, if there is one - email
sent to the dev mailing list with [PATCH] in the subject, is
the most likely way to be noticed and handled promptly

or, as in this case, there are two open tickets on the bug
tracker for anki

https://labs.parabola.nu/issues/1426
https://labs.parabola.nu/issues/1830

RE: anki without qt5-webengine - nona - 5 months ago -

Short: will later create bug report and [PATCH]. See this: https://www.notabug.org/broncodev/ccbc-pkgbuild

Detailed:
I had to make some changes (that was my little contribution). You can check the results on this repository: https://www.notabug.org/broncodev/ccbc-pkgbuild . I try to fix things as I discover that they are broken. The thing that I haven't been able to solve is how to record audio. I have not taken the time to contact lovac42 to let him know about my changes, but I did send him a message when I started with them with the link to the repo.

CCBC is basically the same as Anki. If it works, people can just replace Anki with it. The conditional is big, because I could not even use it when I got the link to the project the first time.

I will follow on the [PATCH] thing, but then I would first contact lovac42 and let him know of my changes. My contributions consist in using https://github.com/rferrazz/pyqt4topyqt5.git and some other rules implemented in the PKGBUILD with sed for the migration.

I did not want to create a bug report, because https://labs.parabola.nu/issues/1426 already existed, and I often feel that I create bug reports which should not be bug reports. At the time of my initial writing, things seemed to point to the wish to revert Anki to 2.0, which did not go in line with what I intended (because I want the voice recording feature and have it up to date). On top of that, when lovac42 posted that "these are personal pet projects" did not give me enough confidence to share it back to Parabola.

RE: anki without qt5-webengine - bill-auger - 5 months ago -

not all tickets on the bug tracker need to be bug reports -
there is a selector where you can choose to denote it as a
"packaging request" - that would be the most appropriate
protocol for a new package

RE: anki without qt5-webengine - theova - 5 months ago -

nona: Cool that are great news. Congrats! I would be willing to test Anki app :)

RE: anki without qt5-webengine - nona - 5 months ago -

theova wrote:

nona: Cool that are great news. Congrats! I would be willing to test Anki app :)

Thanks. Remember, I am mainly using lovac42's and pyqt4topyqt5 projects (may be you want to thank them). Let me know if you can build from the repo: https://www.notabug.org/broncodev/ccbc-pkgbuild . It works for me. As I said, the voice recording and may be other features that I never use are still not working :) .

Praise the freedom!

RE: anki without qt5-webengine - theova - 5 months ago -

I finally achieved to test this package.

To build it with libremakepkg, I had to add

makedepends+=('git')

to the PKGBUILD.

Then I could successfully start anki.

When trying to add cards to a deck, I get

Error
An error occurred. Please use Tools > Check Database to see if that fixes the problem. 
If problems persist, you are SOL.
Anki 2.1.16_ccbc (dev) Python 3.8.3 Qt 5.14.2 PyQt 5.14.2
Platform: Linux
Flags: frz=False ao=False sv=1

Caught exception:
Traceback (most recent call last):
  File "/usr/share/anki/aqt/webview.py", line 214, in _linkHandler
    self.linkHandler(url.toString())
  File "/usr/share/anki/aqt/toolbar.py", line 74, in _linkHandler
    self.link_handlers[link]()
  File "/usr/share/anki/aqt/toolbar.py", line 88, in _addLinkHandler
    self.mw.onAddCard()
  File "/usr/share/anki/aqt/main.py", line 789, in onAddCard
    instance = aqt.dialogs.open(name, self)
  File "/usr/share/anki/aqt/__init__.py", line 72, in open
    instance = creator(*args)
  File "/usr/share/anki/aqt/addcards.py", line 38, in __init__
    self.setupChoosers()
  File "/usr/share/anki/aqt/addcards.py", line 65, in setupChoosers
    self.modelChooser = aqt.modelchooser.ModelChooser(
  File "/usr/share/anki/aqt/modelchooser.py", line 23, in __init__
    self.setMargin(0)
AttributeError: 'ModelChooser' object has no attribute 'setMargin'

I get the same error when pressing `browse`.

I do not have time to dig into that for now. Probably I'm missig a dependency?

RE: anki without qt5-webengine - bill-auger - 3 months ago -

i did not get any errors - the program appears to work perfectly - the install hook complains a missing file though

xdg-mime: file '/usr/share/mime/packages/anki.xml' does not exist

nona -

i could give you attribution as a contributor in the PKGBUILD, if you give a contact address;
or better yet, as maintainer, if you would like to maintain the PKGBUILD

RE: anki without qt5-webengine - nona - 3 months ago -

Yeah, sure. I can maintain it. lovac42 has not replied to me in any way, which is going to make it challenging :P .

I will need to read the packaging documentation on the website and will shoot you an e-mail when I'm done.

RE: anki without qt5-webengine - nona - 3 months ago -

theova wrote:

I finally achieved to test this package.

Nice! I'm sorry it took long to reply. I am not in the update mailing list for this post. It was due to #1426 that I got to see this.

To build it with libremakepkg, I had to add

I don't use that software, but I am glad that you managed to get it to work. I will add that build dependency

I do not have time to dig into that for now. Probably I'm missig a dependency?

I don't know. Have you tried with the regular makepkg? I will try with a virtual machine to test the raw dependencies, ok?

RE: anki without qt5-webengine - bill-auger - 3 months ago -

nona and theova -

regarding the 'git' dependency, i removed that and the version() function - they were not necessary - github can serve a tarball of any commit - i will put the PKGBUILD in abslibre later

both of you are subscribed to the anki ticket #1426 - i would prefer that discussions about the packaging be on the bug tracker, for future refeernce, rather than the forum

i dont have any "anki cards" - maybe thats why i did not get any error - if the bug can be repeated with the pcr-testing package; make note of it on ticket #1426, maybe even post the data files

its in pcr-testing for a reason - if it is too buggy, and especially of the upstream maintainer is unresponsive, it may not be worth keeping

    (1-13/13)