I´m just learning to code and hoping for some directions to learn more. I have a project where I´m using a Raspberry Pi and a Canon DSL camera to take a photo every 15 minute and then upload the files to dropbox. The files are named like this: Y/M/D-H/M/S.jpg. Folder structure on dropbox: Year/Month/Day.
I now would like to display these photos in a nice way on a web page. I want to show the latest taken photo as the start image. I then want to make a link menu where it is possible to go back in time and see earlier photos. Back/forward button to jump between the 15 minute interval images. Same with year and date, a step up/down in increments navigate a specific year and month.
Im attaching example to a website that displays what I want to achieve. I dont necessarily need it to be as fancy (like the preview image when scrubbing back in time).
What would be a simple way to achieve this. Preferably a technology/language that is well documented as I want to learn and modify. I would not be surprised if someone has already built something similar. Do I need to learn using a database like php/orMysql for this?
Example:
https://longyearbyen.kystnor.no/
enter image description here
I use Gphoto2 in a simple python script to setup the intervals and naming.
I use a curl command to upload to dropbox via custom app.
Related
I am developing an exam platform website where people can create exams and take exams. I almost finished the examination part and wanted to add a proctoring system. I want that when people start any quiz, their video is displayed on the examiner's side. That is, when the users press (ex.) the "Start Quiz" button, their video is turned on. And examiners can watch all the exam passers in some url. I found that I could use OpenCV to do this, but couldn't figure out how to get multiple video sharings from different users. Please suggest me any ideas. What should I learn? Can this be implemented in Django?
I apologize if this is a naive question as I'm a learning developer. I'm trying to come up a project to work on in the summer to build my portfolio as a Python developer and as of right now I'm in the planning stages and just want to know if I'm on the right track.
But without going into the specifics, I essentially want to get the meta data from one YouTube video every hour from the time it was uploaded and the current time and make a time vs views/hour plot using the YouTube API and display it on a website
I've looked into webscrapers, but from my understanding, those scripts can only take one instance at a time.
Would I need to learn PHP as well in order to store the data from each instance the API is called? Or is there a way to do what I'm thinking of natively in Python?
If so would I need to know it extensively?
Part 1 - YouTube API only returns a total viewCount. You won't be able to ask for a video's viewCount from 6 hours ago, for example. However, you can call the API every hour for the video viewCount and store the numbers yourself going forward.
Part 2 - PHP vs Python doesn't matter. You can store data with either code.
I'm trying to make an offline application in wich I can draw my drivn road in (near) real time on a map. I was thinking about using open street map, but if someone knows a much better solution, I'll take a look at it for sure.
So what I want to do, is when I drive with my car, I have a GPS module on top of it with a raspberry pi. On the raspberry pi, there is a screen connected to it on what I want to display the map. The application that runs on it is an offline html site with python (running on Flask). I want that the map is offline and as accurate as possible. And when I'm driving, it needs to de the opposite thing of a GPS. Instead of saying where to go, it needs to record where you are going.
Later, I want to be able to export the recorded route, but if I get the route drawed on the map offline I would be really happy already. So is there someone who can help me with this? Or already have made something like this?
Yes you can do this.
I do this in a slightly different form my web site for this is as http://sy-edm.com/tt/
You need
to parse the GPS CoOrdinates from your GPS Device
Store in a Database
Using open-Street-Maps create an overlay, where you select your coords from your database and display them.
I used an I-Phone with a GPS App that had the ability to post data to a Web-Url.
I have a parent file type that is folderish, and I would like to include a thumbnail of the first page of a child pdf in the template. Can someone roughly outline the tools and process you can imagine would achieve this, so that I can investigate further?
Getting out the first page of pdf can be achieved by using ghostscript.
This is an example script which forms an gostscript command and stores the images. I took this from collective.pdfpeek. Which by the way could solve your problem right away :-)
Until few days ago I would have recommended you not to use it, since it was a little bit buggy, but they recently shipped a new version, so give it a try! I'm not sure whether they now support DX or not.
So the workflow for you should be.
Uploading a PDF
Subscribe modified/creation events.
create image of first page using ghostscript (check my command, or collective.pdfpeek)
store it as blob (NamedBlobImage) on your uploaded pdf.
Also implement some queueing like collective.pdfpeek to not block all your threads with ghostscript commands.
OR
Give collective.pdfpeek a shot!
BTW:
imho on a large scale the preview generation for pdfs needs to be implemented as a service, which stores/manages the images for you.
I thought you maybe could help me out here :-)
So I just launched my website, where I will upload some GIFs and have them displayed on the front page.
As of right now, I use a script to show a .png file, when a mouse is hovered, the .gif shows and you can click on it, which will link you to the .gif file.
So right now I got two files for every GIF; xxx.gif and xxx_thumb.png -- however, I would like this to get automatized and thought of a simple script.
In pseudo code:
get .gif
rename to 1.gif
if 1.gif taken? rename to 2.gif
get first frame
export first frame as 1_thumb.png
if 1_thumb.png taken? rename to 2_thumb.png
load new picture? (y/n)
if n
exit
if y
start from step 1
Something like this would be awesome -- how hard would it be to code? Would Ruby or Python do the job?
Would this be possible with a web app, then send the .gif + .png as an email to me? <-- not necessary yet :-)
Thanks for reading this!
For Ruby you could check out rmagick and while this is for an older version of Rails it starts the process you would follow.