jrobind / dev-jot

Note-taking app for online development tutorials
MIT License
54 stars 45 forks source link

Download lesson notes as markdown files #101

Open jrobind opened 3 years ago

jrobind commented 3 years ago

Currently we save lessons to the browser Local Storage API. There is currently no way to persist lessons to a database/cloud.

As a backup, we could add a feature to enable the user to download their lesson notes as markdown or txt files.

This article provides some useful information for someone looking to take this on.

If you're not sure how to tackle this, feel free to start a conversation here or join the Discord chat.

Blargian commented 3 years ago

Hi, I'm a junior developer wanting to get involved in opensource as a first timer. I'm interested in taking this on if you're looking for help.

akosbalasko commented 3 years ago

Hi @jrobind !

Congrats on your project, it looks like a really nice and easy-to-use tool!

If I see well, all of the lessons' contents are stored in the Local Storage, parts are plain html, images encoded. A couple of questions came to my mind:

jrobind commented 3 years ago

Hi, I'm a junior developer wanting to get involved in opensource as a first timer. I'm interested in taking this on if you're looking for help.

Hey! Feel free to take this on :) @akosbalasko has some useful notes & observations, and if you want to discuss further feel free to comment here. I'll assign this to you and mark this as in-progress.

jrobind commented 3 years ago

Hi @jrobind !

Congrats on your project, it looks like a really nice and easy-to-use tool!

If I see well, all of the lessons' contents are stored in the Local Storage, parts are plain html, images encoded. A couple of questions came to my mind:

  • Images make the things a bit more complicated, to follow MD standards I would put images next to the MD files, and reference them. So in this case we have to compress it.
  • How should the text sizes be transformed to MD? I don't remember anything like this except the classic heading (#, ## etc), but it should be kept for h1/h2 html tags, I think.
  • once the download process is done, to complete the flow the loading process should be solved as well e.g. loading a zip file, decompress it, transform the MD notes to html, and put them to the Local Storage.
  • You mentioned that currently storing notes remotely is not supported. But will it be supported in the future? Because in this case, it would be more meaningful to implement the whole conversion just once, in server-side.

Hey! Thanks for the input. I'll get back to your other points, but regarding the storing of notes remotely, for now I've decided to keep everything client side, this project is more of a playground for those new to open source and FE development, having everything client side makes things a little easier for newcomers.

Blargian commented 3 years ago

@jrobind I see in the css that small, large and huge correspond to 0.75em, 1.5em, 2.5em respectively. I think an appropriate mapping would be something like huge -> # and large -> ## however the small size doesn't have much connection with markdown. (I'm assuming GFM variety of markdown here). How do you think the small headings should map to the markdown? I thought maybe it could map to a subscript but this doesn't seem to currently be supported in GFM markdown.