Skip to content

jam-jar-binks/royalroad-downloader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

How to use

  • 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 (replace VERSION and xxxx with corresponding numbers)
  • output html file will be created in current directory

Troubleshooting

  1. 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 title
    • div.chapter-content for chapter body

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

  2. 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 ...
    

Building from sources

  • run sbt/sbt assembly in project directory

Running from sources

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

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

Credits

Packages

No packages published

Languages

  • Scala 60.7%
  • Python 37.4%
  • Shell 1.9%