Forum Archive

Getting files out of GitHub including Pyui

paultrott

Hi I've installed stash and want to use it to install some files from GitHub

so i need some help.

I would like to copy the following https://github.com/chriswilson1982/black-white into pythonista on my iPad but i dont know how.

Any ideas?

Ta

ccc

https://github.com/cclauss/Ten-lines-or-less/blob/master/read_zipfile_from_github.py

  • In Safari browser, navigate to a GitHub repo of interest.
  • Tap the green Clone or download button.
  • Tap Download ZIP. (Big repos may take several seconds to download).
  • Tap Open in....
  • Tap Run Pythonista Script.
  • Pick this script and tap the run button.
  • When you return to Pythonista the files should be in ~/from GitHub/.

If you want more power, get the app Working Copy and then check out https://github.com/cclauss/Pythonista-and-Working-Copy

ccc

EDIT: Don't do this for PyPI packages... Instead, see JonB's advise below.

In StaSH, you could try: pip install https://github.com/chriswilson1982/black-white/archive/master.zip

paultrott

Ok thanks for this. I tried the command and it almost worked!

Got the following

pip install https://github.com/chriswilson1982/black-white/archive/master.zip
Working on URL repository ...
Opening: https://github.com/chriswilson1982/black-white/archive/master.zip
Save as: /private/var/mobile/Containers/Data/Application/DE85A6F7-5ACE-4C89-AD1B-454F8255D0E8/tmp/master.zip
16470
Extracting archive file ...
Running setup file ...
IOError(2, 'No such file or directory')
Failed to run setup.py
Fall back to directory guessing ...
Error: Cannot locate packages. Manual installation required.

So is there some prerequirements ? E.g. Setup.py

paultrott

Tried the read zip file and it worked!!

You are ace!

JonB

Pip requires actual pypi packages.

Also should work:

git clone https://github.com/chriswilson1982/black-white.git ~/blackwhite