Example #1
0
 def getArtistSavename(self, discID, page=1, credit=False, unofficial=False):
     artistDir = self.disc.getArtistsDir()
     modValue  = self.dutils.getDiscIDHashMod(discID=discID, modval=self.disc.getMaxModVal())
     if modValue is not None:
         outdir    = mkSubDir(artistDir, str(modValue))
         if isinstance(page, int) and page > 1:
             outdir = mkSubDir(outdir, "extra")
             savename  = setFile(outdir, discID+"-{0}.p".format(page))
         elif credit is True:
             outdir = mkSubDir(outdir, "credit")
             savename  = setFile(outdir, discID+".p")
         elif unofficial is True:
             outdir = mkSubDir(outdir, "unofficial")
             savename  = setFile(outdir, discID+".p")
         else:
             savename  = setFile(outdir, discID+".p")
             
         return savename
     return None
Example #2
0
    def __init__(self):
        self.name = "historical"
        espn.__init__(self)
        output.__init__(self)

        self.logger = logging.getLogger('log.{0}.{1}'.format(
            __name__, self.__class__))

        ## 2015
        self.noGameData2003 = [
            '232350023', '232400195', '232400254', '232402006', '232402050',
            '232412439', '232420021', '232420062', '232420167', '232420235',
            '232420248', '232420276', '232422005', '232422426', '232422440',
            '232422751', '232442132', '232470005', '232490068', '232490309',
            '232490349', '232492638', '232492649', '232492655', '232550276',
            '232560005', '232560036', '232560070', '232560167', '232560189',
            '232560202', '232560309', '232562005', '232562084', '232562572',
            '232562638', '232610023', '232630021', '232630036', '232630097',
            '232630202', '232630278', '232630349', '232632005', '232632006',
            '232632084', '232632426', '232632439', '232700036', '232700062',
            '232700068', '232700149', '232700167', '232700193', '232700235',
            '232700252', '232700278', '232700349', '232702084', '232702440',
            '232702638', '232702653', '232730151', '232770021', '232770036',
            '232770041', '232770058', '232770166', '232770167', '232770193',
            '232770202', '232770235', '232770242', '232772132', '232772309',
            '232772348', '232772426', '232772440', '232772567', '232820252',
            '232840005', '232840023', '232840062', '232840068', '232840070',
            '232840097', '232840254', '232840276', '232840328', '232842005',
            '232842006', '232842638', '232842655', '232890036', '232900097',
            '232910021', '232910202', '232910242', '232910248', '232910249',
            '232910349', '232912006', '232912084', '232912309', '232912348',
            '232912439', '232912567', '232912751', '232980021', '232980062',
            '232980068', '232980151', '232980202', '232980278', '232980328',
            '232982050', '232982084', '232982132', '232982426', '232982439',
            '232982440', '232982572', '232982655', '233040252', '233050005',
            '233050023', '233050166', '233050167', '233050235', '233050242',
            '233050276', '233052005', '233052426', '233052567', '233052572',
            '233052638', '233052649', '233052751', '233110167', '233120005',
            '233120087', '233120151', '233120195', '233120242', '233120248',
            '233122005', '233122032', '233122132', '233122348', '233122439',
            '233122440', '233122638', '233190036', '233190087', '233190097',
            '233190167', '233190202', '233190249', '233190254', '233190278',
            '233190328', '233190349', '233192006', '233192440', '233192567',
            '233192572', '233260021', '233260023', '233260058', '233260062',
            '233260070', '233260097', '233260235', '233260242', '233260252',
            '233262309', '233262426', '233262439', '233262655', '233262751',
            '233290166', '233320276', '233322132', '233330151', '233330154',
            '233330235', '233330248', '233332348', '233332638', '233332751',
            '233402426'
        ]
        self.noGameData2003 += ['232352306']
        self.noGameData2004 = [
            '242480068', '242480195', '242480242', '242480252', '242480276',
            '242482751', '242550058', '242550189', '242550235', '242550349',
            '242552005', '242552006', '242552426', '242552628', '242620023',
            '242620166', '242620202', '242620242', '242620248', '242622439',
            '242622440', '242690005', '242690021', '242690036', '242690166',
            '242690195', '242692567', '242692655', '242730276', '242742005',
            '242760023', '242760036', '242760058', '242760062', '242760235',
            '242760249', '242760349', '242762084', '242762132', '242762439',
            '242762649', '242812572', '242820252', '242830062', '242830195',
            '242830242', '242830278', '242830328', '242830349', '242832005',
            '242832006', '242832116', '242890005', '242900058', '242900189',
            '242900235', '242900252', '242902032', '242902116', '242902426',
            '242902439', '242902440', '242902567', '242902649', '242960036',
            '242970062', '242970195', '242970249', '242970276', '242972005',
            '242972006', '242972132', '242972393', '242972426', '242972440',
            '242972572', '242972628', '242972649', '242972655', '243040023',
            '243040036', '243040189', '243040202', '243040248', '243040276',
            '243040278', '243042132', '243042393', '243042426', '243042751',
            '243102006', '243110062', '243110070', '243110189', '243110242',
            '243110252', '243110349', '243112116', '243112439', '243112440',
            '243112655', '243142459', '243162032', '243170278', '243180005',
            '243180036', '243180058', '243180189', '243180195', '243180249',
            '243180252', '243182005', '243182050', '243182084', '243182567',
            '243182655', '243232032', '243250021', '243250062', '243250151',
            '243250167', '243250202', '243250276', '243250278', '243250349',
            '243252005', '243252132', '243252628', '243282116', '243282649',
            '243320023', '243322572', '243322628', '243340242', '243392426'
        ]
        self.noGameData2005 = [
            '252460008', '252460023', '252460066', '252460204', '252460258',
            '252462032', '252462567', '252530008', '252530084', '252530096',
            '252530239', '252600024', '252600025', '252600154', '252600264',
            '252600265', '252602005', '252670070', '252670238', '252672306',
            '252672567', '252740023', '252740062', '252740070', '252740204',
            '252770249', '252810008', '252810166', '252810328', '252812348',
            '252812440', '252880062', '252880068', '252880278', '252882440',
            '252950023', '252950154', '252952306', '253020068', '253020096',
            '253020204', '253020252', '253022306', '253022348', '253090068',
            '253090328', '253092440', '253160062', '253160070', '253160166',
            '253160238', '253160349', '253162032', '253230008', '253230023',
            '253230068', '253230152', '253230328', '253230349', '253232306',
            '253232426', '253232439', '253300023', '253300166', '253300249',
            '253302348'
        ]
        self.noGameData2006 = [
            '262440278', '262450084', '262450152', '262450264', '262452306',
            '262452509', '262520008', '262520059', '262520096', '262520239',
            '262520252', '262520258', '262522306', '262590070', '262590166',
            '262590258', '262590264', '262590265', '262590333', '262592348',
            '262660024', '262660145', '262660238', '262660239', '262660252',
            '262730096', '262730204', '262730238', '262730239', '262730328',
            '262800070', '262800328', '262870024', '262870265', '262870278',
            '262942032', '262942348', '262942440', '263010023', '263012306',
            '263012440', '263080070', '263080166', '263080204', '263080249',
            '263080265', '263080328', '263082393', '263082653', '263150062',
            '263150096', '263150264', '263150278', '263150309', '263152032',
            '263152226', '263152229', '263152440', '263220062', '263220096',
            '263220249', '263220276', '263220278', '263222348', '263222653',
            '263282348', '263290070', '263290145', '263290309', '263290328',
            '263292393', '263292433', '263360023', '263360166', '263360309',
            '263362229'
        ]
        self.noGameData2007 = [
            '272440009', '272440058', '272440150', '272440153', '272440195',
            '272440238', '272440242', '272440245', '272442226', '272442579',
            '272510012', '272510070', '272510167', '272510197', '272510218',
            '272510265', '272512567', '272580202', '272580204', '272580235',
            '272582032', '272650009', '272650021', '272650070', '272650195',
            '272650248', '272650249', '272652084', '272652638', '272702032',
            '272720008', '272720195', '272720197', '272720202', '272720248',
            '272790150', '272790218', '272792084', '272792309', '272792638',
            '272860005', '272860024', '272860036', '272860193', '272862032',
            '272862084', '272930005', '272930197', '272930218', '272930242',
            '273002084', '273002638', '273070005', '273070070', '273070145',
            '273070150', '273070193', '273070236', '273070242', '273072032',
            '273072633', '273140005', '273140167', '273140202', '273140276',
            '273142459', '273142567', '273210036', '273210098', '273210218',
            '273210242', '273210248', '273210333', '273212084', '273212348',
            '273212567', '273212638', '273280021', '273280070', '273280167',
            '273280242', '273280248', '273280276', '273282229', '273282459',
            '273352653'
        ]
        self.noGameData2008 = [
            '282430005', '282430012', '282430084', '282500012', '282500036',
            '282500070', '282500183', '282502032', '282570248', '282572032',
            '282642655', '282710218', '282712649', '282780166', '282782649',
            '282850021', '282990070', '282990249', '282992649', '283060258',
            '283062638', '283132393', '283250059', '283262649', '283270218',
            '283330218', '283412229'
        ]
        self.noGameData2009 = [
            '292460218', '292480193', '292480238', '292550249', '292622348',
            '292760021', '292762084', '292830218', '292830235', '292830265',
            '292832084', '292900195', '292970193', '293042638', '293180235',
            '293250023', '293312006', '293392348'
        ]
        self.noGameData2010 = [
            '302452309', '302470103', '302472199', '302540077', '302540142',
            '302612638', '302680077', '302680183', '302820195', '302820249',
            '302890098', '302890249', '302960070', '302962032', '303030062',
            '303032226', '303100249', '303172116', '303310278', '303312229',
            '303312653'
        ]
        self.noGameData2011 = [
            '312462633', '312532006', '312600235', '312602439', '312670235',
            '312672653', '313160202', '313160235', '313302348'
        ]
        self.noGameData2012 = [
            '322430328', '322450154', '322450167', '322520036', '322592572',
            '322592638', '322662655', '322730113', '322732459', '322732655',
            '322870195', '322872655', '323152006', '323220113'
        ]
        self.noGameData2013 = ['333580204']
        self.noGameData2014 = [
            '400548012', '400548062', '400548068', '400548080', '400548081',
            '400548095', '400548125', '400548227', '400548409', '400547715',
            '400547809', '400547919', '400548223', '400548269', '400548416'
        ]
        self.noGameData2015 = [
            '400787481', '400763646', '400763654', '400787345', '400787363',
            '400787107', '400787357'
        ]
        self.noGameData2016 = [
            '400868914', '400868922', '400868930', '400868960', '400869143',
            '400869274', '400869306', '400869182', '400869229', '400869241',
            '400869370', '400869569', '400869156', '400869353', '400869383',
            '400869390', '400869539', '400869819', '400869828', '400869842'
        ]
        self.noGameData2017 = [
            '400941794', '400944828', '400935239', '400944873', '400944860'
        ]
        self.noGameData2018 = []

        self.noGameData = self.noGameData2003 + self.noGameData2004 + self.noGameData2005 + self.noGameData2006 + self.noGameData2007 + self.noGameData2008 + self.noGameData2009
        self.noGameData += self.noGameData2010 + self.noGameData2011 + self.noGameData2012 + self.noGameData2013 + self.noGameData2014 + self.noGameData2015 + self.noGameData2016
        self.noGameData += self.noGameData2017 + self.noGameData2018

        subdir = "season"
        outputdir = mkSubDir(self.getSaveDir(), subdir)
        self.seasonDir = outputdir

        subdir = "statistics"
        outputdir = mkSubDir(self.getSaveDir(), subdir)
        self.statisticsDir = outputdir

        subdir = "results"
        outputdir = mkSubDir(self.getSaveDir(), subdir)
        self.resultsDir = outputdir

        subdir = "games"
        outputdir = mkSubDir(self.getSaveDir(), subdir)
        self.gamesDir = outputdir

        subdir = "season"
        outputdir = mkSubDir(self.getResultsDir(), subdir)
        self.seasonResultsDir = outputdir

        subdir = "statistics"
        outputdir = mkSubDir(self.getResultsDir(), subdir)
        self.statisticsResultsDir = outputdir

        subdir = "games"
        outputdir = mkSubDir(self.getResultsDir(), subdir)
        self.gamesResultsDir = outputdir
Example #3
0
 def getYearlyStatisticsDir(self, year):
     outputdir = mkSubDir(self.getStatisticsDir(), str(year))
     return outputdir
Example #4
0
 def getYearlyGamesDir(self, year):
     outputdir = mkSubDir(self.getGamesDir(), str(year))
     return outputdir
Example #5
0
 def getYearlySeasonDir(self, year):
     outputdir = mkSubDir(self.getSeasonDir(), str(year))
     return outputdir