Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Package request: Anki #142

Closed
sudomain opened this issue Aug 25, 2019 · 3 comments
Closed

Package request: Anki #142

sudomain opened this issue Aug 25, 2019 · 3 comments
Labels
package request A new package was requested.

Comments

@sudomain
Copy link

Package description
Anki is a flashcard/spaced repetition program useful for learning many different subjects. Anki 2.1 utilizes:
1.) Python 3.6 or later for its backend, which Termux already has (3.7 at time of this writing)
2.) Qt 5.9 / PyQt5 for rendering of flashcards. This means porting will depend on issue #4 's resolution

Link to home page and sources

  1. Home page:
    https://apps.ankiweb.net/
  2. Source code:
    https://github.com/dae/anki

helpful documentation about the internals and requirements:
https://apps.ankiweb.net/docs/addons.html
https://github.com/Arthur-Milchior/anki/tree/fork/documentation

@ghost ghost added the package request A new package was requested. label Sep 3, 2019
@sudomain
Copy link
Author

sudomain commented Nov 29, 2019

fwiw, TermuxArch will install a instance of Arch Linux ARM which has a working version of Anki 2.1 for ARM devices. It does this via the proot tool available in Termux (it's like chroot without needing root access)

For those that are interested I've managed to get Anki running in a TermuxArch proot with the following steps (atleast 2 GB of internal device storage is needed):

  1. Install TermuxArch dependencies: pkg install bsdtar proot
  2. Install TermuxArch
  3. Enter the TermuxArch Proot as the root user: startarch
    If you see this: '[rootXX:XXDIR]$' (where XX:XX is the current time and DIR is the current directory) as the prompt on the left side of the app, then you know you're in the arch proot already and can skip this step. If you only see '$' on the left side then you're in Termux but not the proot environment, in which case startarch should be used
  4. Install Anki, tigervnc, and a desktop environment (LXDE is my choice since XFCE seems broken at this time): pacman -S anki tigervnc lxde
  5. Create a new user in TermuxArch. This is needed because Anki doesn't like to be run as a user named 'root': addauser vncuser
  6. Add the following lines of code to the xstartup file. Full path is /home/vncuser/.vnc/xstartup:

`
#Tell our X11 programs which display to use:
export DISPLAY=':1'

#Start our DE
startlxde
`

  1. switch to our new user (vncuser in my case): su vncuser

  2. start the vncserver on the first display and only allow connections from this device (localhost). When you first run this command it will prompt you for a password to use when connecting:
    vncserver :1 -localhost
    I've added the above command to the .bashrc of my vncuser so that it happens automatically.

  3. Install a VNC client app (I prefer VNC Viewer from the playstore since it handles keyboard shortcuts and right clicks properlly) and connect to the VNC server using the following settings:
    address: localhost
    port: 5901
    password: the password you configured when starting the vnc server for the first time

  4. Start anki from the vncuser shell or the desktop icon if your DE supports it (LXDE does)

Screenshot_2019-11-29-14-16-00

@sudomain
Copy link
Author

sudomain commented Dec 9, 2019

@xeffyr I noticed that issue #4 (which this request depends on) recieved a "unlikely-to-be-implemented" label. The Arch Linux Arm Project has a working implementation of PyQt 5 as well as Anki which I am currently using. What would it entail to take the package from that project? There is a PKGBUILD file that is used by the pacman/makepkg to build it for this project. Any pointers how I would go about translating this to something suitable for Termux/apt or if it's even feasible?

@ghost
Copy link

ghost commented Dec 9, 2019

It is not possible just to take PyQT5 package from Arch Linux ARM at least due to native extensions (should I mention incompatibility between libc's ?).

Building PyQT5 (as well as other python modules with native extensions) for Termux is real headache.


Closing as PyQT5 is not going to be added.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package request A new package was requested.
Projects
None yet
Development

No branches or pull requests

1 participant