Coder Social home page Coder Social logo

woodrow-shen / anki-snap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ankitects/anki

7.0 2.0 0.0 16.9 MB

Anki for desktop computers

License: Other

Shell 0.28% Roff 0.09% Python 50.67% Batchfile 0.07% CSS 0.01% JavaScript 0.09% TypeScript 4.94% HTML 0.09% Rust 34.19% SCSS 0.64% TeX 0.01% Svelte 1.24% Starlark 7.66% Objective-C 0.02%

anki-snap's Introduction

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/#/

For more information on building, please see Development.

anki-snap's People

Contributors

abdnh avatar agentydragon avatar alanhdu avatar ankitest avatar arthur-milchior avatar bluegreenmagick avatar brownbat avatar cecini avatar dae avatar derbeth avatar evandrocoan avatar frostschutz avatar glutanimate avatar hgiesel avatar hssm avatar julienbaley avatar k12ish avatar kaczmarj avatar kelciour avatar krassowski avatar lovac42 avatar lukkea avatar mkrump avatar ospalh avatar phwoo avatar rumovz avatar simgunz avatar sobjornstad avatar twwn avatar zjosua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

anki-snap's Issues

Set HOME: $SNAP_USER_COMMON?

Hi & thank you for maintaining this.

As Anki stores its media collection in ~/.local/share/Anki2, I'm wondering whether it makes sense to treat the collection as "common data" instead. Else, it will create snapshots on every update and a possible revert of the anki-woodrow snap would also revert the deck collection.

By setting HOME=$SNAP_USER_COMMON, this would be easily achievable. Quite a few snaps (e.g. Firefox) employ this strategy.

Just ship binary releases. Building Anki is endless pain.

Anki is a nightmare to build. Thus, I'm proposing shipping the binary releases from GitHub as is with minimal snapcraft sauce:

name: anki-woodrow
base: core20 
version: "2.1.47"
summary: Anki is a friendly, intelligent spaced learning system.
description: |
  Anki is a program which makes remembering things easy. Because it's a lot
  more efficient than traditional study methods, you can either greatly
  decrease your time spent studying, or greatly increase the amount you learn.

grade: stable
confinement: strict
compression: lzo

apps:
  anki:
    command: usr/share/anki/bin/Anki
    desktop: usr/share/applications/anki.desktop
    plugs:
      - home
      - opengl
      - network
      - browser-support
      - audio-playback
      - audio-record
    environment:
      HOME: $SNAP_USER_COMMON
      QTWEBENGINE_DISABLE_SANDBOX: 1
    extensions:
      - gnome-3-38

parts:
  anki:
    plugin: nil
    source: https://github.com/ankitects/anki/releases/download/2.1.47/anki-2.1.47-linux.tar.bz2
    stage-packages:
      - libnss3
      - libxcb-icccm4
      - libxcb-image0
      - libxcb-keysyms1
      - libxcb-randr0
      - libxcb-render-util0
      - libxcb-shape0
      - libxcb-xinerama0
      - libxcb-xkb1
      - libxkbcommon-x11-0
    override-build: |
      export PREFIX="$SNAPCRAFT_PART_INSTALL/usr"
      echo "#!/bin/sh" > /usr/bin/xdg-mime && chmod +x /usr/bin/xdg-mime
      ./install.sh
      sed -i -e 's|Icon=anki|Icon=${SNAP}/usr/share/pixmaps/anki.png|g' \
        "$PREFIX/share/applications/anki.desktop"

This could be a sustainable way to maintain a KISS snap.
If you're feeling fancy, you could try to rip out the Qt libraries and use those from the kde-neon extension. But why bother. ๐Ÿคทโ€โ™‚๏ธ

What do you think? Or are you not interested in maintaining the snap if you can't build from source?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.