MythTV 0.25-pre
Classes | Functions | Variables
jamu Namespace Reference

Classes

class  OutStreamEncoder
class  VideoTypes
class  singleinstance
class  BaseUI
class  jamu_ConsoleUI
class  Configuration
class  Tvdatabase
class  VideoFiles
class  MythTvMetaData

Functions

def isValidPosixFilename
def is_punct_char
def is_not_punct_char
def _getExtention
def _getFileList
def getStorageGroups
def _can_int
def _useImageMagick
def callCommandLine
def simple_example
def main

Variables

string __title__ = "JAMU - Just.Another.Metadata.Utility"
string __author__ = "R.D.Vaughan"
string __purpose__
string __version__ = u"v0.8.0"
string usage_txt = u''
string examples_txt = u''
 mythdb = None
 mythvideo = None
 mythbeconn = None
tuple filename = os.path.expanduser("~")
tuple localhostname = mythdb.gethostname()
 imdb_lib = True
dictionary graphicsDirectories = {'banner': u'bannerdir', 'screenshot': u'episodeimagedir', 'coverfile': u'posterdir', 'fanart': u'fanartdir'}
dictionary dir_dict = {'posterdir': "VideoArtworkDir", 'bannerdir': 'mythvideo.bannerDir', 'fanartdir': 'mythvideo.fanartDir', 'episodeimagedir': 'mythvideo.screenshotDir', 'mythvideo': 'VideoStartupDir'}
dictionary storagegroupnames = {u'Videos': u'mythvideo', u'Coverart': u'posterdir', u'Banners': u'bannerdir', u'Fanart': u'fanartdir', u'Screenshots': u'episodeimagedir'}
dictionary storagegroups = {u'mythvideo': [], u'posterdir': [], u'bannerdir': [], u'fanartdir': [], u'episodeimagedir': []}
list image_extensions = ["png", "jpg", "bmp"]
string video_type = u''
string UI_title = u''
string UI_search_language = u''
string UI_selectedtitle = u''
dictionary UI_langid_dict = {u'da': u'10', 'fi': u'11', u'nl': u'13', u'de': u'14', u'it': u'15', u'es': u'16', u'fr': u'17', u'pl': u'18', u'hu': u'19', u'el': u'20', u'tr': u'21', u'ru': u'22', u'he': u'24', u'ja': u'25', u'pt': u'26', u'zh': u'27', u'cs': u'28', u'sl': u'30', u'hr': u'31', u'ko': u'32', u'en': '7', u'sv': u'8', u'no': u'9',}

Function Documentation

def jamu::isValidPosixFilename (   name,
  NAME_MAX = 255 
)
Checks for a valid POSIX filename

Filename: a name consisting of 1 to {NAME_MAX} bytes used to name a file.
    The characters composing the name may be selected from the set of
    all character values excluding the slash character and the null byte.
    The filenames dot and dot-dot have special meaning.
    A filename is sometimes referred to as a "pathname component".

name: (base)name of the file
NAME_MAX: is defined in limits.h (implementation-defined constants)
          Maximum number of bytes in a filename
          (not including terminating null).
          Minimum Acceptable Value: {_POSIX_NAME_MAX}
          _POSIX_NAME_MAX: Maximum number of bytes in a filename
                           (not including terminating null).
                           Value: 14

More information on http://www.opengroup.org/onlinepubs/009695399/toc.htm

Definition at line 606 of file jamu.py.

def jamu::is_punct_char (   char)
check if char is punctuation char
return True if char is punctuation
return False if char is not punctuation

Definition at line 631 of file jamu.py.

def jamu::is_not_punct_char (   char)
check if char is not punctuation char
return True if char is not punctuation
return False if chaar is punctuation

Definition at line 638 of file jamu.py.

def jamu::_getExtention (   URL) [private]
Get the graphic file extension from a URL
return the file extention from the URL

Definition at line 645 of file jamu.py.

def jamu::_getFileList (   dst) [private]
Create an array of fully qualified file names
return an array of file names

Definition at line 654 of file jamu.py.

def jamu::getStorageGroups ( )
Populate the storage group dictionary with the local host's storage groups.
return nothing

Definition at line 751 of file jamu.py.

def jamu::_can_int (   x) [private]
Takes a string, checks if it is numeric.
>>> _can_int("2")
True
>>> _can_int("A test")
False

Definition at line 794 of file jamu.py.

def jamu::_useImageMagick (   cmd) [private]
Process graphics files using ImageMagick's utility 'mogrify'.
>>> _useImageMagick('-resize 50% "poster.jpg"')
>>> 0
>>> -1

