Code Monkey home page Code Monkey logo

Comments (4)

SigmaRichards avatar SigmaRichards commented on July 17, 2024

This would be awesome. I can't offer a lot, but as far as matching cells goes, could potentially just rely on using markdown. Use code-blocks to define cells and the space between code blocks to define markdown-cells.

from molten-nvim.

benlubas avatar benlubas commented on July 17, 2024

@SigmaRichards Ideally this should work without relying on the file format. There are many ways that people convert ipynb to plaintext. The most common are Quarto and Jupytext. Quarto converts to a markdown-esque format. Jupytext can convert to either a .py file with comments delimiting cells, or a plain markdown file.

There are also other ways that people create notebook-like files, neorg and NotebookNavigator.nvim off the top of my head, both of those delimit cells in different ways.

I'd like for all of these methods to work with this command.

I also want to make clear that this wouldn't be converting markdown to ipynb, which is a solved problem as far as I'm concerned. This would just be a way to add the outputs from molten to an existing, corresponding, ipynb file.

from molten-nvim.

benlubas avatar benlubas commented on July 17, 2024

I'm also like 85% sure that just relying on the cell order in the file (in addition to the code content) will be enough to not confuse different cells

from molten-nvim.

benlubas avatar benlubas commented on July 17, 2024

@SigmaRichards feel free to checkout that PR, it's in a working state rn. simple instructions for testing: take a jupyter notebook file, convert it to a plaintext format however you want (make sure they have the same name, ie. test.ipynb and test.qmd) and then open the plaintext doc, run code with molten, and run :MoltenExport.

You can then open a copy of the notebook file that was produced in jupyter-lab and see the output from the code you ran.

Keep in mind that things might break and I haven't extensively tested yet, if you find issues you can leave them here and I can be sure to iron them out!

from molten-nvim.

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.