| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
If they are ever needed again, they can be added back.
Also set API endpoints fields to Url type instead of String.
|
| |
|
|
|
| |
This allows running the program from anywhere, given the cookies are
placed in the config dir.
|
| | |
|
| |
|
|
| |
The main purpose for now is to add the description.
|
| |
|
|
|
|
|
|
| |
This provides standard locations for files regardless of the location of
the binary and/or the working directory.
Could allow some customization in the future, both as a permanent config
or one-time case.
|
| |
|
|
|
| |
This makes it easier to identify diff lines caused by quick_xml from
those of the wrapper.
|
| |
|
|
| |
This streamlines testing.
|
| |
|
|
| |
Doing so reduces peak memory.
|
| |
|
|
|
| |
This saves on memory. Bytes are read from the file as needed, and
written to zip as soon as they are ready.
|
| | |
|
| |
|
|
|
|
| |
This is done by not including it in the xml! macro in the first place.
Instead, it is inserted later by using format!. This is because ogrim
does not support injecting raw xml yet (to my knowledge).
|
| |
|
|
|
| |
This commit does not produce a working version, as processed_fragment is
escaped by xml!. This needs to be resolved.
|
| | |
|
| |
|
|
|
|
|
| |
Change resource URLs using attribute matching (only img src for now,
should add more later).
Add respective stylesheets to chapters.
|
| |
|
|
| |
This prepares them to be added to their xhtml content.
|
| |
|
|
|
| |
This allows these stylesheets to be added to the chapter contents later
during zipping.
|
| |
|
|
|
| |
This saves the effort of having to do it manually later on. Also avoids
duplication in parsing.
|
| |
|
|
|
|
|
| |
This is better than having it as string then converting it to path
whenever we want to use it. It also ensures better interoperability
between operating systems (though it would probably worked fine
beforehand, but better be safe for the future).
|
| |
|
|
| |
EPUB standard only recognizes relative paths. Fixes image rendering.
|
| |
|
|
| |
They are no longer needed.
|
| | |
|
| |
|
|
|
| |
Instead of writing it to file and then reading it again, we write
container.xml straight to zip, just like we did with mimetype.
|
| |
|
|
|
| |
For now, only mimetype is added. Next step is adding all the other files
in epub_root.
|
| |
|
|
|
|
|
|
| |
This reverts commit 6aad662ec59a3974cbca6c423c1e08e8bc5e90f6.
There is no need to write it out to epub_root as it needs to be manually
written to the zip file later on anyway. Not including it saves us the
trouble of avoiding it when walking epub_root later.
|
| | |
|
| | |
|
| |
|
|
| |
All files in file_entries are downloaded according to their full_path.
|
| |
|
|
| |
We need to know its full_path as it will be referenced in container.xml.
|
| |
|
|
|
|
|
|
|
|
|
| |
It is not the best idea as it is non-deterministic, working on the
assumption that searching by ISBN would return the book and in a
consistent way.
The contents previously extracted from it, such as authors and
publishers, are already included in the OPF file which can be fetched
from the files list. Further items such as description can be fetched
from the metadata endpoint later if needed.
|
| |
|
|
|
|
|
| |
This makes them more useful as each will be referenced by either
spine_items or toc_vec later on. This is demonstrated by the temporary
sanity checks, which shall be replaced by code that actually use fields
from the corresponding items.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Its functionality is covered by Paginated. The fetch_metadata function
was also replaced by the more generic fetch_all_pages.
Given that we are searching by the isbn, we should presumably get only 1
result, so only one call will be made even when fetch_all_pages is used.
This behaviour is not documented though, so switching to the metadata
endpoint in the future is recommended.
|
| |
|
|
|
|
|
|
|
|
| |
Fetching file details allows us to download them to the correct location
later.
Chapter details are currently limited to is_skippable, which might be
used to determine whether to make the corresponding spine item
non-linear. Other details such as the title shall be fetched from the
spine and table-of-contents endpoints later.
|
| | |
|
| | |
|
| |
|