Definition at line 1002 of file jamu.py.

def jamu::callCommandLine (   command)
Call a command line script or program. Display any errors
return all stdoutput as a string

Definition at line 1012 of file jamu.py.

def jamu::simple_example ( )
Simple example of using jamu
Displays the poster graphics URL(s) and episode meta data for the TV series Sanctuary, season 1
episode 3
returns None if there was no data found for the request TV series
returns False if there is no TV series as specified
returns a string with poster URLs and episode meta data

Definition at line 6180 of file jamu.py.

def jamu::main ( void  )
Support jamu from the command line
returns True

Definition at line 6207 of file jamu.py.


Variable Documentation

string jamu::__title__ = "JAMU - Just.Another.Metadata.Utility"

Definition at line 38 of file jamu.py.

string jamu::__author__ = "R.D.Vaughan"

Definition at line 39 of file jamu.py.

Initial value:
00001 '''
00002 This python script is intended to perform a variety of utility functions on mythvideo metadata
00003 and the associated video files.
00004 
00005 The primary movie source for graphics and data is themoviedb.com wiki.
00006 The primary TV Series source for graphics and data is thetvdb.com wiki.
00007 Users of this script are encouraged to populate both themoviedb.com and thetvdb.com with posters,
00008 fan art and banners and meta data. The richer the source the more valuable the script.
00009 '''

Definition at line 40 of file jamu.py.

Definition at line 50 of file jamu.py.

Definition at line 316 of file jamu.py.

Definition at line 343 of file jamu.py.

tuple jamu::mythdb = None

Definition at line 498 of file jamu.py.

tuple jamu::mythvideo = None

Definition at line 499 of file jamu.py.

Referenced by RunVideoScreen(), and VideoDialog::SwitchLayout().

tuple jamu::mythbeconn = None

Definition at line 500 of file jamu.py.

tuple jamu::filename = os.path.expanduser("~")

Definition at line 510 of file jamu.py.

Referenced by FileScanner::AddFileToDB(), AlbumArtImages::addImage(), MPEG2fixup::AddSequence(), VideoPlayerCommandPrivate::AltPlayerFor(), Myth::BackupDatabase(), FileScanner::BuildFileList(), BuildVideoMarkup(), ImportIconsWizard::checkAndDownload(), CheckFreeDBServerFile(), NetTree::cleanCacheDir(), NetSearch::cleanCacheDir(), cleanThumbnailCacheDir(), CompleteJob(), TV::customEvent(), MythWebView::customEvent(), MythUIImage::customEvent(), MythMainWindow::customEvent(), MusicPlayer::customEvent(), RemoteFile::DeleteFile(), PlaybackSock::DeleteFile(), Ripper::deleteTrack(), dir_read_mythiowrapper(), NetTree::doDeleteVideo(), NetSearch::doDeleteVideo(), MythMainWindow::doRemoteScreenShot(), JobQueue::DoTranscodeThread(), doUpgradeMusicDatabaseSchema(), Content::DownloadFile(), downloadRemoteFile(), UIImageGridType::drawCell(), DVDFileStat(), DVDFileStatVOBPath(), DVDFileStatVOBUDF(), DVDInfo::DVDInfo(), DVDOpenFile(), DVDOpenVOBPath(), DVDOpenVOBUDF(), PreviewGeneratorQueue::event(), RemoteFile::Exists(), NativeArchive::exportRecording(), NativeArchive::exportVideo(), MythWebPage::extension(), fileForTrack(), Ripper::filenameFromMetadata(), Scheduler::FillRecordingDir(), MythThemedMenu::findDepends(), StorageGroup::FindFile(), StorageGroup::FindFileDir(), FlagCommercials(), PreviewGeneratorQueue::GeneratePreviewImage(), get_filename(), Metadata::getAlbumArtFile(), getBaseName(), ThumbFinder::getChapterCount(), getCutFrames(), RemoteFile::GetFileHash(), StorageGroup::GetFileInfo(), MusicPlayer::getFilenameFromID(), getFrameCount(), MusicDirectoryTreeBuilder::getPathsForMeta(), StorageGroup::GetRelativePathname(), MythCommandLineParser::GetSettingsOverride(), PlaybackSock::GetSGFileQuery(), DVDThemeSelector::getThemeList(), FillData::GrabData(), grabThumbnail(), MainServer::HandleAnnounce(), FileServerHandler::HandleAnnounce(), ChannelData::handleChannels(), VideoDialog::handleDownloadedImages(), GameUI::handleDownloadedImages(), MainServer::HandleDownloadFile(), FileServerHandler::HandleDownloadFile(), FileServerHandler::HandleFileQuery(), FileServerHandler::HandleQueryFileExists(), FileServerHandler::HandleQueryFileHash(), if(), MythUIWebBrowser::Init(), initAllCSSKeys(), RemoteFile::LastModified(), lirc_getfilename(), lirc_open(), lirc_readconfig(), MythUIImage::Load(), MythUIImage::LoadAnimatedImage(), SubtitleScreen::LoadAssFonts(), MythBurn::loadEncoderProfiles(), ProgDetails::loadHTML(), UIImageType::LoadImage(), MythUIImage::LoadImage(), MythUIGuideGrid::LoadImage(), loadScreens(), main(), mythfile_stat_fd(), MythUIImage::MythUIImage(), AvFormatDecoder::OpenFile(), parse_settings(), RSSEditPopup::parseAndSave(), UnzipPrivate::parseCentralDirectoryRecord(), XMLParse::parseImage(), UnzipPrivate::parseLocalHeaderRecord(), MythThemedMenu::parseMenu(), XMLParse::parseRepeatedImage(), playDisc(), VideoPlayerCommandPrivate::PlayerFor(), MythNewsConfig::populateSites(), GameHandler::promptForRemoval(), Q_DECLARE_METATYPE(), MetaIO::readFromFilename(), FileLogger::reopen(), AllMusic::resync(), MetadataImageDownload::run(), runTestDVD(), PreviewGenerator::SaveOutFile(), ImportCoverArtDialog::scanDirectory(), ImportMusicDialog::scanDirectory(), MythUIGuideGrid::SetArrow(), UIImageGridType::setDefaultImage(), VideoMetadataImp::SetFilename(), MythUIImage::SetFilename(), UIImageGridType::setHighlightedImage(), MythUIButtonListItem::SetImage(), ThumbItem::SetImageFilename(), UIImageGridType::setNormalImage(), UIImageGridType::setSelectedImage(), NetSearch::showMenu(), NetSearch::slotItemChanged(), RSSEditPopup::slotSave(), UDFScanDir(), UIImageType::UIImageType(), MusicCommon::updateAlbumArtImage(), FileScanner::UpdateFileInDB(), UpdateHashes(), NetTree::UpdateItem(), MusicCommon::updateTrackInfo(), ImportCoverArtDialog::updateTypeSelector(), MetaIOID3::writeVolatileMetadata(), XMLTV_generic_config::XMLTV_generic_config(), FlacEncoder::~FlacEncoder(), LameEncoder::~LameEncoder(), and VorbisEncoder::~VorbisEncoder().

