Kodi Community Forum

Full Version: mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
That's mythicalLibrarian's database. mythicalLibrarian keeps it's database local so that internet is not required and new databases are only downloaded every 23 hours. That's all the information which mythicalLibrarian needs to make a show match, saving thetvdb some bandwidth and preventing failures in the event of internet outage.

However, mythcialLibrarian will delete it's database with the --doMaintenance command line switch.

Code:
mythicalLibrarian --doMaintenance
Just make sure you have all your network drives attached before running that command. It will restore mythicalLibrarian to a clean state. The file tracking and dir tracking will be purged of invalid entries and all database folders will be removed. This command only deals with mythicalLibrarian's database and files.
Ok. as of SVN 405 I'm calling mythicalLibrarian back in action for the SVN with no problems. See my log here documenting 1/16 of tonight's successes. There were a few kinks to work out as far as the Regular Expressions go, but I managed to beat them down like Rodney King. http://pastebin.com/egX0hW5f

So, now that all commands are POSIX friendly and therefore Mac usable, the next step is to bring mythicalLibrarian right to Mac. There's a few kinks to work out. davilla has worked with me quite a bit on this project so far and pointed me in the right directions as far as what is absolutely required for OSX Leopard and Snow Leopard to work properly.

1. agrep
2. Folder locations
3. specific changes needed for mac only because they "think different"

1. I will be hosting agrep on the SVN for use only on mac. A uname should determine this is a Darwin client and be able to make a OSX determination. agrep will be downloaded as a binary onto mac machines into....

2. ...the standard /usr/local/bin folder. This folder does not exist by default, but since there is no posix standard for file placement, I'm using the Linux standard. The folder /usr/local/bin will be created on OSX users hard disks if it does not exist and it will not show up when browsing the file system from the desktop. The file mythicalLibrarian will also be located here. Since we are recreating standard file structures which mac has removed from their distribution we will also need to recreate the PATH variable as well. PATH="$PATH /usr/local/bin" if it is not set and that will get dumped into the ~/.profile file (which does not exist by default on Mac but is honored by BASH), if required.

3. mythicalSetup will be able to run if I can get dialog working. I will have to host that file as well. I will see about finding a version of dialog which can be used on Mac for use with mythicalSetup, but without darwin ports it will be tricky. In the end, it may just be that I end up making darwin ports a requirement for Mac users.

I am working with a Mac that has no internet access currently on a virtual machine, so progress will be slow on this project. Bare with me and let me know if there are any fixes required in the mean time
outleradam:

I played with it on my mac (latest snow leopard) today and have some feedback but don't have time to type it up right now, hopefully later tonight.

You should be referencing MacPorts, not darwin ports, as the latter is no longer as up to date. See http://www.macports.org

I was able to successfully install dialog via MacPorts once I had installed MacPorts 1.8.2 (current version) on Snow Leopard. And mythicalSetup.sh could run, but gave a few errors.

Like I said, I will post more detail when I have some free time.

/gkk
Wow! Great!. Pease post the agrep and dialog binaries as I am having a heck of a time trying to find them pre-compiled for a mac.
It would appear that the macports version of agrep is 2.04 while the aptitude package is 3.0 the options we are after are the "agrep -Byn" switches. -B=best match -y=yes just output the options and do not prompt -n=label each line with a number.

I'm just noting the difference in versions between macports and aptitude. There may be no problems.
More notes from my attempts this morning:

(1) installed Macports 1.8.2
(2) using MacPorts, installed agrep
(3) per wiki's setup instructions, ran curl to get the mythicalSetup.sh
(4) got the following output on first run:
Code:
install package 'dialog' on your system
Verified curl exists
Verified agrep exists
'libnotify-bin' is a non essential missing package on your system
the proper dependencies must be installed...
Debian based users run 'apt-get install dialog libnotify-bin
(5) using MacPorts, installed dialog
(6) tried to install libnotify-bin, "not found" error from MacPorts
(7) tried to install libnotify; that worked, but it had to install an enormous number of dependancies, see output at this pastebin link
(8) ran mythicalSetup.sh again, per wiki. All dependencies found, but, got error before dialog started up, here's the output:
Code:
mythicalSetup gkk$ sudo ./mythicalSetup.sh
gkk
Verified dialog exists
install package ' mysql-server-5.0' on your system
Verified curl exists
Verified agrep exists
Verified libnotify-bin exists
All checks complete!!!
./mythicalSetup.sh: line 53: replace: command not found
./mythicalSetup.sh: line 53: replace: command not found
(8B) dialog started up through the normal setup questions (tho it obviously did not find the mythtv username or the mysql info, as I do not have mythbackend installed on my Mac); I just hit the default answer on all questions, except for XBMC notifications.
(8C) mythicalDiagnostics started up, got the following output including errors
Code:
mythicalLibrarian will now conduct mythicalDiagnostics
Press any key to continue to online testing....

