Giter Site home page Giter Site logo

pytingen's Introduction

TinGen

This project has been renamed to pyTinGen. Users who still want to follow the Python 3 version of TinGen can follow this guide to set remote to pyTinGen instead of TinGen.

This fork will no longer accept any new feature. Only bugfixes will be merged into this fork.

This project is being feature deprecated as I plan to replace this project with TinGenQt

Script that will allow you to easily generate an index file (with encryption if needed) for use with Tinfoil.

This project is a based on this project by BigBrainAFK.

NOTE: The token generated by this script can also be used with Tinfoil.

All tinfoil indexes are generated with the following format: Tinfoil-New-Index-Info.md

Requirements

  • Python 3
  • Modules from requirements.txt found in the root of project directory.
  • credentials.json (or any file name if using --credentials flag to pass custom location for the required credential file). It can be obtained from here by clicking the Enable Drive API button in there while being signed in with the user account you want to generate credentials for or from Google's Developer Console.
  • Google Drive Folder IDs to scan and index.

Execute the following command in a terminal to install all the required modules.

pip install -r requirements.txt

Usage

Usage instructions can be found here.

usage: TinGen.py [-h] [--credentials CREDENTIALS_FILE_NAME] [--token TOKEN_FILE_PATH] [--headless]
                 [--index-file INDEX_FILE_PATH] [--share-files] [--no-recursion] [--add-nsw-files-without-title-id]
                 [--add-non-nsw-files] [--add-nsw-info-to-success] [--add-update-date-to-success]
                 [--add-update-time-to-success] [--success SUCCESS_MESSAGE] [--encrypt]
                 [--public-key PUBLIC_KEY_FILE_PATH] [--vm-file VM_FILE] [--upload-to-folder-id UPLOAD_FOLDER_ID]
                 [--upload-to-my-drive] [--new-upload-id] [--share-uploaded-index]
                 [--tinfoil-min-ver TINFOIL_MINIMUM_VERSION] [--auth | --generator]
                 [--zstandard | --zlib | --no-compress] [--theme-blacklist [THEME_BLACKLIST ...]]
                 [--theme-whitelist [THEME_WHITELIST ...]] [--theme-error ERROR_MESSAGE]
                 [FOLDER_ID_TO_SCAN ...]

Script that will allow you to generate an index file with Google Drive file links for use with Tinfoil

positional arguments:
  FOLDER_ID_TO_SCAN     Folder IDs of Google Drive folders to scan

optional arguments:
  -h, --help            show this help message and exit
  --credentials CREDENTIALS_FILE_NAME
                        Path to Google Application Credentials
  --token TOKEN_FILE_PATH
                        Path to Google OAuth2.0 User Token
  --headless            Allows to perform Google OAuth2.0 User Token Authentication in headless environment
  --index-file INDEX_FILE_PATH
                        Path to output index file
  --share-files         Share all files inside the index file
  --no-recursion        Scans for files only in top directory for each Folder ID entered
  --add-nsw-files-without-title-id
                        Adds files without valid Title ID
  --add-non-nsw-files   Adds files without valid NSW ROM extension(NSP/NSZ/XCI/XCZ) to index
  --add-nsw-info-to-success
                        Adds simple information of NSW titles added to index
  --add-update-date-to-success
                        Adds index update date to index
  --add-update-time-to-success
                        Adds index update time to index
  --success SUCCESS_MESSAGE
                        Adds a success message to index file to show if index is successfully read by Tinfoil
  --encrypt             Encrypts the resulting index file with AES-ECB-256
  --public-key PUBLIC_KEY_FILE_PATH
                        Path to RSA Public Key to encrypt AES-ECB-256 key with
  --vm-file VM_FILE     Path to VM File
  --upload-to-folder-id UPLOAD_FOLDER_ID
                        Upload resulting index to Folder ID supplied
  --upload-to-my-drive  Upload resulting index to My Drive
  --new-upload-id       Uploads the newly generated index file with a new File ID instead of replacing old one
  --share-uploaded-index
                        Shares the index file that is uploaded to Google Drive
  --tinfoil-min-ver TINFOIL_MINIMUM_VERSION
                        Minimum Tinfoil client version to use index with
  --auth                Run Google User Token authorize task if token doesn't exist
  --generator           Run index generation task
  --zstandard, --zstd   Compresses index with Zstandard compression method
  --zlib                Compresses index with zlib compression method
  --no-compress         Flag to not compress index

  --theme-blacklist [THEME_BLACKLIST ...]
                        Theme IDs to add to index to blacklist
  --theme-whitelist [THEME_WHITELIST ...]
                        Theme IDs to add to index to whitelist
  --theme-error ERROR_MESSAGE
                        Error message to show if theme check fails

Credits

  • BigBrainAFK for inital crypto script for index encryption.
  • blawar for tinfoil and for early access to details about new index format and supported compression methods and also for helping me with my dumb questions.

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.