Giter Club home page Giter Club logo

finsta's People

Contributors

gabrielkrell avatar

Watchers

 avatar  avatar

finsta's Issues

Responsive design fix for Finsta feed

Anne:

We need to make a couple responsive adjustments for when the browser window is small. When the Finsta is displaying as a single column:

  • center the column
  • Reduce size of photos to 70% width? They seem too big. Match Instagram โ˜บ
  • Add white space between photos vertically

Open terminal in new window/tab

"Terminal Access" should open in a new window (or tab, most likely) so it's easier to see it side-by-side with the finsta feed.

Remove "Camera Scripts" page

Since scripts can't be run from the web right now, remove "Camera Scripts" link, page, code. It can be reinstated later on.

Add retry logic to camera scripts

Builtin camera scripts should contain a snippet so that they don't fail when multiple users take pictures at the same time:

    while True:
        try:
             camera = PiCamera()
             break
        except PiCameraMMALError as e:
             print('someone else is using the camera; retrying')
             sleep(1)

Either just add it to default scripts, or encapsulate it in some file that the scripts call.

Authentication for Pis post-discovery

When a teacher comes to the list of available pis, we want to make sure that the user does not browse and work on other pis in other studios. We need some kind of security for the specific pi in their studio, like a pin or password that they might enter to access their pi, but cannot use to access other pis. What can we put in place for this?

Send Anne instructions on changing hostname

Doesn't really belong in any of the repos but I want this in issue tracking so I get to it.

Find out how to easily change the hostname of a running Pi (maybe allowing restarts), write it down, and send to Anne. In the future it should probably end up in some kind of teacher's manual.

Prompt for access PIN

Users should have to enter a PIN before they can access anything on the Pi: Finsta or shellinabox. finsta-client-setup will take care of generating the PIN; Flask should ask users for it before they enter the site, and set up some kind of a session to authenticate them.

Issue 12 in finsta-client-setup: generating, prompting for PIN

Move wrapper logic out of take_picture.

Move code unlikely to be modified by students out of the files. Right now this code determines the file location and handles retries:

def get_full_image_name(filename):
    """Returns the path to a new image with the given filename.
       You shouldn't change this function when making your own script.
    """
    scripts_dir = os.path.dirname(os.path.realpath(__file__))
    return os.path.join(
        scripts_dir, os.path.pardir, 'static', 'images', filename)


def start_camera():
    """Starts up the camera, retrying if it's currently in use.
       You shouldn't change this function when making your own script.
    """
    while True:
        try:
            return PiCamera(resolution=(600, 600))
            break
        except PiCameraMMALError:
            print('Someone else is using the camera. Retrying...')
            sleep(1)

Probably, the try-finally wrapper around the main body should be reduced to an imported with as well.

Add static/images folder

Since this doesn't have any files in it, it doesn't get tracked by git. The easiest way to make sure it's picked up without loading anything strange in Finsta or adding special logic is by adding a default image.

This is required to make our permissions work in #7 of finsta-client-setup. Users shouldn't have the ability to create folders under /static (probably), so they can't do this themselves.

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.