2anki / server

Server to create Anki flashcards faster, easier and better today ⭐️
https://2anki.net
Other
304 stars 33 forks source link

Remove file path in mp3 embeds #82

Closed alpkaanaksu closed 3 years ago

alpkaanaksu commented 4 years ago

image

aalemayhu commented 4 years ago

Look forward to seeing the pull request 😉

On Sat, Aug 8, 2020 at 3:39 PM Alp Kaan Aksu notifications@github.com wrote:

[image: image] https://user-images.githubusercontent.com/68744864/89711868-b0ee8e80-d995-11ea-925c-f9c1f56295a1.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alemayhu/notion2anki/issues/82, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHB25CQPIQ2EJRUI7SSOHTR7VIRJANCNFSM4PYVG35A .

-- Mit freundlichen Grüßen

Alexander Alemayhu

aalemayhu commented 4 years ago

@alpkaanaksu how is it going, did you fix it?

alpkaanaksu commented 4 years ago

I couldn't find the code line responding for it but will try it again on Thursday. We will drive back to İstanbul (~9hrs), that's why I can't do it today or tomorrow.

alpkaanaksu commented 4 years ago

I say an tag in the card's HTML and tried to remove it using regex. My code worked with plain javascript but didn't work from notion2anki

card.back.replace(/<a\shref=["'].*\.mp3["']>.*<\/a>/ , "")

Maybe there is something I don't know? Can you look at the single line of code and give feedback @aalemayhu?

aalemayhu commented 4 years ago

Sure, I will take a look next week. Thanks 🙏🏾

On Thu, Aug 27, 2020 at 7:18 AM Alp Kaan Aksu notifications@github.com wrote:

I say an tag in the card's HTML and tried to remove it using regex. My code worked with plain javascript but didn't work from notion2anki

card.back.replace(/<a\shref=["']..mp3["']>.<\/a>/ , "")

Maybe there is something I don't know? Can you look at the single line of code and give feedback @aalemayhu https://github.com/aalemayhu?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alemayhu/notion2anki/issues/82#issuecomment-681514518, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHB25C5B62NYZ2RENGD7O3SCXUCHANCNFSM4PYVG35A .

-- Mit freundlichen Grüßen

Alexander Alemayhu

aalemayhu commented 4 years ago

Can you push your changes to some branch? I can take look then otherwise it takes too much to reproduce and fix.

aalemayhu commented 3 years ago

I tried the regular expression. It does work but we end up with empty figure

Screenshot 2021-03-09 at 4 56 01 PM

<figure id="052604a1-a603-4ee9-acc8-b5061efd303a"><div class="source"></div></figure>[sound:d3be5113b7a14f6d6b23f80c0aff8cf3176b424a.mp3]

aalemayhu commented 3 years ago

Fixed by Alp.