File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 88
99import ica
1010
11- # The maximum number of most frequent emojis to output in the table
12- EMOJI_DISPLAY_COUNT = 10
13-
1411
1512def get_emoji_list () -> list [str ]:
1613 """
@@ -28,7 +25,14 @@ def main() -> None:
2825 Generates count data for the top 10 most frequently used emojis across the
2926 entire conversation
3027 """
31- cli_args = ica .get_cli_parser ().parse_args ()
28+ cli_parser = ica .get_cli_parser ()
29+ cli_parser .add_argument (
30+ "--result-count" ,
31+ type = int ,
32+ default = 10 ,
33+ help = "the number of emoji results to rank" ,
34+ )
35+ cli_args = cli_parser .parse_args ()
3236 dfs = ica .get_dataframes (
3337 contact_name = cli_args .contact_name ,
3438 timezone = cli_args .timezone ,
@@ -50,7 +54,7 @@ def main() -> None:
5054 pd .DataFrame ({"emoji" : matches .value_counts ()})
5155 .rename ({"emoji" : "count" }, axis = "columns" )
5256 .rename_axis ("emoji" , axis = "index" )
53- .head (EMOJI_DISPLAY_COUNT )
57+ .head (cli_args . result_count )
5458 ),
5559 format = cli_args .format ,
5660 output = cli_args .output ,
You can’t perform that action at this time.
0 commit comments