GithubHelp home page GithubHelp logo

Create a public demo about dogsheep-photos HOT 5 CLOSED

dogsheep avatar dogsheep commented on June 2, 2024
Create a public demo

from dogsheep-photos.

Comments (5)

simonw avatar simonw commented on June 2, 2024

I built #23 to help with this.

$ dogsheep-photos create-subset photos.db public.db \
    "select sha256 from apple_photos where albums like '%Public%'"

And publish with Vercel:

$ datasette publish now public.db --project dogsheep-photos \
    --about=dogsheep/dogsheep-photos \
    --about_url="https://github.com/dogsheep/dogsheep-photos" \
    --install=datasette-json-html \
    --install=datasette-cluster-map

from dogsheep-photos.

simonw avatar simonw commented on June 2, 2024

Renaming this demo to dogsheep-photos.dogsheep.net

from dogsheep-photos.

simonw avatar simonw commented on June 2, 2024

Updated deploy command:

datasette publish now public.db --project dogsheep-photos \
    --about=dogsheep/dogsheep-photos \
    --about_url="https://github.com/dogsheep/dogsheep-photos" \
    --install=datasette-json-html \
    --install=datasette-cluster-map \
    --title "Dogsheep Photos demo"

from dogsheep-photos.

simonw avatar simonw commented on June 2, 2024

https://dogsheep-photos.dogsheep.net/

from dogsheep-photos.

simonw avatar simonw commented on June 2, 2024

I have a deploy-demo.sh script now:

#!/bin/bash
if [ -f public.db ]; then
  rm public.db
fi
pipenv run dogsheep-photos create-subset photos.db public.db \
    "select sha256 from apple_photos where albums like '%Public%'"
pipenv run sqlite-utils create-view public.db photos_on_a_map \
    "select
      date,
      latitude,
      longitude,
      apple_photos.sha256,
      uploads.ext,
      json_object(
        'title',
        'Taken on ' || date,
        'image',
        'https://photos.simonwillison.net/i/' || uploads.sha256 || '.' || uploads.ext || '?w=400',
        'link',
        'https://photos.simonwillison.net/i/' || uploads.sha256 || '.' || uploads.ext || '?w=1200'
      ) as popup
    from
      apple_photos
      join uploads on apple_photos.sha256 = uploads.sha256
    where
      latitude is not null
    order by
      date desc" \
    --replace
pipenv run datasette publish now public.db --project dogsheep-photos \
    --about=dogsheep/dogsheep-photos \
    --about_url="https://github.com/dogsheep/dogsheep-photos" \
    --install=datasette-json-html \
    --install=datasette-pretty-json \
    --install=datasette-cluster-map>=0.10 \
    --title "Dogsheep Photos demo"

from dogsheep-photos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.