OSB-AI / scripts /osb-docs-parser /generate-single-md.sh
sanjayankur31's picture
feat: add scripts to generate osb-docs stores
bbaad3d verified
Raw History Blame Contribute Delete
677 Bytes
#!/bin/bash
# Copyright 2025 Ankur Sinha
# Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com>
# File : data/scripts/generate-single-osb-md.sh
#
#git clone --depth 1 https://github.com/OpenSourceBrain/Documentation.git osb-docs
echo "Generating bibs"
find . -name "*.bib" -type f -execdir bash -c '
for file; do
pandoc "$file" --citeproc -t markdown_strict -o "${file%.bib}.md"
done
' bash {} +
python3 jupyterbook2singlemd.py "osb-docs/source"
mv -v single-page-markdown.md osb-docs-single-page.md
mv -v url-map.json osb-docs-single-page-url-map.json
echo "Please delete the osb-docs folder and copy the generated file over to the data/files folder"