From f85d8ce8a652fa48bb861da0afa7bb5473774da9 Mon Sep 17 00:00:00 2001 From: "Mike C. Fletcher" Date: Sat, 28 Dec 2019 13:33:21 -0500 Subject: [PATCH] Update tartley projects to github urls, provide first-line links on gh and bb --- directdocs/references.py | 22 +++++++++++----------- directdocs/samples.py | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/directdocs/references.py b/directdocs/references.py index f814c243..b9cfa624 100755 --- a/directdocs/references.py +++ b/directdocs/references.py @@ -34,10 +34,10 @@ def glName( name ): return True return 0 -def glProcess( filename, tokenType,tokenString, xxx_todo_changeme4, xxx_todo_changeme5,lineText ): +def glProcess( filename, tokenType, tokenString, sourceStart, sourceEnd, lineText ): """Process the name in some way""" - (sourceRow,sourceCol) = xxx_todo_changeme4 - (endRow,endCol) = xxx_todo_changeme5 + (sourceRow,sourceCol) = sourceStart + (endRow,endCol) = sourceEnd print(filename, sourceRow, tokenString, lineText.strip()) @@ -77,8 +77,8 @@ def generate_tokens_dir( directory, filterFunction=glName, processFunction=glPro LOGGERHEAD = '%(baseURL)s/view/head:/%(deltaPath)s' GOOGLECODE = '%(baseURL)s/source/browse/trunk/%(deltaPath)s' GOOGLECODE_HG = '%(baseURL)s/source/browse/%(deltaPath)s' -GITHUB = '%(baseURL)s/blob/master/%(deltaPath)s' -BITBUCKET = '%(baseURL)s/src/tip/%(deltaPath)s' +GITHUB = '%(baseURL)s/blob/master/%(deltaPath)s#L%(sourceRow)s' +BITBUCKET = '%(baseURL)s/src/tip/%(deltaPath)s#lines-%(sourceRow)s' class SampleSource( object ): """A source from which samples may be generated""" @@ -220,21 +220,21 @@ def loadData(): ), SampleSource( os.path.join( SAMPLES, 'agog' ), - baseURL='https://bitbucket.org/tartley/algorithmic-generation-of-geometry/', + baseURL='https://github.com/tartley/algorithmic-generation-of-opengl-geometry', projectName = 'AGoG', - urlTemplate = BITBUCKET, + urlTemplate = GITHUB, ), SampleSource( os.path.join( SAMPLES, 'gloopy' ), - baseURL = 'https://bitbucket.org/tartley/gloopy/', + baseURL = 'https://github.com/tartley/gloopy', projectName = 'Gloopy', - urlTemplate = BITBUCKET, + urlTemplate = GITHUB, ), SampleSource( os.path.join( SAMPLES, 'gltutpy' ), - baseURL = 'https://bitbucket.org/tartley/gltutpy/', + baseURL = 'https://github.com/tartley/gltutpy', projectName = 'OpenGL Tutorial (Python Translation)', - urlTemplate = BITBUCKET, + urlTemplate = GITHUB, ), SampleSource( os.path.join( SAMPLES, 'visvis' ), diff --git a/directdocs/samples.py b/directdocs/samples.py index d327f159..6513825e 100755 --- a/directdocs/samples.py +++ b/directdocs/samples.py @@ -159,19 +159,19 @@ def update_command( self ): dirname = 'pygl2d', ), BZRSource( - 'lp:~bebraw/scocca/devel', + 'https://code.launchpad.net/~bebraw/scocca/devel', dirname = 'scocca', ), - HgSource( - 'https://bitbucket.org/tartley/gltutpy', + GITSource( + 'https://github.com/tartley/gltutpy.git', dirname = 'gltutpy', ), - HgSource( - 'https://bitbucket.org/tartley/algorithmic-generation-of-geometry', + GITSource( + 'https://github.com/tartley/algorithmic-generation-of-opengl-geometry.git', dirname = 'agog', ), - HgSource( - 'https://bitbucket.org/tartley/gloopy', + GITSource( + 'https://github.com/tartley/gloopy.git', dirname = 'gloopy', ), GITSource(