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 save file #1

Closed
wants to merge 2 commits into from
Closed

Conversation

REALERvolker1
Copy link

This pull request adds an "auto-save" feature for each run. The intent is for this to autostart and run in the background while a user uses their computer, providing an easier way to view this information.

The file is saved in $XDG_CONFIG_HOME/scusage.txt

Also this is my first pull request ever :D Please consider.

@tobi-wan-kenobi
Copy link
Owner

Thank you very much for your contribution!

I am very happy that you feel this is the right project for your first PR :)

I have 2 really minor suggestions:

  1. I think it would be nice to have that as an optional parameter (--output?)
  2. If scusage will get other fies in the future,having XDG_HOME/scusage/result as default output might be better (or just specify the destination in the CLI parameter)

What are your thoughts on this?

@REALERvolker1
Copy link
Author

Those are great ideas!

I will also check out maybe making that file a consolidated list so people don't have to scroll through each session

@tobi-wan-kenobi
Copy link
Owner

Nice! If you go in that direction, I would recommend to split data and representation. For example, I would store the raw data (command distribution) in a JSON file that can be "resumed" and do the output formatting on demand with scusage.

tobi-wan-kenobi added a commit that referenced this pull request Sep 22, 2022
add 2 parameters:
- --file/-f to store the output in a JSON file (directories are
  automatically created)
- --resume to resume statistics from a JSON file previously written with
  -f

see #1
@tobi-wan-kenobi
Copy link
Owner

FYI: I did a "proof of concept" implementation on a separate branch (1-save-resume), if you are interested @REALERvolker1 .

Unfortunately, I have not been able to test it at all, since I just re-installed my system to play around with wayland and sway :P

@REALERvolker1
Copy link
Author

Do you have discord by any chance? Mine is volker1#0001. I have some other ideas I would like to talk to you about.

@tobi-wan-kenobi
Copy link
Owner

Hi,

I am really sorry, but I don't have any "real time" channel, mostly because my github projects are purely in my spare time, and that is quite the scarce resource :(

Also, I think for a community project, it makes sense to publicly track ideas in an issue tracker. Hope that is still fine for you, I am very interested in your ideas!

@tobi-wan-kenobi
Copy link
Owner

@REALERvolker1 do the changes work for you? if so, i will go ahead and merge them to main.

thanks!

@REALERvolker1
Copy link
Author

Hello, sorry for the extremely late reply, I had some irl stuff to do. As for testing this, I have yet to do that. It is a lot more polished than my implementation.

@tobi-wan-kenobi
Copy link
Owner

no worries, there's no hurry to this.

thank you and all the best!

@tobi-wan-kenobi
Copy link
Owner

fixed in #2

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

Successfully merging this pull request may close these issues.

2 participants