parameters: (src_dir, target_dir, match='*.rst')
docstring: Yield tuples of (source, dest) filenames.
  
      The first element in each tuple is the path to a file in *src_dir* that
      matches '**/{match}'. The second is the same path, below *target_dir*,
      modified as described above.
docstring_summary: Yield tuples of (source, dest) filenames.
docstring_tokens: Yield tuples of ( source dest ) filenames .
function: def find_inline_docs(src_dir, target_dir, match='*.rst'):
      """Yield tuples of (source, dest) filenames.
  
      The first element in each tuple is the path to a file in *src_dir* that
      matches '**/{match}'. The second is the same path, below *target_dir*,
      modified as described above.
      """
      for source in src_dir.glob('**/' + match):
          base = source.relative_to(src_dir)
  
          # Perform modifications. Delete these if you like.
          if base.parent.stem == 'doc' and base.stem == 'index':
              dest = base.parents[1]
          elif base.stem == 'doc':
              dest = base.parent
          else:
              pass   # No change
  
          yield source, target_dir / dest.with_suffix(source.suffix)
function_tokens: def find_inline_docs ( src_dir , target_dir , match = '*.rst' ) : for source in src_dir . glob ( '**/' + match ) : base = source . relative_to ( src_dir ) # Perform modifications. Delete these if you like. if base . parent . stem == 'doc' and base . stem == 'index' : dest = base . parents [ 1 ] elif base . stem == 'doc' : dest = base . parent else : pass # No change yield source , target_dir / dest . with_suffix ( source . suffix )