Royal Road book downloader
Nothing fancy, just a simple CLI that imports fiction from Royal Road as html. Use something like Calibre to convert html to any desired format.
- download latest release .jar
- install latest java (maybe you have one, check by executing
java -version
) - execute
java -jar royalroad-downloader-assembly-VERSION.jar http://royalroadl.com/fiction/xxxx
(replaceVERSION
andxxxx
with corresponding numbers) - output html file will be created in current directory
-
It may happen that RoyalRoad changes it's html format and this parser is no longer working. In such case please create an issue. You also can try to work around the problem by overriding CSS selectors that are used to fetch chapter title and body using
-t
and-b
program arguments.Default css selectors are:
title
for titlediv.chapter-content
for chapter body
Run the program with
--help
argument to see usage reference. -
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
This may happen on large books. The solution is to give JVM more memory by setting-Xmx
flag:java -Xmx2G -jar ...
- run
sbt/sbt assembly
in project directory
-
run
sbt/sbt --error 'run <arguments>'
in project directory, i.e.:sbt/sbt --error 'run --help'