File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
3+ from exercise_utils .file import create_or_update_file , append_to_file
4+ from exercise_utils .git import add , init , commit
5+
6+ __requires_git__ = True
7+ __requires_github__ = False
8+
9+
10+ def download (verbose : bool ):
11+ os .makedirs ("employees" )
12+ os .chdir ("employees" )
13+ init (verbose )
14+
15+ create_or_update_file (
16+ "list.txt" ,
17+ """
18+ Andy Bernard
19+ """ ,
20+ )
21+ os .makedirs ("andy" )
22+ create_or_update_file (
23+ "andy/history.txt" ,
24+ """
25+ Previously in Stamford branch
26+ """ ,
27+ )
28+ add (["." ], verbose )
29+ commit ("Add Andy" , verbose )
30+
31+ append_to_file (
32+ "list.txt" ,
33+ """
34+ Pam Beesly
35+ """ ,
36+ )
37+ add (["." ], verbose )
38+ commit ("Add Pam" , verbose )
39+
40+ append_to_file (
41+ "list.txt" ,
42+ """
43+ Kevin Malone
44+ """ ,
45+ )
46+ add (["." ], verbose )
47+
48+ append_to_file (
49+ "list.txt" ,
50+ """
51+ Jim Halpert
52+ """ ,
53+ )
54+ append_to_file (
55+ "andy/history.txt" ,
56+ """
57+ Education: Cornell
58+ """ ,
59+ )
You can’t perform that action at this time.
0 commit comments