html

jsoup worked well as a way to modifying HTML content using Scala alvin October 29, 2017 - 4:22pm

I’ve used HtmlCleaner many times before to read/parse HTML content, but jsoup worked well today as a way to modify HTML content using Scala.

A Scala shell script to read HTML H1 tag attributes alvin October 20, 2017 - 3:14am

I’m putting this Scala shell script out here as a “source code snippet” so I can find it again if I need it. This file reads an input file that contains a series of HTML <h1> tags. I use this as part of a process of publishing an Amazon Kindle ebook from an HTML file, and in one of the steps of the creation process, I use this script to help create the Table of Contents (TOC) for the book.

Here’s the source code:

ScalaJ-HTTP examples: GET, POST, handling redirects

Table of Contents1 - Handling redirect requests with ScalaJ-HTTP2 - ScalaJ-HTTP GET request example3 - Setting ScalaJ-HTTP timeout values4 - A ScalaJ-HTTP POST request example5 - ScalaJ-HTTP: Summary

If you ever need some good ScalaJ-HTTP examples, see the test files in the project, including this HttpBinTest.scala file. That file currently shows a number of good ScalaJ-HTTP examples, including GET, POST, redirect examples with Scala.

See that page for a full list of examples, but for my own use, here are a few of them.