SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for XBMC (/forumdisplay.php?fid=116)
+--- Thread: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) (/showthread.php?tid=75949)
- cliffe - 2011-03-09 10:40
carmenm Wrote:Hi cliffe,
Great! I look forward to collaboration.
carmenm Wrote:- confirmation for moving files
Cool, just make sure it is optional, since most people use the script non-interactively. Also keep in mind that eventually it would be good if the script had a number of interface options (GUI/xbmc plugin), so put the interaction in a subroutine.
carmenm Wrote:- creating an "undo" script (asking for each file if you want to revert operation)
Great idea. Maybe work by reading the log file. Please add it as an argument option rather than a new script.
carmenm Wrote:- movie integration ( i ll have to look at themoviedb package).
Great! The moviedb perl module I have mentioned before only seems to be available on Linux, not Strawberry Perl, maybe start by checking if that is still the case and find out why.
carmenm Wrote:So i think you should put your project on launchpad or github so that we can work together more easily
The main git repository is hosted on sourceforge. Just clone the repo and work from there. If you set up your own repo on github with your version I can pull from there when you are ready. If you want me to review anything you have done in the mean time just create a patch and post it here or email it to me.
I look forward to some code!
- foe83 - 2011-03-09 13:38
I was thinking of writing a xbmc python script to launch the perl script directly from within xbmc. Since I'm new to python in general I was thinking of doing this in stages:
1. script with 2 options: locate sorttv directory and launch the script (might have to do different options or find a way to pick up which OS xbmc is running on).
2. add second window to set the options and save them to the sorttv config file.
3. perhaps add options to set cron runs or windoz equivalent?
What do you guys think? Should I go ahead with it? Anyone will find it useful?
- carmenm - 2011-03-09 16:05
cliffe Wrote:Great! I look forward to collaboration.Yes i intend to add everything as a function and optional. By the wway you should look at GetOpt for dealing with options. It makes things a lot cleaner and easier.
I use it all the time.
- cliffe - 2011-03-09 16:33
foe83 Wrote:I was thinking of writing a xbmc python script to launch the perl script directly from within xbmc. Since I'm new to python in general I was thinking of doing this in stages:
Sounds just like what I was hoping for.
I think the Perl and Python scripts could be bundled together, so that SortTV could be installed from within xbmc etc. So you can probably assume the other script is in the same directory.
The interface should be designed so that changes in the options accepted by sorttv.pl are easily detected. Maybe the easiest way to achieve that would be for sorttv.pl to provide a list of options and their accepted values, which the interface script could use to build the options interface. The output from --help would already provide most of the information required. For example, if "sorttv.pl –help" reports the option "--rename-episodes:[TRUE|FALSE]", then the interface provides a combo/spinbox with those two options, and it can be populated with the default value or the value in a config file.
If the logic is abstracted from the gui then it wouldn't be to hard to also have another version of the interface that is independent of xbmc.
I am very keen to add a friendly interface to SortTV, and would love to include the python script in the SortTV releases.
- carmenm - 2011-03-09 16:34
i am changing the script to use GetOpt. Should i commit? How do you want me to process?
- cliffe - 2011-03-09 17:05
carmenm Wrote:i am changing the script to use GetOpt. Should i commit? How do you want me to process?
I plan to use the workflow described here:
Please commit each new feature to a separate branch then send me a pull request when you are ready for me to review and merge your work.
Edit: Alternatively feel free to use git to create patches and send them to me via email or on this forum. Also, everyone else should feel free to continue to create patches the simple way (with diff -u).
- carmenm - 2011-03-09 17:52
how do i create a new branch on sourceforge?
I have branched locally, switched to it, commited. But now i want to push it in a new branch on your repo. I dont see how to do that
- cliffe - 2011-03-09 18:05
carmenm Wrote:how do i create a new branch on sourceforge?
You commit it to your own remote repo (for example, on github), and I'll then take a look at it, and if I don't have any change requests I will merge it into the main repo, then later you can pull the accepted changes back into yours.
Quote:1.The project maintainer pushes to their public repository.
- carmenm - 2011-03-09 18:50
ok. i thought i could create a branch on sourceforge.
will create a branch on my github
- carmenm - 2011-03-10 12:26
here is the fork i have done from your work cliffe
I changed the option parsing to use GetOpt::Long
and made a first draft at creating an undo script