Incomplete, potentially misleading instructions follow. This is very much a work in progress.
- A pnut.io account; no developer account is required for single-user apps,
- Python. I made this using the iOS Pythonista app,
StaSh
, a bash-like shell for Pythonista, to give access topip
, which allows installation of…- @33MHz & @thrrgilag's
PNUTpy
library. (FYI: It's compatible with Python 2 and 3.)
import pnutpy
- see below for install instructions. Not a part of Python's standard libraries, essential for this app (as is everything else.)import configparser
from PIL import Image
import requests
from io import BytesIO
(Assuming you're running Pythonista, {p} = a Pythonista-specific instruction.)
- Create a new
PigPen
directory wherever you intend to run the app from. - Copy the
PigPen.py
,secrettoken.txt
file from here and save them there. - Create a new
images
directory within the same directory as the app. - You will need a pnut.io account, and to visit your single-user app developer account page.
- Create an app at the page, which will create 2 unique codes, then authorise it which will create a token.
- Overwrite the contents of
secrettoken.txt
with the token, ensuring to remove any trailing linefeeds before saving it. - {p} Install
StaSh
following the instructions as it runs and from the link above. - {p} I think
StaSh
must be executed at this stage to install a script and extension folder; read the instructions. - {p} Kill then reopen Pythonista to properly install
Stash
, if you didn't read the instructions. - Follow PNUTpy's installation instructions, i.e.
$ pip install pnutpy
. - {p} For the hell of it, kill then re-open Pythonista.
Run the PigPen.py
script and follow the setup instructions; it's as simple as that!
| PigPen | setup |
(You'll see this only once.)
Please decide on a default number of posts to retrieve - then choose the 'pc' option on the following menu.
-------------------------------
| settings |
pc = change retrieved post count?
[return] = exit
pc
-post count is currently 30
Please change, to (>0)? 12
-post count is now 12 posts
Thanks.
(I have not included instructions for making the file executable by file permissions of shebangs, it's beyond the remit of this page; Pythonista doesn't require it.)
To find out how to start posting, reading, messaging, etc., and read about some current limitations, please read the Usage document.