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

Workflow can be simplified for beginners #21

Open
thekungfuspider opened this issue Mar 3, 2023 · 5 comments
Open

Workflow can be simplified for beginners #21

thekungfuspider opened this issue Mar 3, 2023 · 5 comments

Comments

@thekungfuspider
Copy link
Contributor

thekungfuspider commented Mar 3, 2023

2 issues in focus here:

  • The download+install script always installs all packages in ~/Downloads/logic_content directory instead of mandatory / all - this leads to lower idempotence of the lpx_links utility. I.e. if the user mistakenly runs the aria2 download command for all packages, then runs the download+install script for mandatory packages, the download+install script will install all packages instead of just mandatory. This can be improved.
  • The steps in the README can be condensed to one step if a wrapper script is created, which will solve the above. The proposed wrapper script will encompass the following toggle-able steps:
  1. Generate download links from .plist (lpx_links.rb) --> -gl | --generate-links
  2. Download packages --> -d | --download
  3. Install packages --> -i | --install

If none of these options are provided, the script will execute all 3 steps. If any are provided, only the steps inputted will be executed.

In addition, the wrapper script will accept the following options:
-h | --help
-m | --mandatory-packages (default)
-a | --all-packages

At the end of the day, we'll be able to simplify the README to:

  1. Download aria2
  2. Run the following command to install packages:
# MANDATORY PACKAGES
 cd ~/Downloads; mkdir -p lpx_links/app ; cd lpx_links/app ; curl -#L https://goo.gl/nUrpPi | tar -xzv --strip-components 1 ; sudo ./wrapper_script.sh

# ALL PACKAGES
 cd ~/Downloads; mkdir -p lpx_links/app ; cd lpx_links/app ; curl -#L https://goo.gl/nUrpPi | tar -xzv --strip-components 1 ; sudo ./wrapper_script.sh -a

I'll be working on this tonight / tomorrow evening, @davidteren please let me know your thoughts. If you have concerns about this proposed workflow I'm happy to discuss it further. Thanks!

@thekungfuspider thekungfuspider changed the title Workflow is unclear for beginners Workflow can be simplified for beginners Mar 3, 2023
@davidteren
Copy link
Owner

davidteren commented Mar 4, 2023

@thekungfuspider This is great.
Though I'm not to keen on flags for users who are not familiar with terminal and CLi's.
How about we use basic option menus if no flags are passed. I have made some pseudo examples 

pseudo_lpx_link_options.rb

pseudo_lpx_link_options_spec.rb
The specs don't cover the number options.

What say you?

@thekungfuspider
Copy link
Contributor Author

@davidteren - thanks for the feedback and drawing up that example! I agree with you that for beginners, CLI options can be confusing / not user friendly when troubleshooting. So a prompt based approach might be better, to help beginners modularly use the various features provided. I like the approach you've taken re the defaulting to prompt if no CLI options are provided. An interactive prompt would vastly improve the ease of use. After taking a look I have a couple questions:

  1. Would it be possible to select multiple options at once from this list? For example, let's say the user just wants to download and install. Should the user then be able to select those 2 options, and the script executes as prescribed? Perhaps we can alter the interactive prompt to be staged i.e. ask user if they'd like to generate download links --> ask user if they'd like to download packages --> mandatory only? --> ask user if they'd like to install packages --> mandatory only?
  2. Would having the wrapper script in Ruby vs Bash simplify our development / maintenance of the control flow of this utility in your eyes? It looks pretty clean to me. This is more for my knowledge as I'm relatively new to Ruby and will go with whatever you decide.

@thekungfuspider
Copy link
Contributor Author

@davidteren - bump on this. If the answer is yes to both questions, I'll go ahead and make the change for your review.

@davidteren
Copy link
Owner

@thekungfuspider I've been giving this some thought and have started investigating ways to run this from a UI. 
I think hold off on your efforts for now. I should have time to work on it this week.

@davidteren
Copy link
Owner

@thekungfuspider and other users. I apologize for not making progress with the new version. I'm busy wrapping up at my current job and moving to a new role in the last week of April. I should have more time going forward.

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