Skip to content

Commit

Permalink
icm ls: initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Jun 19, 2024
1 parent 86fb652 commit 297fb5a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions icm/commands/cmd_ls.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
"""List installed collections command"""

import click
from icm.commons import commons


def main():
"""ENTRY POINT: List collections"""

print()

# -- Get context information
ctx = commons.Context()
folders = commons.Folders()

# -- Header
print()
click.secho(ctx.line, fg="blue")
click.secho("INSTALLED COLLECTIONS", fg="blue")
click.secho(ctx.line, fg="blue")

# -- Get a list with all the collections (folders)
list_col = [
file.name for file in folders.collections.glob("*") if file.is_dir()
Expand All @@ -21,4 +27,4 @@ def main():

# -- Print all the available collections
for colection in list_col:
print(f"* {colection}")
click.secho(f" {colection}", fg="blue")

0 comments on commit 297fb5a

Please sign in to comment.