This was a tool to scrape NYT and calculate the total calorie count of the recipes, and manage them in a Svelte Application.
Find a file
2024-11-27 17:14:16 -05:00
.vscode Initial commit 2021-12-16 00:55:59 -05:00
NimRecipe asd 2021-12-16 04:03:57 -05:00
package Initial commit 2021-12-16 00:55:59 -05:00
public Initial commit 2021-12-16 00:55:59 -05:00
src Initial commit 2021-12-16 00:55:59 -05:00
.eslintrc Initial commit 2021-12-16 00:55:59 -05:00
.gitignore gitignore 2021-12-16 04:40:42 -05:00
App.svelte asd 2021-12-16 04:03:57 -05:00
favicon.png Initial commit 2021-12-16 00:55:59 -05:00
Item.svelte asd 2021-12-16 04:03:57 -05:00
LICENSE.md Initial commit 2021-12-16 00:55:59 -05:00
package-lock.json Initial commit 2021-12-16 00:55:59 -05:00
package.json Initial commit 2021-12-16 00:55:59 -05:00
popup.svelte Initial commit 2021-12-16 00:55:59 -05:00
README.md updated readme 2024-11-27 17:14:16 -05:00
rollup.config.js Initial commit 2021-12-16 00:55:59 -05:00
tsconfig.json Initial commit 2021-12-16 00:55:59 -05:00
yarn.lock Initial commit 2021-12-16 00:55:59 -05:00

UPDATE

This project no longer works due to the NYT changing their recipes accessibility. You can no longer webscrape their recieps

I left an output of the webscraper in this repository, which, only contains meta data used to calculate the total caloric value, and no copyrighted material.

Recipes

Demonstration project written in svelte with NIM,TS and JS

the usual startup

npm install

We also require nim <=1.6.0, python <= 3.4, nimpy, textblob, and spaCy

#debian apt-like package managers
sudo apt-get install nim
#arch, Pacman-like package managers
sudo pacman -S nim
#void linux
xbps-install nim
nimble install nimpy
pip3 install textblob spacy
./NimRecipe/compile.sh

Building the dataset:

run NimRecipe and it will crawl the new york time servers; compiling a unprocessed Recipe dataset which will be saved for processing in ColdFusionlib; which will ping the https://www.foodrepo.org servers. You must have a token, put it in NimRecipe/token.txt. After that, you can compile it by running ColdFusion; coincidentally it also runs the server which updates electron upon reload.

There is no ID system so small packets cannot be sent, it will transmit the full data, which can be quite big; good thing its not over the internet. This, if you harddrive or ssd is on its last life might cause damage so this is a pretty big todo for me.

Electron:

The git include has a working dataset so there is no real need to make your own. It will probably identical or near identical to the one provided.

CC0 1.0 (Public Domain)