4 ms·
How to easily transfer your files to iPad with Python one liner
- theorique 14y agoNice little hack. I assume he means port 8000 in the part that reads: From your iPad, open safari and go to http://192.168.1.2:8080 http://192.168.1.2:8080 to access and download the files to your iPad. Otherwise, you are browsing on a different port and it probably won't work. (edit: Also, you need to know your computer's IP address ... mine happened to be the default one, but YMMV)
- lifeisstillgood 14y agoBut where on the iPad is it stored? And can I reverse it - taking photos off iPad into my server Really backing up these devices is a closed book to me
- allenbina 14y agoimage capture on mac should be able to do it. requires to be plugged in via usb.
- mikegioia 14y agoThis is nice, and I can see the files, but I have no download option. There's a "Copy" in safari but where the heck can I save these to? EDIT: okay, figured it out. This app can do it: https://itunes.apple.com/us/app/mymedia-download-manager/id348609711?mt=8 https://itunes.apple.com/us/app/mymedia-download-manager/id3... You don't even need Cydia!
- keyboardP 14y agoThe code in the post is for Python 2.x but if you're running Python 3.x, use this to set up a server: python -m http.server 8000
- berntb 14y agoWhy not this? :-) "python -c 'import os; os.system("mv ... ~/Dropbox/from_comp_x/")' Edit: My point is -- what makes this worth up votes?!
- hansc 14y agoThanks for sharing, great hack!
- scottrogowski 14y agoI was inspired to write a small bash script to let you know which ip exactly to go to. It is hackish due to my limited knowledge of sed but it works on my Mac at least #!/bin/bash ip=`ifconfig -r en0 inet | sed -E '/en0/d;s/inet[ \t]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).+/\1/'` ip=`echo $ip | tr -d '[:space:]'` echo "Go to $ip:8000 in a browser on your local network. When you are done, use ctrl-c to exit" python -m SimpleHTTPServer 8000
- tteam 14y agoUse our Tonido server instead (http://www.tonido.com/ios/ http://www.tonido.com/ios/). Less adventurous though :-)
- songgao 14y agoMy `bin/server`. It prints all ip addresses binded to the machine, and tries port numbers starting from 8000 until one is available for use: #!/usr/bin/env python2.7 import commands import subprocess port=8000 while commands.getstatusoutput('lsof -i -P|grep ":' + str(port) + '"')[1]: port = port + 1 print commands.getstatusoutput('ip addr | grep inet')[1], "\n" subprocess.call(['env', 'python2.7', '-m', 'SimpleHTTPServer', str(port)])