NAME
EBook::Gutenberg::Get - Fetch ebooks from Project Gutenberg
SYNOPSIS
use EBook::Gutenberg::Get;
my $ebook = gutenberg_get($id);
DESCRIPTION
EBook::Gutenberg::Get is a module that provides some subroutines related to downloading ebooks from Project Gutenberg. This is developer documentation, for gutenberg user documentation you should consult its manual.
Note that this module is not designed to perform bulk downloading/scraping. Attempting to use this module to do so may result in Project Gutenberg banning you from their site. You have been warned.
SUBROUTINES
The following subroutines are exported by EBook::Gutenberg::Get automatically.
- $get = gutenberg_get($id, [\%param])
-
Fetches an ebook from Project Gutenberg.
$idis the ID of the ebook to fetch.\%paramsis a hash ref of extra parameters to configure the download process.The following are valid parameters:
- $link = gutenberg_link($id, $fmt)
-
Returns the download link of an ebook.
$idis the ID of the ebook.$fmtis the ebook format.
GLOBAL VARIABLES
- %EBook::Gutenberg::FORMATS
-
Hash of valid ebook formats and a hash ref of some format data. See the documentation for
fmtingutenberg_getfor a list of ebook formats.The format hash ref has this format:
- link
-
Subroutine reference that, when given an ebook ID, returns a download link to that ebook.
- suffix
-
The default file suffix to use with the format.
AUTHOR
Written by Samuel Young, <samyoung12788@gmail.com>.
This project's source can be found on its Codeberg page. Comments and pull requests are welcome!
COPYRIGHT
Copyright (C) 2025 Samuel Young
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.