!pip install -U Sphinx # import sys # sys.path.append("/content/drive/MyDrive") # import mykeys # project_name = "4CED0278" # path = "/content/" + project_name # !mkdir "{path}" # %cd "{path}" # import sys # sys.path.append(path) # !git config --global user.email "" # !git config --global user.name "sparsh-ai" # !git init # !git remote add origin2 https://"{mykeys.git_token}":x-oauth-basic@github.com/sparsh-ai/"{project_name}".git # !git pull origin2 master !sphinx-quickstart !pip install -q sphinx-rtd-theme %%writefile conf.py project = 'MovieLens Recommender System' copyright = '2021, Sparsh Agarwal' author = 'Sparsh Agarwal' release = '1.0.0' extensions = ['sphinx.ext.autodoc', 'nbsphinx', 'sphinx.ext.mathjax', 'sphinx.ext.githubpages', 'IPython.sphinxext.ipython_console_highlighting', 'rst2pdf.pdfbuilder' ] source_suffix = ['.rst', '.ipynb'] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] master_doc = 'index' pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Sparsh Agarwal'),] import os import sys sys.path.insert(0, os.path.abspath('.')) !pip install sphinx !pip install nbconvert !pip install pandoc !pip install latex !pip install nbsphinx !cp "/content/drive/MyDrive/Colab Notebooks/tutorial_temp.ipynb" . # !mkdir documentation !rm -r ./documentation %%writefile index.rst .. MovieLens Recommender System documentation master file, created by sphinx-quickstart on Tue Jan 12 17:48:52 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to MovieLens Recommender System's documentation! ======================================================== .. toctree:: :maxdepth: 2 :caption: Contents: tutorial_temp Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` %%writefile readthedocs.yml # python version python: version: 3.8 method: pip install: - requirements: requirements.txt # build a PDF formats: - none sphinx: configuration: conf.py %%writefile requirements.txt python==3.8 pandoc nbformat jupyter_client ipython nbconvert sphinx>=1.5.1 ipykernel sphinx_rtd_theme nbsphinx # !sphinx-build -b pdf . build/pdf # !make html # !git checkout -b sphinx !git add . !git commit -m 'commit' !git push origin2 sphinx !pip install -q rst2pdf