Notebooks >> Scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

119 lines
4.4 KiB

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"!git clone https://github.com/hashicorp/terraform.git\n",
"\n",
"https://github.com/antonbabenko/terraform-best-practices.git\n",
"\n",
"https://github.com/hashicorp/terraform-guides.git"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Running `brew update --auto-update`...\n",
"\u001b[34m==>\u001b[0m \u001b[1mAuto-updated Homebrew!\u001b[0m\n",
"Updated 1 tap (homebrew/core).\n",
"\n",
"You have \u001b[1m19\u001b[0m outdated formulae installed.\n",
"You can upgrade them with \u001b[1mbrew upgrade\u001b[0m\n",
"or list them with \u001b[1mbrew outdated\u001b[0m.\n",
"\n",
"\u001b[33mWarning:\u001b[0m fetch 0.4.5 is already installed and up-to-date.\n",
"To reinstall 0.4.5, run:\n",
" brew reinstall fetch\n",
"mkdir: cannot create directory ‘../temp’: File exists\n",
"mkdir: cannot create directory ‘../temp/terraform/docs’: No such file or directory\n",
"mkdir: cannot create directory ‘../temp/terraform/data’: No such file or directory\n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:41Z] Downloading latest commit from branch \"master\" of https://github.com/hashicorp/terraform ... \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:42Z] Extracting files from <repo>/website/docs to ../temp/terraform/docs ... \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:42Z] 329 files extracted \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:42Z] Download and file extraction complete. \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:42Z] Downloading latest commit from branch \"master\" of https://github.com/hashicorp/terraform ... \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:43Z] Extracting files from <repo>/website/data to ../temp/terraform/data ... \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:43Z] 5 files extracted \n",
"[fetch] \u001b[36mINFO\u001b[0m[2022-08-11T01:35:43Z] Download and file extraction complete. \n",
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: markdown in /home/donaldrich/.local/lib/python3.10/site-packages (3.4.1)\n",
"Note: you may need to restart the kernel to use updated packages.\n",
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: python-frontmatter in /home/donaldrich/.local/lib/python3.10/site-packages (1.0.0)\n",
"Requirement already satisfied: PyYAML in /home/donaldrich/.local/lib/python3.10/site-packages (from python-frontmatter) (5.1)\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"!brew install fetch\n",
"\n",
"!mkdir ../temp\n",
"!mkdir ../temp/terraform/docs\n",
"!mkdir ../temp/terraform/data\n",
"\n",
"!fetch --branch=master --source-path=/website/docs --repo=https://github.com/hashicorp/terraform ../temp/terraform/docs\n",
"!fetch --branch=master --source-path=/website/data --repo=https://github.com/hashicorp/terraform ../temp/terraform/data\n",
"\n",
"\n",
"%pip install markdown\n",
"%pip install python-frontmatter"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['data', 'docs']\n"
]
}
],
"source": [
"import os\n",
"\n",
"dir = os.listdir(\"../temp/terraform\")\n",
"\n",
"print(dir)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}