Skip to content
Webseite für die Open Data Linkliste
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
screenshots/small
src
.gitignore
README.md
generate-thumbnails.js
generate-website-previews.js
package-lock.json
package.json
read-google-spreadsheet.js

README.md

Spass mit Daten

Dieses Repository enthält den Code für die Open Data Linkliste auf spassmitdaten.de.

Copyright Infos

Setup

If you want to have screenshots of pdf files, you need to install imagemagick

sudo snap install imagemagick

Install

  1. Copy your credential files to the config directory
  2. Execute the following commands:
    npm install googleapis@27 --save

    node read-google-spreadsheet.js
  1. The links will be written to public/links.json

Generate screenshot thumbnail previews

    # generate all missing previews
    npm run generate-previews

That command ^ does the following things:

  1. Generate screenshots of all websites via: npx phantomjs generate-website-previews.js
  2. Optimize the screenshot images to width 480px via: node generate-thumbnails.js
  3. Download pdf files and create screenshots of the first page

Development

The following command builds the files in watch mode and serves the result at localhost:3000

    npx nanogen start 

Prod build

    # Build for prod
    npm run build

    # Serve static files
    cd public;sudo docker run -d -v `pwd -P`:/var/www:ro -p 8080:8080 trinitronx/python-simplehttpserver

Ideensammlung / Todos

Static Site generation with nanogen

Read full documentation about nanogen here: https://doug2k1.github.io/nanogen/docs/

    npx nanogen init

Start the current site:

$ npx nanogen start [options]

Build the current site:

$ nanogen build [options]
You can’t perform that action at this time.