Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edits to the README file. #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ClassIterTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ def add_Csv(self):
def read_FileCsv(self, file_csv=""):
""" Create and add data in the .csv file. """
if not file_csv:
file_csv = open('data.csv', 'w')
file_csv = open('d.csv', 'w')
with file_csv:
writer = csv.writer(file_csv)
writer.writerows(self.myDataCsv)
else:
with open(r'data.csv', 'a') as f:
with open(r'd.csv', 'a') as f:
writer = csv.writer(f)
writer.writerow(self.myDataCsv)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To put it into operation you have to follow the steps below:
```
* Analyze a GitHub repository.
```
python3 pycerfl.py repo <name_urlclone>
python3 pycerfl.py repo-url <name_urlclone>
```
* Analyze a GitHub user.
```
Expand Down
18 changes: 17 additions & 1 deletion pycerfl.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,22 @@ def read_File(pos, repo):
print('There is a misspelled code')
pass

def read_FileContents(pos, code, repo):
""" Read the chunk, file and return the tree. """
try:
tree = ast.parse(code)
# print (ast.dump(tree))
iterate_ListContents(tree, pos, repo)
except SyntaxError:
print('There is a misspelled code')
pass

def iterate_ListContents(tree, pos, repo):
""" Iterate list and assign attributes."""
for i in range(0, len(SetClass)):
for j in range(0, len(SetClass[i])):
attrib = SetClass[i][j]
object = IterTree(tree, attrib, pos, repo)

def iterate_List(tree, pos, repo):
""" Iterate list and assign attributes."""
Expand Down Expand Up @@ -229,4 +245,4 @@ def summary_Levels():
sys.exit("Usage: python3 file.py type-option('directory', " +
"'repo-url', 'user') option(directory, url, user)")
choose_option()
summary_Levels()
summary_Levels()
Loading