|
| 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 | + |
0 commit comments