Changeset 4845 for trunk/makeTutorial.py


Ignore:
Timestamp:
Mar 8, 2021 1:02:40 PM (8 months ago)
Author:
toby
Message:

Tutorial #50 now in web page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/makeTutorial.py

    r4654 r4845  
    8686    along with naration. Links are provided below where videos are available.
    8787    </p>''',file=out)
    88 
     88    novideo = ''
     89    videocount = 0
     90    tutorialcount = 0
    8991    videolist = '<UL>'
    9092    for l in tutorialIndex:
     
    9294            print("</UL><h4>{}</H4><UL>".format(l[0]),file=out)
    9395        else:
     96            tutorialcount += 1
    9497            pageURL = tutURL+'/'+l[0]+'/'+l[1]
    9598            dataURL = tutURL+'/'+l[0]+'/data'
     
    108111            #if requests.get(vname).status_code == 200:
    109112            if vname in onlineVideos:
     113                videocount += 1
    110114                video = '<A href="{}">video</A>'.format(vname)
    111115                #print(' [link: <A href="{}">video</A>]'.format(vname),file=out)
     
    114118            else:
    115119                video =''
    116                 print('No video for {:45s}{}'.format(videoName,l[2]))
     120                novideo += '\n{:45s}{}'.format(videoName,l[2])
    117121            # check for data
    118122            if GSASIIpath.svnList(dataURL,False):
     
    144148                  file=out)
    145149    out.close()
     150    print("Tutorials without videos",novideo)
     151
     152    print("\nStatistics: {} total tutorials, {} with videos"
     153              .format(tutorialcount,videocount))
Note: See TracChangeset for help on using the changeset viewer.