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

Add a functionality for when last accessed date and time is for a played file logged in history #50

Open
Kayizoku opened this issue Jul 6, 2022 · 6 comments

Comments

@Kayizoku
Copy link

Kayizoku commented Jul 6, 2022

The title is self-explanatory. I want to know when I accessed a file last time. Thought it would be another cool addition to an already great script set

@Kayizoku Kayizoku changed the title Add function for when last accessed date and time is for a played file Add a functionality for when last accessed date and time is for a played file logged in history Jul 6, 2022
@Eisa01
Copy link
Owner

Eisa01 commented Aug 10, 2022

I believe giving users customization options of how the list is displayed will solve this issue (similar to heading customization options).
It is a lot of work to provide these options, perhaps one day when I am working on doing major update for LogManager inside the scripts.

@Kayizoku
Copy link
Author

Yup, my thoughts exactly. So take your time. I'll be looking forward to all future updates :)

Eisa01 added a commit that referenced this issue Nov 18, 2022
Well, this is basically 1.3.0 beta. Too many improvements and backend changes. 
Users are required to update their conf file.

Changes:
added option to parse items list so that we can modify it however we want with tons of variables, e.g.: %number%. %name% instead of only modifying through pre-defined options
added option to create and define variables for parse_list and parse_header
added option to show date in the the list using any format as per lua documentation. targetting #50
added 'local' option for file_title_logging and made 'all' as the default since we can utilize the file title better now thanks to parsing list items
added backward compatibility for reading the log file for dates that cannot be parsed and improved error handling. closes #58
improved search_behavior to support parsed dates and groups
improved read_log_table so that now the title and the name are always presented correctly
fixed list not displaying properly when path or name include special characters using a new function closes #51 and #52
removed most list settings that are no longer relevant because user can parse our own list now
removed the option customize the date logging method and made a fixed format (YYYY-MM-DDT00:00:00) similar to ISO8601 that could be parsed by the script
removed 'specific' search_behavior since the improved any search is way better
removed prefer_filename_over_title "doesnt seem useful now since we can parse the text and show title whenever we want"
trimmed down useless settings and some unnecessary variables and options
some other bug fixes and hopefully didn't create new bugs o_o
updated description of config to reflect the new changes
@Eisa01
Copy link
Owner

Eisa01 commented Nov 18, 2022

Hi @Kayizoku, the changes are done in 2044e43, however it is for SimpleBookmark, I will later migrate it to the other scripts.

The update is very big, I changed tons of things. Along with the update this issue is resolved, you can add any date format to the list (you must update both lua script and conf).
in list_content_text you can simply add %dt% to add the date and time exactly how it is added.

Very simple example:
list_content_text = '%number%. %dt% %name%%0_duration%%duration%%0_keybind%%keybind%%0_group%%group%%1_group%'

Example utilizing only "dt_"format%"%" (partially backward compatible with old dates saves in log)
list_content_text = '%number%. (%dt_%x% %dt_%H%:%dt_%M%) %name%%0_duration%%duration%%0_keybind%%keybind%%0_group%%group%%1_group%'

Advanced example utilizes both 0_dt variables and %dt_"format%"%. formatting (fully backward compatibile with old date formatting saved in log files)

list_content_text = '%number%.%0_dt%%dt_%x%%1_dt%%dt_%H%%2_dt%%dt_%M%%3_dt% %path%%0_duration%%duration%%0_keybind%%keybind%%0_group%%group%%1_group%'

list_content_variables=[ ["0_duration", " 🕒 "], ["0_keybind", " ⌨ "], ["0_group", " 🖿 "], ["0_dt", " ("], ["1_dt", " "], ["2_dt", ":"], ["3_dt", ")"] ]

Play around with this update, let me know your feedback

@Kayizoku
Copy link
Author

Kayizoku commented Nov 20, 2022

There are aspects that works for me and others that don't.

Here are bookmarks that have been untouched since last update. I didn't try to bookmark them again.

image

However, here's one item I tried to bookmark again, as you can see it messes up the date and gives some weird values while excluding day.

image

For some reason, this only happens after I have "%dt%" variable in the list_content_text. it won't retain the proper values for new items that are bookmarked. But the old ones are shown properly with the day and date. In any case, I appreciate implementing this, it really enrichens my experience with SimpleBookmark and I cannot wait to see it with the other scripts as well.

@Eisa01
Copy link
Owner

Eisa01 commented Nov 20, 2022

For some reason, this only happens after I have "%dt%" variable in the list_content_text. it won't retain the proper values for new items that are bookmarked. But the old ones are shown properly with the day and date. In any case, I appreciate implementing this, it really enrichens my experience with SimpleBookmark and I cannot wait to see it with the other scripts as well.

Yes, this is the expected behavior, because this is the new format for date (in the log file date is saved like this).
This new format allowed me to create %dt_"format"% variable. So, you can make the date in any format you like. (This is only applicable for dates with the new format).

Try to log many new entries and use the below so you see the difference:
list_content_text = '%number%. (%dt_%x% %dt_%H%:%dt_%M%) %name%%0_duration%%duration%%0_keybind%%keybind%%0_group%%group%%1_group%'

Overall, this is the expected behavior which permits for date format customization.

@Kayizoku
Copy link
Author

Kayizoku commented Nov 20, 2022

Ah, I see, then everything is working as it should, I tried using dt_format and that gave me the desired effect I wanted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants