I'm a Social Media Manager for Musicians and Bands across the globe, and have run in to a snag and am looking for anyones opinion who can help on the matter!
I'm using a service called Ping.FM that I use for updating status messages across multiple social networks. Unfortunately, it doesn't seem the development team is in the works anymore and two of the networks no longer work, Tagged and MyYearBook. Now, these two services have no custom service API, email update, or really any kind of function for updating status messages other then using a mouse, keyboard, and browser.
Now the second part. I have a shared web host (HostGator) that I use to run and leave Python scripts running to do my bidding whenever needed. What I'm thinking of is writing a script that will monitor an email account. When an email is received, it'll post the body as a status message.
Now the tricky part, how to post the status message. The shared host is all terminal only, no GUI. If there was a GUI, I would just use something like iMacro with Firefox and a Python script to alter it in order to post the status messages. Unfortunately though, no GUI, so as far as I'm aware it's not possible.
Is there any method of doing an idea like this, but without a GUI? Something terminal based, that can achieve the same idea? Any help is appreciated, thanks in advance!
All websites have an API, called HTTP. You can use mechanize to access it, so long as it doesn't use JavaScript for dynamic display.
Related
I am new at this part of web developing and was trying to figure out a way of creating a web app with the basic specifications as the example bellow:
A user1 opens a page with a textbox (something where he can add text or so), and it will be modified as it decides to do it.
If the user1 has problems he can invite other user2 to help with the typing.
The user2 (when logged to the Channel/Socket) will be able to modify that field and the modifications made will be show to the user1 in real time and vice versa.
Or another example is a room on CodeAcademy:
Imagine that I am learning a new coding language, however, at middle of it I jeopardize it and had to ask for help.
So I go forward and ask help to another user. This user access the page through a WebSocket (or something related to that).
The user helps me changing my code and adding some comments at it in real time, and I also will be able to ask questions through it (real time communication)
My questions is: will I be able to developed certain app using Django Channels 2 and multiplexing? or better move to use NodeJS or something related to that?
Obs: I do have more experience working with python/django, so it will more productive for me right know if could find a way working with this combo.
This is definitely possible. They will be lots of possibilities, but I would recommend the following.
Have a page with code on. The page has some websocket JS code that can connect to a Channels Consumer.
The JS does 2 simple things. When code is updated code on the screen, send a message to the Consumer, with the new text (you can optimize this later). When the socket receives a message, then replace the code on screen with the new code.
In your consumer, add your consumer to a channel group when connecting (the group will contain all of the consumers that are accessing the page)
When a message is received, use group_send to send it to all the other consumers
When your consumer callback function gets called, then send a message to your websocket
I am currently using IFTTT to create some automated software with Amazon Echo (Alexa). I want to use the IFTTT's Maker channel to do so.
Here's what I want the end result to be:
Command Amazon Echo (Alexa) to run a program.
Run a Python program on my computer.
I have had success in using the Trigger function of the Maker channel using a JSON request. However, there seems to be little documentation on the Action function, where IFTTT can make a web request to a URL. I have heard that webhooks may be needed to use this, again I am not sure where to get started with this.
The image below is what the Action function asks for. I know I'll need a server on my local machine or a program reading any requests sent to a public website.
If there are any libraries that would make this much easier, I would happily take recommendations, as this has been on my mind for a while..
Thank you!
I am developing a python program which uses the gmail api to access the email data.
I have successfully developed the tutorial program and I am able to access the gmail data and do a lot of interesting things.
At the moment, I have to get the .json file from the gmail account, modify the code, run it, and then ask the user to get a verification code from the web browser, to finally authenticate the app so it can start running.
Now, my question is: how can I make the authentication process easier for the end-user?
It seems to me like this process is during the development of the software, but what if I have finished my development process and I want to make the app commercially/freely available to other users so they can start poking around with it?
Isn't there a way to quickly modify my software to make that process easier for the end user?
Any kind of help is well received, sorry if this had been asked before.
I'm looking for a bit of web development advice. I'm fairly new to the area but I'm sure there are some gurus out there willing to part with some wisdom.
Objective: I'm interested in controlling a Python application on my computer from my personal web hosted site. I know, this question has been asked several times before but in each case the requirements were a bit different from my own. To reduce the length of this post I'll summarize my objective in a few bullet points:
Personal site is hosted by a web hosting company
Site uses HTML, PHP, MySQL, Python and JavaScript, the majority of everything is coded by me from the ground up
An application that is coded in Python will run on a PC within my home and will communicate with an Arduino board
The app will receive commands from the internet to control actuation via the Arduino, and will transmit sensor data back to the site (such as temperature)
Looking for the communication to be bi-directional, fast and secure
Securing the connection between site and Python app would be most ideal
I'm not looking to connect to the Python application directly, the web server must serve as the 'middle man'
So far I've considered HTTP Post and HTML forms, using sockets (Python app would run as a web server), an IRC bot and reading/writing to a text file stored on the web server.
I was also hoping to have a way to communicate with the Python app without needing to refresh the webpage, perhaps using AJAX or JavaScipt? Maybe with Flash?
Is there something I'm not considering? I feel like I'm missing something. Thanks in advance for the advice!
Just thinking out loud for how I would start out with this. First, regarding the website itself, you can just use what's easiest to you, or to the environment you're in. For example, a basic PHP page will do just fine, but if you can get a site running in Python as well, I'd prefer using the same language all over.
That said, I'm not sure why you would need to use a hosted website? Given that you're already forced to have a externally accessible PC at home for the communication, why not run a webserver on that directly (Apache, Nginx, or even something like CherryPy should do)? That webserver can then communicate with the python process that is running to control your Arduino (by using e.g. Python's xmlrpclib). If you would run things via the hosting company, you would still need some process that can handle external requests securely... something a webserver is quite good at. Just running it yourself gives you all the freedom you want, and simplifies things by lessening the number of components in your solution.
The updates on your site I'd keep quite basic: commands you want to run can be handled in the request handlers of the webserver by just calling the relevant (xmlrpclib) calls. Dynamically updating the page is best done by some AJAX calls I reckon. Based on your story, these updates are easily put in a JSON object, suitable for periodically updating only the relevant segments of your page.
Is it possible for my python web app to provide an option the for user to automatically send jobs to the locally connected printer? Or will the user always have to use the browser to manually print out everything.
If your Python webapp is running inside a browser on the client machine, I don't see any other way than manually for the user.
Some workarounds you might want to investigate:
if you web app is installed on the client machine, you will be able to connect directly to the printer, as you have access to the underlying OS system.
you could potentially create a plugin that can be installed on the browser that does this for him, but I have no clue as how this works technically.
what is it that you want to print ? You could generate a pdf that contains everything that the user needs to print, in one go ?
You can serve to the user's browser a webpage that includes the necessary Javascript code to perform the printing if the user clicks to request it, as shown for example here (a pretty dated article, but the key idea of using Javascript to call window.print has not changed, and the article has some useful suggestions, e.g. on making a printer-friendly page; you can locate lots of other articles mentioning window.print with a web search, if you wish).
Calling window.print (from the Javascript part of the page that your Python server-side code will serve) will actually (in all browsers/OSs I know) bring up a print dialog, so the user gets system-appropriate options (picking a printer if he has several, maybe saving as PDF instead of doing an actual print if his system supports that, etc, etc).