Giter Site home page Giter Site logo

Comments (6)

robertclemens avatar robertclemens commented on July 20, 2024

Potentially you could just merge into a single script and specify --cut (comcut) to enter the cut phase and have the chapter markers only (comchap) as the default if not specified?

I suppose that is what I would do but there could be better options.

I also don't recall if you can tag the postprocessing field within Plex with any --command options or if you need to call a script to pass those to comcut/comchap.

from comchap.

BrettSheleski avatar BrettSheleski commented on July 20, 2024

I don't like the idea of merging the two to a single script for various reasons.

I also dont think you can specify command line arguments for Plex post processing. However being directly specified as a Plex post processing script is not a priority at all.

I'm thinking of moving all commonality (read command line arguments, etc) to a third file which both comcut and comchap will reference in some way and leaving comchap/comcut to do the nitty-gritty.

from comchap.

Reed97123 avatar Reed97123 commented on July 20, 2024

I would suggest one underlying script that does everything, but with two separate front-end wrappers.

The back-end combined script would do everything depending on what options are put in from either the comchap or comcut wrappers. The comchap wrapper would retain it's same interface and would simply pass the appropriate comchap settings to the backend. Same for the comcut wrapper. The wrappers would be very simple just setting up and passing the appropriate arguments.

from comchap.

BrettSheleski avatar BrettSheleski commented on July 20, 2024

I made a "refactor" branch for this. I may push some things to it and see how I like it. If I like it enough I'll push the changes to master.

My thought is to have a libcomchap script that does all the common tasks defined in functions like read command line arguments, setup various variables, etc. Then within comcut and comchap I'd call the functions, then do their specific tasks, then call the cleanup functions.

I'm assuming I'd use the source command to do this. I'm just unsure how that would work with variable scopes across the two files. Experimentation will answer this. I believe it'll work as intended.

Also, my intent is to have all 3 files live in a lib folder (/usr/local/lib I believe) then add symlinks to the bin directory for just the comcut and comchap scripts. The scripts would have to figure out where they "really" live to source the libcomchap file in the lib directory.

The existing Makefile should work to install everything without needing alteration.

from comchap.

Reed97123 avatar Reed97123 commented on July 20, 2024

I'm a little hesitant on needing an install for the script, but otherwise I think it's a good idea to combine some of the functionality and reduce code duplication.

from comchap.

BrettSheleski avatar BrettSheleski commented on July 20, 2024

The install process is really unnecessary and optional. If you like needing to specify the path to comcut/comchap, it's really unneeded. I just don't like neding to remember full paths to things and prefer to add symlinks to the /usr/local/bin directory.

I just made a Makefile to automate this for consistency. Just my preference. However it does introduce this little issue.

from comchap.

Related Issues (20)

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.