Changeset 3559 for trunk/makeTutorial.py


Ignore:
Timestamp:
Aug 8, 2018 4:39:32 PM (3 years ago)
Author:
toby
Message:

revise tutorial web page & remove remaining refs to Exercises directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/makeTutorial.py

    r3552 r3559  
    5151    When this menu entry is used from inside GSAS-II (unless "browse tutorial on web" is selected),
    5252    the data files are downloaded to a local directory and GSAS-II will start from that directory
    53     for most file open commands.
     53    for most file open commands. Most tutorials have also been recorded as videos of the computer screen
     54    along with naration. Links are provided below where videos are available.
    5455    </p>''',file=out)
    5556
     57    videolist = '<UL>'
    5658    for l in tutorialIndex:
    5759        if len(l) == 1:
     
    7173            vname = 'https://anl.box.com/v/' + os.path.splitext(l[1])[0].replace(' ','')[:30]
    7274            if requests.get(vname).status_code == 200:
    73                 print(' [link: <A href="{}">video</A>]'.format(vname),file=out)
     75                video = '<A href="{}">video</A>'.format(vname)
     76                #print(' [link: <A href="{}">video</A>]'.format(vname),file=out)
    7477                #print('Found video',vname)
     78                videolist += '<LI><A href="{}">{}</A></LI>\n'.format(vname,l[2].strip())
    7579            else:
    76                 print('No video',vname)
     80                video =''
     81                print('No video for',vname)
     82            # check for data
    7783            if GSASIIpath.svnList(dataURL,False):
    78                 print(' [link: <A href="{}">Exercise files</A>].'.format(dataURL),file=out)
     84                exampledata = '<A href="{}">Exercise files</A>'.format(dataURL)
     85                #print(' [link: <A href="{}">Exercise files</A>].'.format(dataURL),file=out)
    7986            else:
    80                 print(' [No exercise files].',file=out)
     87                exampledata = ''
     88                #print(' [No exercise files].',file=out)
     89            if video and exampledata:
     90                print(' [links: {}, {}].'.format(video, exampledata),file=out)
     91            elif exampledata:
     92                print(' [link: {}].'.format(exampledata),file=out)
     93            elif video:
     94                print(' [link: {}, no example data].'.format(video),file=out)
     95            else:
     96                print(' [no example data or video].',file=out)
     97               
    8198            if len(l) > 3:
    8299                print("<blockquote><I>"+l[3]+"</I></blockquote>",file=out)
     
    85102    #            print(' (Note that this tutorial requires previous as prerequisite)',file=out)
    86103
     104    videolist += '</UL>\n'
    87105    print('</UL>\n<A name=prereq>* Indented tutorials require the previous unindented tutorial as a prerequisite',file=out)
     106    print('<h3>Tutorials with video-recorded examples</H3>', file=out)
     107    print(videolist, file=out)
    88108    out.close()
Note: See TracChangeset for help on using the changeset viewer.