omigroup / omi-archive

Archiving and transforming community documentation notes into a memex
https://omigroup.github.io/omi-archive/
4 stars 2 forks source link

Fetching markdown files programmatically #4

Open madjin opened 1 year ago

madjin commented 1 year ago

Idea: use github api to recursively search responses for markdown files

we usually keep everything here: https://api.github.com/repos/omigroup/gltf-extensions/contents/extensions/2.0?ref=main

example download url: https://raw.githubusercontent.com/omigroup/gltf-extensions/main/extensions/2.0/KHR_audio/README.md

another way is to just clone the repo and grab / convert the markdown files this way

npm install mdpdf -g git clone mkdir docs find extensions/ -name ".md" -exec bash -c 'mkdir -p docs/"$(dirname "{}")" && mv "{}" docs/"{}"' \; find ./extensions -iname ".md" -exec mdpdf '{}' \;

then clean up

this would be useful then to convert to pdf and use in gpt4 langchain stuff: https://github.com/mayooear/gpt4-pdf-chatbot-langchain

madjin commented 1 year ago

for now I added direct links to the raw markdown files hosted on github in txt files