gabrielkrell / finsta Goto Github PK
View Code? Open in Web Editor NEWWeb page running on remote Raspberry Pis for students to explore.
Web page running on remote Raspberry Pis for students to explore.
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
"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.
Since scripts can't be run from the web right now, remove "Camera Scripts" link, page, code. It can be reinstated later on.
To facilitate a button here:
Optional for milestone; sister issue of #31 in finsta-coord
(note: moved from #20 in finsta-client-setup)
Oops. Suppose we'd better do a find-and-replace for 'finsta' at some point.
Pretty straightforward.
Implement this wireframe with a link to the main Finsta feed, an embedded window with the terminal, and some code tips / instructions on the bottom.
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.
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?
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.
can we do this? force the user to rename their edited script to preserve the original?
Should follow the stuff laid out here: https://stackoverflow.com/a/22936947/4038349
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 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.
"Terminal Access" page should open in a new window (which will likely turn into a new tab). Easy HTML fix.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.