chavoosh / ndn-mongo-fileserver

An NDN fileserver based on MongoDB
GNU General Public License v3.0
5 stars 2 forks source link

arrange-data.py supports auto completion in input #6

Closed chavoosh closed 4 years ago

chavoosh commented 4 years ago

To improve user experience, arrange-data.py script needs to support the auto-completion feature for the input date. The script should adjust the output based on the input, then.

Example: Available date and times:

Jan/10/2020 05:30:01
Jan/10/2020 06:30:01
Jan/10/2020 07:30:01
Jan/12/2020 13:00:40

Input:

> J <tab>  ==> Jan/1
> j <tabl>  ==> Jan/1
> jan/12 <tab> ==> Jan/12/2020 13:00:40
> jan/10 <tab> ==> Jan/10/2020/0
> jan/10/2020 05 <tab> ==> Jan/10/2020/05:30:01
> jan/10/2020 05:3 <tab> ==> Jan/10/2020/05:30:01
> Feb <tab> ==> Feb

> j <enter>  ==> include all sessions
> J <enter> ==> inlcude all sessions
> jan/10 <enter> ==> include 3 sessions from Jan/10
wenkaizheng commented 4 years ago

Is this auto-completion just support one date input? What about two date inputs just like jan/12/2020 0:0:0 - jan/12/2020 23:59:59?

chavoosh commented 4 years ago

In the input asks first for the start date (i.e., from) and then ending date (i.e., to). Then for each date support auto-completion

Example:

>> Start date/time:
2020/1/23 10:05:01
>> End data/time:
2020/2/01 10:05:01

If start date was blank, use the earliest available time in the log file. If the end date was blank, use the latest available time in the log file.