-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: main
Are you sure you want to change the base?
Conversation
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. |
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 😄 |
@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()) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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.
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!