FunKeyCIA icon indicating copy to clipboard operation
FunKeyCIA copied to clipboard

Set CIA name from commandline

Open Scrxtchy opened this issue 9 years ago • 4 comments

Already worked on it on my own time can't be fucked with git though

parser.add_argument('-cianame', action='store', dest='cianame', help='Name of cia output')

def processContent(titleid, key):

    if(len(arguments.cianame) is 0) or (arguments.cianame is None):
        cianame = titleid
    else:
        cianame = arguments.cianame

    if(arguments.ticketsonly):
        if not os.path.exists('tickets'):
            os.makedirs(os.path.join('tickets'))
    else:
        if(arguments.output_dir is not None):
            rawdir = os.path.join(arguments.output_dir, 'raw', titleid)
            ciadir = os.path.join(arguments.output_dir, 'cia', titleid)
        else:
            rawdir = os.path.join('raw', titleid)
            ciadir = os.path.join('cia', titleid)

        if not os.path.exists(rawdir):
            os.makedirs(os.path.join(rawdir))

{ETC}
                #cia generation
                if(arguments.build):
                    if not os.path.exists(ciadir):
                        os.makedirs(ciadir)
                    makecommand = ' ' + os.path.join(rawdir) + ' ' + os.path.join(ciadir, cianame) + '.cia'
                    os.system(execname + makecommand)
                    if(os.path.isfile(os.path.join(ciadir, cianame) + '.cia')):
                        print 'CIA created ok!'
                    else:
                        print 'CIA not created...'
                    print ''
                    print ''

Scrxtchy avatar Apr 28 '16 01:04 Scrxtchy

If you don't want to bother with git, you can always use the web editor. Just save it once you're finished and start a pull request.

noirscape avatar Apr 28 '16 15:04 noirscape

Done #5 was working from a tablet this morning

Scrxtchy avatar Apr 28 '16 15:04 Scrxtchy

I still need to finish making FunKeyCIA more robust and a little more modular. When you specify a single title id, yes I could let you give a name if you really want that. But I wouldn't allow giving multiple names for multiple title ids. You can specify an output directory I think - that is not good enough?

llakssz avatar Apr 29 '16 00:04 llakssz

I've been doing a lot of scripting where it's come in handy Dumping all the titles into one folder, and having the output name as {titleid} -- {titlename} With multiple inputs, instead I just have a 300 line batch file, all just running the program again with names titles etc.

Scrxtchy avatar May 02 '16 09:05 Scrxtchy