Skip to content

Commit

Permalink
fix things from review №6
Browse files Browse the repository at this point in the history
  • Loading branch information
bleudev committed Jun 29, 2024
1 parent edd5dfb commit 5839eaa
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions examples/github/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ from ufpy import UGithubDownloader, download_file, download_folder, download_rep
To open this class, you should use the `with` operator as you do with files and other resources:
```python
with UGithubDownloader("honey-team/ufpy", "C:/Ufpy-Test", "0.1") as gd:
# First argument - "repository owner"/"repository name"
# Second - Base download path (all methods use download paths relative to the base download path, similar to how it works in the command line.
# First argument: "repository owner"/"repository name"
# Second: Base download path (all methods use download paths relative to the base download path, similar to how it works in the command line.
# For example: base path: C:\; cd ufpy -> final path: C:\ufpy.) (default is the current working directory)
# Third argument: Branch or tag name (default is "main" (not master!))
gd.download_repo() # In C:/Ufpy-Test will appear all files from 0.1 tag in this repository.
gd.download_repo("ufpy-0.1") # In C:/Ufpy-Test/ufpy-0.1 will appear all files from 0.1 tag in this repository
gd.download_repo() # All files from the 0.1 tag in this repository will appear in C:/Ufpy-Test.
```

## Download file(s)
Expand All @@ -49,7 +48,7 @@ with UGithubDownloader("honey-team/ufpy", "C:/Users/<name>/ufpy-tests") as gd:
gd.download_file("README.md") # Same
```

After changing `<name>` to your username and running this code you'll get this:
After changing `<name>` to your username and running this code you'll get the following result:
![Download one file](.assets/download1.png)

Two files:
Expand All @@ -61,7 +60,7 @@ with UGithubDownloader("honey-team/ufpy", "C:/Users/<name>/ufpy-tests") as gd:
gd.download_files(["README.md", "mkdocs.yml"]) # Same
```

After changing `<name>` to your username and running this code you'll get this:
After changing `<name>` to your username and running this code you'll get the following result:
![Download two files](.assets/download2.png)

## Download folder(s)
Expand All @@ -83,7 +82,7 @@ with UGithubDownloader("honey-team/ufpy", "C:/Users/<name>/ufpy-tests") as gd:
gd.download_folder("examples") # Same
```

After changing `<name>` to your username and running this code you'll get this:
After changing `<name>` to your username and running this code you'll get the following result:
![Download one folder](.assets/download3.png)

Two folders:
Expand All @@ -96,7 +95,7 @@ with UGithubDownloader("honey-team/ufpy", "C:/Users/<name>/ufpy-tests") as gd:
gd.download_folders(["examples", ".github"]) # Same
```

After changing `<name>` to your username and running this code you'll get this:
After changing `<name>` to your username and running this code you'll get the following result:
![Download two folders](.assets/download4.png)

## Download all repository
Expand All @@ -112,7 +111,7 @@ with UGithubDownloader("honey-team/ufpy", "C:/Users/<name>/ufpy-tests") as gd:
gd.download_repo() # Same
```

After changing `<name>` to your username and running this code you'll get this:
After changing `<name>` to your username and running this code you'll get the following result:

> [!NOTE]
> The repository code shown reflects the state before merging pull request
Expand Down

0 comments on commit 5839eaa

Please sign in to comment.