Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live_school: conversion tool for lessons to interactive LiveView notebooks #196

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

radu
Copy link

@radu radu commented Jun 26, 2022

first pass elixir tool to convert .md lessons to interactive LiveView .livemd files
works for lessons as well as posts

some clean-up likely in order, feedback much appreciated!

@radu radu requested a review from a team as a code owner June 26, 2022 22:55
@doomspork
Copy link
Member

Wow @radu this is rad! I've been looking for a way for us to leverage Livebook for more on Elixir School. I'd love to take some time to review this a bit closer but wanted to let you know I'm fully in support of bringing Elixir School to Livebook.

cc @burden @kinson @jaimeiniesta

@SophieDeBenedetto
Copy link

This is SO cool! I'd love to see LiveBook leveraged here and if/when this gets shipped, it would be awesome to share a blog post on Elixir School's blog to announce the feature and talk about how it was done 😄

@SophieDeBenedetto
Copy link

@radu could you offer some brief explanation of how this tool is intended to be used for reviewers to reference?

@@ -0,0 +1,3 @@
#!/usr/bin/env elixir

LiveSchool.Cli.main(System.argv())
Copy link

@SophieDeBenedetto SophieDeBenedetto Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure of the intended usage of this tool but based on this file I'm assuming its a CLI script. Any reason not to make it executable via an escript?

"""

def rewrite_expre(code) do
wrap_code = fn x -> "\n```elixir\n" <> x <> "```\n" end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some benefit to establishing anonymous functions for wrap_code/1 and match_to_cell/1 over defining them as functions in this module?

@@ -0,0 +1,3 @@
#!/usr/bin/env elixir

LiveSchool.Cli.main(System.argv())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd think we'd want to convert all of the files (or a list of them), so a mix task to run this cli module would probably be the best bet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants