Giter VIP home page Giter VIP logo

nopaystation_scripts's Introduction

nopaystation_scripts

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, PSM or PSP games.

Supported Operating Systems

  • GNU/Linux
  • FreeBSD
  • Windows 10 with WSL should also work but it's untested

Requirements

  • a working internet connection
  • posix shell (bash, ksh, zsh, sh)
  • curl or wget
  • pkg2zip (please migrate to lusid1's fork as mmozeiko abandoned his project)
  • latest torrent7z
  • python3 + python3-lxml (install it via package manager or pip)
  • (Optional) latest mktorrent

Compiling dependencies from source

This section assumes that "${HOME}/bin" is in your shells "${PATH}". If you don't want to install the generating programs in $HOME. Just change it in the howto below to something like "/usr/local/bin" etc.

mktorrent

If your package manager doesn't already have v1.1 you can compile it by yourself. mktorrent v1.1 is only needed for source flag. If you don't need it you also can use v1.0. You also need some sort of compiler (e.g. gcc) and "make" is needed.

git clone https://github.com/Rudde/mktorrent.git
cd mktorrent/ && PREFIX=$HOME make
PREFIX="${HOME}" make install
rm -rf ~/mktorrent

t7z

Compile t7z from source (gcc and make is needed).

git clone https://github.com/BubblesInTheTub/torrent7z
cd torrent7z/linux_src/p7zip_4.65/
make
install -Dm 0755 bin/t7z "${HOME}/bin"

nopaystation_scripts Installation

git clone https://github.com/sigmaboy/nopaystation_scripts.git && cd nopaystation_scripts
chmod +x nps_*.sh pyNPU.py
test -d "${HOME}/bin" && ln -s "$(pwd)"/nps_*.sh "$(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)"/nps_*.sh "$(pwd)"/pyNPU.py "/usr/local/bin/"

Script examples

nps_tsv.sh

It downloads every *.tsv file from NoPayStation.com and creates a tar archive with the current date for it.

./nps_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 mostly every other script in this toolset.

nps_game.sh

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:

./nps_game.sh /home/tux/Downloads/GAME.tsv PCSE00986

I can recommend this site for searching title IDs.

nps_update.sh

With this script you can download the latest or all available PS Vita game updates. There is a optional first 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:

./nps_update.sh [-a] PCSE00986

nps_dlc.sh

This script downloads every DLC found for a specific title ID with available zRIF key. Every update is placed in a created directory from the current working directory named <\TITLE_ID_update>. For example:

./nps_dlc.sh /home/tux/Downloads/DLC.tsv PCSE00986

Every DLC is placed in a created directory from the current working directory named <\TITLE_ID_dlc>.

nps_psm.sh

With this script you can download a PSM game. The first parameter is the path to your *.tsv file and the second is the game's title ID. It places the the *.7z (torrent7z) file in the current directory. It also changes the region name into TV format (NTSC, PAL, ...) For example:

./nps_psm.sh /home/tux/Downloads/PSM.tsv NPSA00115

nps_psp.sh

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:

./nps_psp.sh /home/tux/Downloads/PSP_GAMES.tsv NPUZ00001

I can recommend this site for searching title IDs.

nps_bundle.sh

Requirements:

  • pkg2zip and the optionally mktorrent If you want to use the source flag, you need mktorrent >= 1.1

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 optionally creates a torrent for the game, updates and dlc folders. In fact it uses the three scripts from above, combines them and download everything available for a game. You need to have nps_game.sh, nps_update.sh, nps_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 nps_bundle.sh, you can add a post script named nps_bundle_post.sh to the directory where you run nps_bundle.sh from the command line. It has to be executable to run. nps_bundle.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", it will download all updates instead of the latest only. Additionally you can set the parameter [-c] to enable torrent creating. If you use this you can add source flag after it. when creating torrent files with to use with private trackers. To use this feature you need to have mktorrent installed in version 1.1+! For example:

./nps_bundle.sh [-a] -t PCSE00986 -c "http://announce.url" -d "/path/to/directory/containing/the/tsv/files" [-c] [<SOURCE FLAG>]

nps_region.sh

This works pretty much the same as nps_bundle.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 ./nps_region_post.sh like nps_bundle. The name of the collection directory is overgiven to the post script as the first parameter. For more informations and help about the script just call it with the --help parameter or look at the code.

Example:

$ ./nps_region.sh -r ASIA -t game -d /path/to/directory/containing/the/tsv/files [-c http://announce.url] [-s <SOURCE>] [-a]

pyNPU.py

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. It's useful for checking changelogs and generating download links.

ToDos

  • add command line parameters to control the behaviour of the download scripts (downloading/compressing only)
  • compare the whole download + compression process of pkg2zip vs. pkg2zip without zipping + torrent7z compressing

nopaystation_scripts's People

Contributors

describe19 avatar felleg avatar jadedctrl avatar robzombie91 avatar sigmaboy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nopaystation_scripts's Issues

16.patch uri is dead

The README.md lists this patch for pkg2zip as a requirement for using these scripts, but the patch no longer exists. Was the patch merged in the current release, or is the patch still necessary?

No nps_psx?

Is there a way to also get PSX games using these scripts? Or am I missing something?

Set source flag

Requires a newer version of mktorrent but using -s you can add the GGn source flag so you dont have to redownload torrent files.

"ERROR: cannot open '-l' file" and "error: no files match: pkg v1.8 [*] loading....7z"

Using Arch Linux. Looking to get PSV games.

Installed mktorrent from official Arch repo and torrent7z and pkg2zip from AUR. Did the nopaystation_scripts Installation and even test -d "/usr/local/bin" && sudo ln -s "$(pwd)"/nps_*.sh "$(pwd)"/pyNPU.py "/usr/local/bin/" for good measure.

Downloaded the .tsv files.

When I run ./nps_game.sh PSV_GAMES.tsv PCSB00144, as an example, I get this:

PCSB00144.pkg           100%[=============================>]   2.11G  4.29MB/s    in 8m 6s
2022-08-18 16:29:51 URL:http://zeus.dl.playstation.net/cdn/EP0102/PCSB00144_00/wZgRqNJKEJbNEWdGXqDHkjBpgvNujShcesAAImTmuHjbAYigsRfMjrkBcudatnTm.pkg [2261972688/2261972688] -> "PCSB00144.pkg" [1]
ERROR: cannot open '-l' file
pkg2zip v1.8
[*] loading...
[*] unpacking Vita APP
[*] unpacking completed
[*] creating sce_sys/package/head.bin
[*] creating sce_sys/package/tail.bin
[*] creating sce_sys/package/stat.bin
[*] creating sce_sys/package/work.bin
[*] minimum fw version required: 1.69
[*] done!
error: no files match: pkg v1.8 [*] loading....7z

So here, ERROR: cannot open '-l' file and error: no files match: pkg v1.8 [*] loading....7z are of interest.

Is this because I installed the dependencies as binaries, and not compiled from source as recommended in the documentation? Or is something else going on?

Not working with PSP

./download_game.sh /mnt/hd2/nopaystation_scripts/22_06_2019/PSP_GAMES.tsv ULUS10572

/download_game.sh: line 58: [: too many arguments
--2019-06-22 02:45:05--  ftp://phantom%20brave/%20The%20Hermuda%20Triangle
           => ‘ULUS10572.pkg’
Resolving phantom brave (phantom brave)... failed: Name or service not known.
wget: unable to resolve host address ‘phantom brave’
Checksum of downloaded file does not match checksum in list
Do you want to continue? (yes/no)

Loving this script btw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.