telephone

I use an iPhone SE for mobile computing, social networking, and as a modem for other networked devices. Less typical apps I use are documented here:


An SSH client. It costs money, but its worth it. I like to do development work while inside of tmux on servers I run, so I can ssh and tmux a and continue working from whatever machine I find myself on, whether its an iPhone running iOS or a ThinkPad running 9front.

A simple app for logging GPS data. You give the app a URL to send data to, and it keeps track of your GPS data and sends it as a bunch of JSON to the endpoint you provide. I wrote a small webapp in Haskell to listen for this incoming data, and then parse it and save it into a database. I like having detailed location data to refer to in the future, like a sort of "location diary" that reminds me where I've been and what I've done.

An app for viewing all types of video and audio. I don't really like streaming media, as it requires an internet connection during the entire viewing. Instead I like to download the actual files, and keep them on my iPhone, so i can view them whenever and wherever I want.

The app has a nice "Network" tab, where you can directly download files from a given URL, connect to cloud services, or share over WiFi. That last one is nice, I use it like this: enable my iPhone hotspot, connect to it from my laptop, open Firefox on my laptop and navigate to "http://YourPhonesName.local". From this page, you can drag-and-drop files from your laptop to transfer onto your phone. This is good for transfering lots of files at once.

An app that gives you a Python development environment on your iPhone.

I use this to run a download-video.py script that uses the youtube-dl library to download videos from all over the web (not just youtube). With this script, i can click the "Share" button on Safari whenever I am on a page with a video, and run the "download-video.py" script to save a file locally on my iPhone, for later viewing with VLC.

To do all this, I first needed to install StaSh, a bash-like shell in python, so we have an environment where we can use pip. Then, inside of StaSh, you can run pip install youtube-dl. Now you can write your script, mine looks like this:

import appex
import console
import youtube_dl

with youtube_dl.YoutubeDL({
  'format':'mp4'
}) as y:
  console.open_in(
    y.prepare_filename(
      y.extract_info(
        appex.get_url(),
        download=True)))

To use this script from the "Share" screen, you need to create a small Pythonista wrapper. You do this from the Share screen itself, so enter "Share" from any app, then click "Run Pythonista Script", then "Edit", then the "⊕" icon up top. Now you are creating a new Pythonista share script, choose your python script download-video.py and customize the icon if you want.

Now, on any video webpage you find yourself on in Safari, click the "Share" -> "Run Pythonista Script" -> Download video -> wait for it to download... -> "Copy to VLC"

TODO screenshots