Skip to content

Add command line args - #6

Open
ConniBug wants to merge 5 commits into
semissioncontrol:developmentfrom
ConniBug:development
Open

Add command line args#6
ConniBug wants to merge 5 commits into
semissioncontrol:developmentfrom
ConniBug:development

Conversation

@ConniBug

@ConniBug ConniBug commented Nov 3, 2020

Copy link
Copy Markdown

Added the abilty to parse custom command line args

Added the comand line arg -t

You can now run
./main -t 1000

and it will wait 1000ms (1 second) after each check on the dir

@ConniBug ConniBug changed the title Update main.rs Add command line args Nov 3, 2020
@bobbbay

bobbbay commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

@ConniTheKiwi Cool! Although, I had originally asked for -t 1000 to run the script for 1 second, not have timing between the script.

@ConniBug

ConniBug commented Nov 3, 2020

Copy link
Copy Markdown
Author

Ah i seem to have missunderstood, shouldnt be to hard to implement a timer

@bobbbay

bobbbay commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

fixes #5

@bobbbay bobbbay linked an issue Nov 3, 2020 that may be closed by this pull request
-t <time ms> 
will run only for this set amount of time
@ConniBug

ConniBug commented Nov 5, 2020

Copy link
Copy Markdown
Author

I believe this is what you requested?

-m <sub dir name>
-m os
checks /semc/logger/os

@bobbbay bobbbay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some generic code reviews - let's see how much this one helps! Cheers 😉

Comment thread src/main.rs Outdated
Comment thread src/main.rs Outdated
Comment thread src/main.rs
Comment thread src/main.rs Outdated
Comment thread src/main.rs Outdated
@ConniBug

ConniBug commented Nov 5, 2020

Copy link
Copy Markdown
Author

Yeh i totally agree with what you have said in this review!,
i dont know a lot about the rust language btw so i had to google a few things to be able to implement them so that why some of the var names are terrible. ill fix it up based on your review

Made error messages more appropriate and understandable
@ConniBug

ConniBug commented Nov 5, 2020

Copy link
Copy Markdown
Author

Ill resolve the switch issue later on as im on mobile currently lol

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.

Allow command line arguments

2 participants