tuple jamu::localhostname = mythdb.gethostname()

Definition at line 570 of file jamu.py.

dictionary jamu::graphicsDirectories = {'banner': u'bannerdir', 'screenshot': u'episodeimagedir', 'coverfile': u'posterdir', 'fanart': u'fanartdir'}

Definition at line 745 of file jamu.py.

dictionary jamu::dir_dict = {'posterdir': "VideoArtworkDir", 'bannerdir': 'mythvideo.bannerDir', 'fanartdir': 'mythvideo.fanartDir', 'episodeimagedir': 'mythvideo.screenshotDir', 'mythvideo': 'VideoStartupDir'}

Definition at line 746 of file jamu.py.

dictionary jamu::storagegroupnames = {u'Videos': u'mythvideo', u'Coverart': u'posterdir', u'Banners': u'bannerdir', u'Fanart': u'fanartdir', u'Screenshots': u'episodeimagedir'}

Definition at line 747 of file jamu.py.

dictionary jamu::storagegroups = {u'mythvideo': [], u'posterdir': [], u'bannerdir': [], u'fanartdir': [], u'episodeimagedir': []}

Definition at line 748 of file jamu.py.

list jamu::image_extensions = ["png", "jpg", "bmp"]

Definition at line 749 of file jamu.py.

Definition at line 825 of file jamu.py.

Definition at line 826 of file jamu.py.

Definition at line 827 of file jamu.py.

Definition at line 828 of file jamu.py.

dictionary jamu::UI_langid_dict = {u'da': u'10', 'fi': u'11', u'nl': u'13', u'de': u'14', u'it': u'15', u'es': u'16', u'fr': u'17', u'pl': u'18', u'hu': u'19', u'el': u'20', u'tr': u'21', u'ru': u'22', u'he': u'24', u'ja': u'25', u'pt': u'26', u'zh': u'27', u'cs': u'28', u'sl': u'30', u'hr': u'31', u'ko': u'32', u'en': '7', u'sv': u'8', u'no': u'9',}

Definition at line 832 of file jamu.py.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends