GithubHelp home page GithubHelp logo

notrition's Introduction

Notrition

Python script to save recipes directly to a Notion database with the following details:

  • Recipe photo is used as the Page cover photo
  • Recipe name is used as the page name
  • Cook time as a property
  • URL as a property
  • Website name as a property
  • Body of the page contains Ingredients and Steps
  • Absolutely no five paragraph long **life stories from the author

Setup

This guide requires that you have a basic understanding of editing and running Python code.

Notion

First, for this script to work, you need to have a Notion database with the valid fields required by the script. I have a template available for duplication here. You can build and add to this, but make sure not to remove any existing columns.

Second, you need to make an Integration in Notion. Notion has a good tutorial on this here. Remember to save your super secret integration token and keep it somewhere safe! You’ll need this later.

Finally, you’ll need to give your new integration access to the page. You can do this by going to your recipe page and adding your integration from the Share option.

Python

  • Open notion.py
    • Update token with the integration token you saved from earlier
    • Update database_id with the ID of your recipe database.
      • Guide on how to find this is here.

Running

  • Run recipe.py with a single parameter: your recipe URL
  • Bon appétit!

Scraping Library

I used a great recipe scraper as part of this project. Their ReadMe contains a list of websites it supports.

notrition's People

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.