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.
4.4 KiB
4.4 KiB
<html>
<head>
</head>
</html>
In [2]:
!brew install fetch
!mkdir ../temp
!mkdir ../temp/terraform/docs
!mkdir ../temp/terraform/data
!fetch --branch=master --source-path=/website/docs --repo=https://github.com/hashicorp/terraform ../temp/terraform/docs
!fetch --branch=master --source-path=/website/data --repo=https://github.com/hashicorp/terraform ../temp/terraform/data
%pip install markdown
%pip install python-frontmatter
Running `brew update --auto-update`... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). You have 19 outdated formulae installed. You can upgrade them with brew upgrade or list them with brew outdated. Warning: fetch 0.4.5 is already installed and up-to-date. To reinstall 0.4.5, run: brew reinstall fetch mkdir: cannot create directory ‘../temp’: File exists mkdir: cannot create directory ‘../temp/terraform/docs’: No such file or directory mkdir: cannot create directory ‘../temp/terraform/data’: No such file or directory [fetch] INFO[2022-08-11T01:35:41Z] Downloading latest commit from branch "master" of https://github.com/hashicorp/terraform ... [fetch] INFO[2022-08-11T01:35:42Z] Extracting files from <repo>/website/docs to ../temp/terraform/docs ... [fetch] INFO[2022-08-11T01:35:42Z] 329 files extracted [fetch] INFO[2022-08-11T01:35:42Z] Download and file extraction complete. [fetch] INFO[2022-08-11T01:35:42Z] Downloading latest commit from branch "master" of https://github.com/hashicorp/terraform ... [fetch] INFO[2022-08-11T01:35:43Z] Extracting files from <repo>/website/data to ../temp/terraform/data ... [fetch] INFO[2022-08-11T01:35:43Z] 5 files extracted [fetch] INFO[2022-08-11T01:35:43Z] Download and file extraction complete. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: markdown in /home/donaldrich/.local/lib/python3.10/site-packages (3.4.1) Note: you may need to restart the kernel to use updated packages. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: python-frontmatter in /home/donaldrich/.local/lib/python3.10/site-packages (1.0.0) Requirement already satisfied: PyYAML in /home/donaldrich/.local/lib/python3.10/site-packages (from python-frontmatter) (5.1) Note: you may need to restart the kernel to use updated packages.
In [3]:
import os
dir = os.listdir("../temp/terraform")
print(dir)
['data', 'docs']