Skip to content

Repository files navigation

Lanterna

Scrape published or embedded Google Slides presentations in any JavaScript environment.

Table of contents

Idea and motivation

Published or embedded Google Slides presentations are really hard (or even impossible) to download in an easy manner. That's exactly Lanterna's main purpose - to facilitate the process of downloading published or embedded presentations.

It works as follows:

  • full-page screenshots of the provided presentation are taken;
  • the user may choose to save them as separate .pdf files or merge them into one .pdf file;
  • optionally, the user may choose to enable OCR scanning of the presentation, making the output .pdf file(s) searchable

Installing

NPM module

npm install lanterna

This assumes you're using npm as your package manager.

Local setup and tests

In order to work on Lanterna, please ensure you have installed the following:

After doing that, you'll have to clone the project:

git clone https://github.com/tkostadinov004/lanterna.git
cd lanterna

After cloning the project, you have to install the dependencies (they are managed within the package.json file), so all you have to do is to run:

npm install

If you don't see any errors or warnings, then everything should have worked correctly. The next thing would be to run the unit tests in order to verify that everything is working correctly.

Unit Tests

We use Jest to write unit tests for Lanterna. All unit tests are kept in the tests directory.

To run the unit tests, execute the following:

npm test

The output would look something like this:

npm test
> lanterna@1.0.0 test
> jest

 PASS  tests/ocr/ocr.test.ts
 PASS  tests/scrape/scrape.test.ts

Test Suites: 2 passed, 2 total
Tests:       7 passed, 7 total
Snapshots:   0 total
Time:        3.826 s
Ran all test suites.

Hopefully you see that all the tests passed! But if you see errors or warnings, then something must be wrong with your setup. Please ensure you've following the installation steps outlined in the local setup and tests section.

Releases

Packages

Contributors

Languages