Skip to content

Commit

Permalink
Fix the notice screen
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Lee <[email protected]>
  • Loading branch information
Ethan Lee committed Nov 13, 2024
1 parent 5c45003 commit 1ac65fd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/fosslight_binary/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@
_PKG_NAME = "fosslight_binary"


def get_terminal_size():
size = shutil.get_terminal_size()
return size.lines


def paginate_file(file_path): #, lines_per_page=25):
lines_per_page = get_terminal_size() - 1
with open(file_path, 'r') as file:
lines = file.readlines()

for i in range(0, len(lines), lines_per_page):
os.system('clear' if os.name == 'posix' else 'cls')
print(''.join(lines[i: i + lines_per_page]))
if i + lines_per_page < len(lines):
input("Press Enter to see the next page...")


def main():
global windows
path_to_find_bin = ""
Expand Down

0 comments on commit 1ac65fd

Please sign in to comment.