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

Small extra hint for beginners #813

Open
vegardjervell opened this issue Mar 1, 2024 · 2 comments
Open

Small extra hint for beginners #813

vegardjervell opened this issue Mar 1, 2024 · 2 comments

Comments

@vegardjervell
Copy link

Hey, first of all I want to say that this is a great tool!

However, I'm struggling to understand how to use the scripts provided in the README, and as of now I'm confined to writing bash scripts with an unholy amount of arguments being passed to htmlproofer (I'm very thankful that the CLI program exists). What I'm struggling with is specifically understanding the lines

  1. Create a new instance of the HTMLProofer on your output folder.
  2. Call proofer.run on that path.

If the guide could contain a slightly more verbose explanation of what is meant by that, perhaps with a snippet of what I should be doing to create and run the file from a terminal, that would be of great help.

Thanks again for a very helpful tool!

@gjtorikian
Copy link
Owner

The lines you’ve quoted are for using this library in a Ruby program. The steps for using the CLI is here.

If that’s not helpful—if you can give me more information on your scenario (“I want to write a bash script using htmlproofer that does…”), I can write better docs around it!

@vegardjervell
Copy link
Author

vegardjervell commented Mar 1, 2024

Thanks for your quick reply! I think the guide for the CLI tool, and the --help docs are good already, that's what I've been using so far.

I was suspecting that it was Ruby, and I'm just getting into the basics of Ruby now after getting confirmation from you :) my goal is to be able to use HTMLProofer without needing bash scripts for everything. I just think it would be helpful to clearly state in the guide how you would proceed with creating and running the script. Something like

# I don't know if this would be correct
touch htmlproofer_demo.rb
# ... Write contents of the file ...
ruby htmlproofer_demo.rb

I think the barrier to entry could be lowered a bit by something like that. After all, this is a tool that can be very useful for people who know next-to-nothing about Ruby and just need to put together some basic scripts (which is a nice excuse to start learning Ruby as well).

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