Installation and tests completed successfully
./mythicalSetup.sh: line 522: replace: command not found
./mythicalSetup.sh: line 522: mysql: command not found
./mythicalSetup.sh: line 522: mysql: command not found
./mythicalSetup.sh: line 522: replace: command not found
./mythicalSetup.sh: line 522: mysql: command not found
./mythicalSetup.sh: line 522: replace: command not found
./mythicalSetup.sh: line 522: replace: command not found
./mythicalSetup.sh: line 522: mysql: command not found
ADDING JOB to slot 1
./mythicalSetup.sh: line 532: mysql: command not found
permissions were set for user: gkk
mythicalLibrarian is located in /usr/local/bin
'mythicalLibrarian --help' for more information
Done.

...hope that helps. Let me know if you want any specific testing done, though my time is going to be scarce until the weekend.

/gkk
Thank you! Can you test from the SVN version? That is where the POSIX version is located. I have not yet released the stable for mac.

Moving SVN to stable now.

The lib-notify will be killed eventually. It is not needed, nor possible on Mac. It is an additional feature for mythicalLibrarian which allows desktop users to have bubble notifications.

If you would, please upload the dialog and agrep to mediafire, you can find them using the command whereis. I should just need the primary executable for dialog and agrep.

I am working very hard to get this virtual machine working so I can do my own testing. I really appreciate the help!
outleradam

Notes from today:

(1) tried to whereis agrep and dialog, got no output, don't understand why, (since they are clearly installed) but I will explore a bit further;

(2) tried to run "sudo mythicalLibrarian --update" and got nothing, even tho mythicalLibrarian is there in my ~/.mythicalLibrarian/mythicalSetup directory and also in /usr/local/bin;

(3) so ran "sudo sh mythicalSetup.sh" instead; chose SVN (405) and went through the dialogs. Per your last message, I chose not to use desktop notifications (after you settle down the code you might look into using Growl as your notification system on the Mac, since it is the rough functional equivalent of the linux libnotify: http://growl.info;

got the following output after the dialogs were done:
Code:
mythicalLibrarian will now conduct mythicalDiagnostics
Press any key to continue to online testing....

/usr/local/bin/mythicalLibrarian: line 187: syntax error near unexpected token `('
/usr/local/bin/mythicalLibrarian: line 187: `Tradi    ionalNamingConven    ions () {'
Please try again.  If problem persists, please post here: http://forum.xbmc.org/showthread.php?tid=65644
./mythicalSetup.sh: line 517: mysql: command not found
./mythicalSetup.sh: line 517: mysql: command not found
./mythicalSetup.sh: line 517: mysql: command not found
./mythicalSetup.sh: line 517: mysql: command not found
ADDING JOB to slot 1
./mythicalSetup.sh: line 527: mysql: command not found
permissions were set for user: gkk
mythicalLibrarian is located in /usr/local/bin
'mythicalLibrarian --help' for more information
Done.
atticus:mythicalSetup gkk$

Happy to keep testing where I can, I'll let you know if I am able to upload the binaries you're looking for.

/gkk
outleradam:

agrep is here: http://www.mediafire.com/?l3mttmtiwfj

dialog (Version: 1.1-20100119) is here: http://www.mediafire.com/?wjggmyuminy

/gkk
I guess all macs are not made alike. I'm getting an error about the binaries being compiled for the wrong processor.

mythicalSetup is broken on all platforms currently. Please use manual installation.
outleradam:

Sorry that the binaries didn't work; they were built with MacPorts' defaults, they do machine-specific builds I guess.

If your virtual box is not working, have you considered just getting a used Mac Mini? They're under $200 on Craigslist usually, you could use it for OS X development of your script and then sell it or keep it for use as an xbmc/boxee frontend if you have a need. Just a suggestion if you're banging your head against the wall on the virtual networking and want to cut the proverbial knot.

/gkk
Thanks for the suggestion, but I'll get it eventually. I've got about 5 downloads going of which one should fix it. My main problem is that I update early and there is no VMWare solution for my kernel build. So, worst case scenario, I fire up my XP or windows 7 clients under Java VirtualBox with 2 or 3 processors and 3 gigs of ram, then inside of that, I fire up a mac client with a vmware host. I'm just trying to do it the most direct way.

I was planning on building iPhone apps, but after looking at the boundries, cost of development, and limitations of the ObjectiveC language, I've decided to go with Android and it was easy to set up a virtual android with Java under Eclipse IDE on my linux machine. So I still have no need for a full Mac. I have no use for a whole dedicated mac machine. My dual widescreen monitors take up way too much space as is. I just want to give the options to mac users.
GregoryK, do you have mythtv or mysql installed on your mac?
No, I don't.
mythicalSetup is up in operation again. I'm adding a helpful option for instructions as to how to build agrep and dialog on a mac. Is it really that complicated that you have to register as a mac developer and download 2.4G of Cocoa stuff? That's alot!

There must be an easier way to agrep and dialog on mac.