Git Product home page Git Product logo

Comments (8)

benwr avatar benwr commented on June 13, 2024

Fixed

from ankdown.

xhw1 avatar xhw1 commented on June 13, 2024

Hi, I just tested adding image but failed. Is this fixed in the current pip installed version? I'm using version 0.5.2

from ankdown.

benwr avatar benwr commented on June 13, 2024

Can you give more details about the failure? (yes, this should be fixed in the current pip version)

from ankdown.

LuccaHellriegel avatar LuccaHellriegel commented on June 13, 2024

I can confirm, that the image import does not seem to work.
I am using the following markdown with the picture in the same folder as the md-file:

alt text # shows the picture in my editor (vscode)

Expected Value of (f(x))

%

[\mathbb{E}[f(x)] = \sum_x p(x)f(x)]

%

math, probability


When looking at the HTML of the first page I see:

Expected Value of \(f(x)\)

Replacing the relative path does not seem to change anything.
Is there maybe a minimum working example with a picture?

from ankdown.

benwr avatar benwr commented on June 13, 2024

@LuccaHellriegel Weirdly, this seems to happen to me when I first import the package, but then if I restart Anki the image shows up properly. Can you confirm that this doesn't happen for you? It's a pretty annoying workaround, but I'm not sufficiently aware of Anki / genanki's internals to fix the problem.

from ankdown.

benwr avatar benwr commented on June 13, 2024

this might be related to kerrickstaley/genanki#17

from ankdown.

LuccaHellriegel avatar LuccaHellriegel commented on June 13, 2024

@benwr After restarting Anki, the image shows up, thanks. If I update the card, I also have to restart Anki. But thats not a big deal, but might deserve a mention somewhere in the readme. Anyway, thanks for your help.

from ankdown.

jay-pee avatar jay-pee commented on June 13, 2024

When putting images in subfolders an error occurs:

Traceback (most recent call last):
  File "c:\Users\Philip\Documents\GitHub\ankdown\ankdown\ankdown.py", line 389, in main
    cards_to_apkg(card_iterator, pkg_arg)
  File "c:\Users\Philip\Documents\GitHub\ankdown\ankdown\ankdown.py", line 343, in cards_to_apkg
    copyfile(abspath, newpath) # This is inefficient but definitely works on all platforms.
  File "C:\Python36\lib\shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'assets/images/philly-magic-garden.jpg'

Maybe we have to create the folder before putting the image there with copyfile(abspath, newpath).
Or change the newpath variable.

from ankdown.

Related Issues (20)

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.