parameters: (self)
docstring: Retrieve macros from the wiki
  
          Read the wiki and emit a signal for each found macro.
          Reads only the page https://wiki.freecad.org/Macros_recipes
docstring_summary: Retrieve macros from the wiki
docstring_tokens: Retrieve macros from the wiki
function: def retrieve_macros_from_wiki(self):
          """Retrieve macros from the wiki
  
          Read the wiki and emit a signal for each found macro.
          Reads only the page https://wiki.freecad.org/Macros_recipes
          """
  
          p = NetworkManager.AM_NETWORK_MANAGER.blocking_get(
              "https://wiki.freecad.org/Macros_recipes"
          )
          if not p:
              FreeCAD.Console.PrintWarning(
                  translate(
                      "AddonsInstaller",
                      "Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time",
                  )
                  + "\n"
              )
              return
          p = p.data().decode("utf8")
          macros = re.findall('title="(Macro.*?)"', p)
          macros = [mac for mac in macros if ("translated" not in mac)]
          macro_names = []
          for i, mac in enumerate(macros):
              self.progress_made.emit(i, len(macros))
              if self.current_thread.isInterruptionRequested():
                  return
              macname = mac[6:]  # Remove "Macro ".
              macname = macname.replace("&amp;", "&")
              if not macname:
                  continue
              if (
                  (macname not in macros_reject_list)
                  and ("recipes" not in macname.lower())
                  and (macname not in macro_names)
              ):
                  macro_names.append(macname)
                  macro = Macro(macname)
                  macro.on_wiki = True
                  repo = AddonManagerRepo.from_macro(macro)
                  repo.url = "https://wiki.freecad.org/Macros_recipes"
                  utils.update_macro_installation_details(repo)
                  self.add_macro_signal.emit(repo)
function_tokens: def retrieve_macros_from_wiki ( self ) : p = NetworkManager . AM_NETWORK_MANAGER . blocking_get ( "https://wiki.freecad.org/Macros_recipes" ) if not p : FreeCAD . Console . PrintWarning ( translate ( "AddonsInstaller" , "Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time" , ) + "\n" ) return p = p . data ( ) . decode ( "utf8" ) macros = re . findall ( 'title="(Macro.*?)"' , p ) macros = [ mac for mac in macros if ( "translated" not in mac ) ] macro_names = [ ] for i , mac in enumerate ( macros ) : self . progress_made . emit ( i , len ( macros ) ) if self . current_thread . isInterruptionRequested ( ) : return macname = mac [ 6 : ] # Remove "Macro ". macname = macname . replace ( "&amp;" , "&" ) if not macname : continue if ( ( macname not in macros_reject_list ) and ( "recipes" not in macname . lower ( ) ) and ( macname not in macro_names ) ) : macro_names . append ( macname ) macro = Macro ( macname ) macro . on_wiki = True repo = AddonManagerRepo . from_macro ( macro ) repo . url = "https://wiki.freecad.org/Macros_recipes" utils . update_macro_installation_details ( repo ) self . add_macro_signal . emit ( repo )