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 more real-world examples #37

Open
suaviloquence opened this issue Oct 11, 2024 · 0 comments
Open

add more real-world examples #37

suaviloquence opened this issue Oct 11, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@suaviloquence
Copy link
Owner

Get a good example of a scrapelect program. It would be helpful if it helped showcase a certain feature, but all examples are welcome.

  1. Find a problem that a scrapelect .scrp can solve, and create this scrp.
  1. Check in the .scrp file in the examples/scrps directory, and leave a comment for what URL it's running on.
  2. Consider adding an integration test in src/interpreter/mod.rs if it doesn't require an internet connection
  • add the HTML file in examples/inputs with the same name as the .scrp file
  • add it to the integration_test! macro at the bottom of src/interpreter/mod.rs
  • run cargo test (it should fail) and use cargo insta to update the snapshot in the examples/output directory (or move the .snap.new to .snap once it looks good) -- and check this file into git
  1. If it does require an internet connection (I want to improve this infrastructure), add a comment at the top of the file with the URL

Submit a pull request! 🐱

@suaviloquence suaviloquence added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant