Skip to content

Commit 996e504

Browse files
committed
Initial
0 parents  commit 996e504

15 files changed

+1318
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
ipa_download/

README.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# The Grand IPA Archive
2+
3+
Hello, this project aims to provide a searchable and filterable index for .ipa files.
4+
None of the linked files are mine, nor am I involved in any capacity on the referenced projects.
5+
I merely wrote the crawler to index IPA files in various [Archive.org](https://archive.org) collections.
6+
The list of indexed collections can be found at [data/urls.json](data/urls.json).
7+
8+
9+
## Using the webpage
10+
11+
You can add the IPA Archive webpage to your homescreen.
12+
Note however, that each time you click on the app icon, it will load the whole database again and clear your previously entered data.
13+
To prevent that, use Safari to jump back to your search results.
14+
The homescreen icon is still useful as bookmark though ;-)
15+
16+
Additionally, your configuration is saved in the URL.
17+
For example, if you have an iPad 1. Gen, you can select device "iPad" and maxOS "5.1.1".
18+
Then click on search and safe that URL to your homescreen.
19+
(Or wait until you have configured your Plist server and save that URL instead)
20+
21+
22+
## TODO
23+
24+
- Reindexing of previous URLs (should remove dead-links and add new ones)
25+
- Periodic check on outdated URLs (see previous)
26+
27+
28+
## Requirements
29+
30+
- `ipa_archive.py` has a dependency on [RemoteZip](https://github.com/gtsystem/python-remotezip) (`pip install remotezip`)
31+
- `image_optim.sh` uses [ImageOptim](https://github.com/ImageOptim/ImageOptim) (and probably requires a Mac)
32+
- The [Plist Generator server](#starting-plist-server) needs either Python or PHP
33+
34+
35+
## General workflow
36+
37+
To add files to the archive follow these steps:
38+
39+
1. `python3 ipa_archive.py add URL`
40+
2. `python3 ipa_archive.py run`
41+
3. If any of the URLs failed, check if it can be fixed. (though most likely the ipa-zip file is broken)
42+
- If you could fix any file, run `python3 ipa_archive.py err reset` to try again (this will also print the error again)
43+
- If some files are unfixable, run `python3 ipa_archive.py set err ID1 ID2` to ignore them
44+
4. `./tools/image_optim.sh` (this will convert all .png files to .jpg)
45+
5. `python3 ipa_archive.py export json`
46+
47+
Handling plist errors (json-like format):
48+
- `./tools/plist_convert.sh 21968`
49+
- `./ipa_archive.py get img 21968`
50+
51+
52+
## Database schema
53+
54+
The column `done` is encoded as follows:
55+
- `0` (queued, needs processing)
56+
- `1` (done)
57+
- `3` (error, maybe fixable, needs attention)
58+
- `4` (error, unfixable, ignore in export)
59+
60+
61+
## Starting Plist Server
62+
63+
You need to start the plist generator service on a network location that is accessible to your iDevice.
64+
That can be, for example, your local machine which is accissble through your home network (LAN).
65+
Therefore you will need to determine the IP address of your hosting PC.
66+
You can either use Python or PHP to host the service.
67+
68+
(it is sufficient to copy and execute one of server files, either python or php)
69+
70+
71+
### ... with Python
72+
73+
With python, the IP address *should* be determined automatically.
74+
After starting the server:
75+
76+
```sh
77+
python3 tools/plist_server.py
78+
```
79+
80+
it will print out something like `Server started http://192.168.0.1:8026`.
81+
Use this address on the IPA Archive webpage.
82+
If the IP starts with `127.x.x.x` or `10.x.x.x`, you will need to find the IP address manually and use that instead.
83+
84+
85+
### ... with PHP
86+
87+
Similar to python, you start the server with:
88+
89+
```sh
90+
php -S 0.0.0.0:8026 -t tools/plist_server
91+
```
92+
93+
However, you have to find your local IP address manually (Mac: `ipconfig getifaddr en0`).
94+
Note, we use `0.0.0.0` instead of localhost, to make the server available to other network devices.
95+
If you are inside the `plist_server` folder, you can omit the `-t` flag.
96+
97+
For the IPA Archive webpage you should use `http://192.168.0.1:8026` (with your own IP address).
98+

apple-touch-icon.png

1.17 KB
Loading

favicon.ico

888 Bytes
Binary file not shown.

favicon.svg

+11
Loading

index.html

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0" />
7+
<title>IPA Archive</title>
8+
<link rel="shortcut icon" href="./favicon.ico">
9+
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
10+
<script src='script.js'></script>
11+
<link rel="stylesheet" href="style.css">
12+
</head>
13+
14+
<body>
15+
<h1>IPA Archive</h1>
16+
<form onsubmit="event.preventDefault(); searchIPA(); return false;" autocomplete="off">
17+
<label for="search">Search: <input id="search" placeholder="Search"></label>
18+
<label for="bundleid">BundleId: <input id="bundleid" placeholder="com.gameloft."></label>
19+
<label for="minos">min OS: <input id="minos" placeholder="1.0"></label>
20+
<label for="maxos">max OS: <input id="maxos" placeholder="5.1.1"></label>
21+
<label for="device">Device: <select id="device">
22+
<option value="">Any</option>
23+
<option value="1">iPhone</option>
24+
<option value="2">iPad</option>
25+
<option value="3">TV</option>
26+
<option value="4">Watch</option>
27+
</select></label>
28+
<button type="submit">Search</button>
29+
</form>
30+
<div id="content">JavaScript disabled?</div>
31+
<div id="templates" hidden>
32+
<div class="entry">
33+
<div>
34+
<img src="$IMG">
35+
<button onclick="installIpa($IDX)">Install</button>
36+
</div>
37+
<div class="info">
38+
<h4>$TITLE</h4>
39+
<div>BundleId: <a onclick="searchByBundleId(this)">$BUNDLEID</a></div>
40+
<div>Version: v$VERSION – $SIZE</div>
41+
<div>Device: $PLATFORM</div>
42+
<div>Minimum OS: $MINOS</div>
43+
<div>Link: <a href="$URL" rel="noopener noreferrer nofollow">$URLNAME</a></div>
44+
</div>
45+
</div>
46+
</div>
47+
<div id="overlay" hidden>
48+
<div id="installMsg">
49+
<h3>Install on device</h3>
50+
<p>
51+
Unfortunatelly, this function is not possible with static HTML+JS.
52+
You must provided a plist generator URL.
53+
See <a href="Readme.md" target="_blank">Readme</a> file for further instructions on how to set up such a
54+
service.
55+
</p>
56+
<form onsubmit="event.preventDefault(); setPlistGen(); return false;" autocomplete="off">
57+
<label for="plistServer">Generator URL:</label>
58+
<input id="plistServer" placeholder="http://192.168.0.1/">
59+
<button type="submit">Save</button>
60+
<button type="button" onclick="document.getElementById('overlay').hidden=true">Abort</button>
61+
</form>
62+
</div>
63+
</div>
64+
<script>loadDB()</script>
65+
</body>
66+
67+
</html>

0 commit comments

Comments
 (0)