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

Docs mention how to run examples but that doesn't work any longer #1702

Open
sebkur opened this issue Jan 3, 2022 · 2 comments
Open

Docs mention how to run examples but that doesn't work any longer #1702

sebkur opened this issue Jan 3, 2022 · 2 comments

Comments

@sebkur
Copy link
Contributor

sebkur commented Jan 3, 2022

I just noticed that in https://github.com/jhy/jsoup/blob/master/src/main/java/org/jsoup/examples/HtmlToPlainText.java#L24
we still say that it'd be possible to run the example like this:

java -cp jsoup.jar org.jsoup.examples.HtmlToPlainText url

while that isn't true anymore and I think I'm responsible due to #700

I'm wondering if we might want do move the example code into a separate module within the repository and add what's necessary to be able to run the examples somehow when one has cloned the sources locally?

I'm not an expert on how to do that with Maven (always using Gradle...) but could dig into it if you're interested in such a contribution.

Otherwise I have set up a standalone version of the examples here: https://github.com/sebkur/jsoup-examples. I guess having some separate repository for examples could also be a sensible approach, what do you think? Maybe it even inspires others to contribute more examples.

@ray-vgw
Copy link

ray-vgw commented Mar 6, 2022

Could we do a short-term revert? We are upgrading to newer versions of JSoup and the HtmlToPlainText example is used in our code base and no longer compiles

@sebkur
Copy link
Contributor Author

sebkur commented Mar 7, 2022

Hmm, I don't think the example code should be used in any code base outside this project. It's not really part of the public API, at least that's how I see it. I think a good solution here is to just copy the source code of that class into your project and potentially improve it and adapt it to your needs.

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