Skip to content

Aivean/royalroad-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Royal Road book downloader

A simple command line tool that downloads fiction from Royal Road as html. Use Calibre to convert html to any desired format.

test Github All Releases GitHub last commit License: MIT

How to use

  • download the latest release .jar
  • install the latest java (maybe you have one, check by executing java -version)
  • execute java -jar royalroad-downloader-assembly-VERSION.jar https://royalroadl.com/fiction/... (replace royalroad fiction URL with your link and VERSION with the corresponding number)
  • the output html file will be created in the current directory

Run java -jar royalroad-downloader-assembly-VERSION.jar --help to see the full usage reference.

Troubleshooting

It may happen that RoyalRoad changes its html format and this parser is no longer working. In that case please create an issue. You may also try to work around the problem by overriding CSS selectors that are used to fetch chapter title and body by supplying -t and -b program arguments.

Default css selectors are:

  • title for the title
  • div.chapter-content for the chapter body

Run the program with --help argument to see the usage reference.

Building from sources

  • run sbt/sbt assembly in the project directory

Note: build tested to work only with Java 8 (will probably fail on other versions).

Running from sources

  • run sbt/sbt --error 'run <arguments>' in project directory, i.e.:

      sbt/sbt --error 'run --help'
    

Credits