MCPcopy Create free account
hub / github.com/chasingboy/Xtools / SelectDomainRootAllCommand

Class SelectDomainRootAllCommand

xtools.py:122–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122class SelectDomainRootAllCommand(sublime_plugin.TextCommand):
123 def remove(self,edit):
124 exts = ['.html','.login','.action','.htm','.shtml','.asp','.aspx','.jsp','.jspx']
125 text = get_buffer_text(self.view)
126 _text = text
127 for ext in exts:
128 _text = _text.lower().replace(ext,'#####')
129 update_file(self.view, edit, _text)
130
131 return text
132
133 def run(self, edit, cmd):
134 text = self.remove(edit)
135 domains,rootdomains = select_domain(self.view)
136 update_file(self.view, edit, text)
137
138 text = '\n'.join(rootdomains) if cmd == 'root' else '\n'.join(domains)
139 new_view(self.view, edit, text)
140
141
142class FilterDnsCdnHostCommand(sublime_plugin.TextCommand):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected