A shell script collection which downloads nopaystation PS Vita stuff. There are several scripts. One to download all *.tsv files of NoPayStation. The other are for downloading games, updates or all DLC of a PS Vita game.
- a working internet connection
- posix shell (bash, ksh, zsh, sh)
- curl or wget
- pkg2zip
- latest mktorrent
- wine
- Windows torrent7z (unfortunately there is no native port [yet])
- python3 + python3-lxml (install it via package manager or pip)
(Optional) compile+install mktorrent v1.1 (needed for source flag). Check the version installed on your system. Some sort of compile (e.g. gcc) needed
$ mktorrent -v
$ git clone https://github.com/Rudde/mktorrent.git
$ cd mktorrent/ && PREFIX=$HOME make
$ PREFIX="${HOME}" make install
$ rm -rf ~/mktorrent
Download t7z from here. Extract the file with 7za. Copy the t7z.exe to ${HOME}/bin. After that create the torrent7z wrapper
echo -e '#!/bin/sh\nexec wine ${HOME}/bin/t7z.exe "${@}"' > ${HOME}/bin/t7z
chmod +x ${HOME}/bin/t7z
$ git clone -b t7z https://github.com/sigmaboy/nopaystation_scripts.git && cd nopaystation_scripts
$ chmod +x download*.sh
$ test -d "${HOME}/bin" && ln -s "$(pwd)"/download*.sh "${HOME}/bin"
$ test -d "${HOME}/bin" && ln -s "$(pwd)"/pyNPU.py "${HOME}/bin"
If you don't have ${HOME}/bin in your ${PATH}, try the following.
$ test -d "/usr/local/bin" && sudo ln -s "$(pwd)"/download*.sh "/usr/local/bin/"
It downloads every *.tsv file from NoPayStation.com and creates a tar archive with the current date for it.
$ ./download_tsv.sh /path/to/the/output_directory
If you don't add the output directory as the first parameter, it uses the current working directory. You need the *.tsv file(s) for every other script in this toolset.
With this script you can download a PS Vita game. The first parameter is the path to your *.tsv file and the second is the game's title ID. It places the *.7z (torrent7z) file in the current directory. It also changes the region name into TV format (NTSC, PAL, ...) For example:
$ ./download_game.sh /home/tux/Downloads/GAME.tsv PCSE00986
I can recommend this site for searching title IDs.
With this script you can download the latest or all available PS Vita game updates. There is a first parameter optional parameter "-a" and the second is the game's title ID. It places the files in a created directory from the current working directory named $TITLE_ID_update. For example:
$ ./download_update.sh [-a] PCSE00986
This script downloads every DLC found for a specific title ID with available zRIF key. It places the files in a created directory from the current working directory named $TITLE\ID_dlc. For example:
$ ./download_dlc.sh /home/tux/Downloads/DLC.tsv PCSE00986
Every DLC is placed in a created directory named like the title id relative to the current directory.
With this script you can download a PSP game. The first parameter is the path to your *.tsv file and the second is the game's title ID. It places the *.iso file in the current directory. For example:
$ ./download_psp.sh /home/tux/Downloads/PSP_GAMES.tsv NPUZ00001
I can recommend this site for searching title IDs.
Requirements:
- pkg2zip and the latest mktorrent 1.1 (1.0 is not working since it doesn't know the source option)
This script downloads the game, every update and dlc found for a specific title ID with available zRIF key. It puts the DLC and the Updates in a dedicated folder named like the generated zip and creates a torrent for the game, updates and dlc folders. In fact it uses the three scripts from above, combines them to share them easily via BitTorrent. You need to have download_game.sh, download_update.sh, download_dlc.sh in your $PATH variable to get it working.
You need to symlink them to ${HOME}/bin/, /usr/local/bin or /usr/bin/. This is explained in the Installation Section above
If you want to do some additional steps after running download2torrent.sh, you can add a post script named download2torrent_post.sh to the directory where you run download2torrent.sh from the command line. It has to be executable to run. download2torrent.sh runs the post script with the game name as the first parameter. Your script can handle the parameter with the variable $1 in your (shell) script. You can use this to automate your upload process with an script which adds the torrent to your client or move it and set the correct permissions to the file. All files are named like $1. For example the update and dlc directories
- ${1}_update
- ${1}_dlc
or the torrent files
- ${1}.torrent
- ${1}_update.torrent
- ${1}_dlc.torrent
If you call the script with "-a" as the first parameter, it will download all updates instead of the latest only. Additionally you can set the source tag as the end last command line parameter. The
$ ./download2torrent.sh [-a] PCSE00986 http://announce.url /path/to/directory/containing/the/tsv/files <SOURCE>
This works pretty much the same as download2torrent.sh but downloads all base games of a specific region. It creates a subdirectory in your current working directory for the region you mentioned. Valid regions are US JP EU ASIA. There is also a post hook implemented with the file name ./download_region_post.sh For more informations and help about the script just call it with the --help parameter.
Example:
$ ./download_region.sh -r ASIA -t game -d /path/to/directory/containing/the/tsv/files [-c http://announce.url] [-s <SOURCE>] [-a]
This little python program helps you downloading updates and generating changelogs for your games. Just use the "-h" parameter to get all parameters and examples.
- create a script to download PSM games
- add command line parameters to control the behaviour of the download scripts (downloading/compressing only)