GithubHelp home page GithubHelp logo

Comments (6)

jamalex avatar jamalex commented on July 29, 2024 2

I'm more interested in Notion to HTML right now anyway (for my blog content) though from looking at kjk's Go implementation might be a pain to rewrite in Python.

Took a stab at this here! Would you be able to take a peek and provide feedback? Curious whether this is the sort of thing you'd find useful.
#91

from notion-py.

Cobertos avatar Cobertos commented on July 29, 2024

https://github.com/Cobertos/md2notion may be of use, it will convert full Markdown documents to a descriptor for notion-py

from notion-py.

jamalex avatar jamalex commented on July 29, 2024

@Cobertos Awesome! Let me know if you want to look at tighter integration of md2notion into notion-py (and then I could add you as a co-maintainer). Would be nice to have a clean interface for the other direction as well (e.g. myblock.to_markdown(recurse_depth=2)).

from notion-py.

Cobertos avatar Cobertos commented on July 29, 2024

@jamalex Hmm, possibly. I kind of like the separation tbh. Allows me to provide a CLI interface and keeps the focus of both libraries more focussed.

I also would hope Notion's Markdown importer would eventually get better so my package is unneeded and they'll just have an API endpoint you can hit to do a proper import instead x:

I've been looking at going the other way though (Notion to MD) but the surface area of Notion block types is much larger than what MD can handle. I'm more interested in Notion to HTML right now anyway (for my blog content) though from looking at kjk's Go implementation might be a pain to rewrite in Python.

from notion-py.

indirectlylit avatar indirectlylit commented on July 29, 2024

@Cobertos md2notion is great to see - nice job. I've needed that functionality in the past and will give it a try in the future.

from notion-py.

jamalex avatar jamalex commented on July 29, 2024

@Cobertos Sounds good. If there's anything you find yourself doing in md2notion that you think could benefit general upstream notion-py users, please do open a PR! :) I've added a link to md2notion from the README.

Yeah, markdown definitely can't handle everything. HTML could be interesting, and some sort of framework for exporting to custom HTML (templated, with customizable transformation functions for different block types) could be pretty nice. I don't think it would be particularly hard to get set up, leveraging notion-py's existing interface?

from notion-py.

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.