I challenged Jason Clark, a Java expert, to fetch and parse page json. He wrote a demonstration using modern http and object mapping libraries. json
github ![]()
Jason had recently published on rigorous Java coding practices so my challenge to read wiki's dynamic data would count at "Nerd Sniping". book
xkcd ![]()
readme
# fedwiki-java Very basics of reading a FedWiki page from Java. Uses the Jackson library for JSON (locally downloaded jars) and the built-in HttpClient from JDK 11+. To run locally: ``` java \ -cp jackson-core-2.14.2.jar:\ jackson-annotations-2.14.2.jar:\ jackson-databind-2.14.2.jar \ Main.java ``` This will output a cryptic looking object output but it's a start.
.
This is slowly evolving to be something possibly useful. We've extended the main to read commands from input and perform increasingly challenging traversals. github ![]()
pages/federation-browser-in-java
- __next__ sequence through the items of the current page. - __test *word*__ confirm that *word* is present in current item. - __find *word*__ advance through items until *word* is found. - __link__ resume following the first link in the current item. - __back *word*__ backup lineup to page with *word* in title. - __exit__ stop command execution and exit main.
We use this input.txt for our test.
http://ward.dojo.fed.wiki/assets/pages/federation-browser-in-java/input.txt HEIGHT 200
You can follow along starting at Welcome Visitors.
http://ward.dojo.fed.wiki/assets/pages/federation-browser-in-java/color.html HEIGHT 900