Set complete flag for this comic, ie. all comics are downloaded.
510244
def setComplete(self, basepath):
        """"""
        if self.endOfLife:
            filename = self.getCompleteFile(basepath)
            if not os.path.exists(filename):
                with open(filename, 'w') as f:
                    f.write('All comics should be downloaded here.')
602445
def save_all_figures_as(self):
        """"""
        self.redirect_stdio.emit(False)
        dirname = getexistingdirectory(self, caption='Save all figures',
                                       basedir=getcwd_or_home())
        self.redirect_stdio.emit(True)
        if dirname:
            return self.save_all_figures_todir(dirname)
1350915
def comicDownloaded(self, comic, filename, text=None):
        """"""
        imageUrl = self.getUrlFromFilename(filename)
        size = None
        if self.allowdownscale:
            size = getDimensionForImage(filename, MaxImageSize)
        title = '%s - %s' % (comic.name, os.path.basename(filename))
        pageUrl = comic.referrer
        description = '<img src="%s"' % imageUrl
        if size:
            description += ' width="%d" height="%d"' % size
        description += '/>'
        if text:
            description += '<br/>%s' % text
        description += '<br/><a href="%s">View Comic Online</a>' % pageUrl
        args = (
            title,
            imageUrl,
            description,
            util.rfc822date(time.time())
        )

        if self.newfile:
            self.newfile = False
            self.rss.addItem(*args)
        else:
            self.rss.addItem(*args, append=False)
973461
def preconstrain_flag_page(self, magic_content):
        
        for m, v in zip(magic_content, self.state.cgc.flag_bytes):
            self.preconstrain(m, v)
642326
function setAllowLabel () {
  var values = getCheckedAndUnchecked(
    form.allow.json, form.allow.yaml, form.allow.text, form.allow.empty, form.allow.unknown);

  switch (values.checked.length) {
    case 0:
      form.allow.label.text("No file types allowed");
      break;
    case 1:
      form.allow.label.text("Only allow " + values.checked[0] + " files");
      break;
    case 2:
      form.allow.label.text("Only allow " + values.checked[0] + " and " + values.checked[1]);
      break;
    case 3:
      form.allow.label.text("Don't allow " + values.unchecked[0] + " or " + values.unchecked[1]);
      break;
    case 4:
      form.allow.label.text("Don't allow " + values.unchecked[0] + " files");
      break;
    case 5:
      form.allow.label.text("Allow all file types");
  }
}
397546
def set_complete_message(self, message):
        """"""

        @self.connect
        def on_complete(**kwargs):
            _default_on_complete(message, **kwargs)
282598
def save(self, basepath):
        """"""
        out.info(u"Get image URL %s" % self.url, level=1)
        self.connect()
        filename = "%s%s" % (self.filename, self.ext)
        comicDir = os.path.join(basepath, self.dirname)
        if not os.path.isdir(comicDir):
            os.makedirs(comicDir)
        fn = os.path.join(comicDir, filename)
        # compare with >= since content length could be the compressed size
        if os.path.isfile(fn) and os.path.getsize(fn) >= self.contentLength:
            out.info(u'Skipping existing file "%s".' % fn)
            return fn, False
        content = self.urlobj.content
        if not content:
            out.warn(u"Empty content from %s, try again..." % self.url)
            self.connect()
            content = self.urlobj.content
        out.debug(u'Writing comic to file %s...' % fn)
        writeFile(fn, content)
        if self.text:
            fntext = os.path.join(comicDir, "%s.txt" % self.filename)
            out.debug(u'Writing comic text to file %s...' % fntext)
            writeFile(fntext, self.text, encoding='utf-8')
        getHandler().comicDownloaded(self, fn, text=self.text)
        return fn, True
101028
private void setHeadersComplete() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "completed headers have been received stream " + myID);
        }
        headersCompleted = true;
        muxLink.setContinuationExpected(false);
    }
493674
def set_flag(self, info, code=None):
        """"""
        self.flag = True
        self.flag_info += info
        if code is not None:
            self.flag_code = code
81156
def end(self):
        """"""
        for comic in self.data:
            with codecs.open(self.jsonFn(comic), 'w', self.encoding) as f:
                json.dump(self.data[comic], f, indent=2, separators=(',', ': '), sort_keys=True)
1051876
def tab_complete(self):
        
        opts = self._complete_options()
        if len(opts) == 1:
            self.set_current_text(opts[0] + os.sep)
            self.hide_completer()
500877
def download_manga(illust, pattern, &block)
      action = DownloadActionRegistry.new(&block)
      illust.original_image_urls.each_with_index do |url, n|
        begin
          action.before_each.call(url, n) if action.before_each
          filename = filename_from_pattern(pattern, illust, url)
          FileUtils.mkdir_p(File.dirname(filename))
          @agent.download(url, filename, [], illust.original_image_referer)
          action.after_each.call(url, n) if action.after_each
        rescue
          action.on_error ? action.on_error.call($!) : raise
        end
      end
    end
90712
def reset_all(self):
        """"""

        self._LOG.debug("Marking all CMs as Good.")

        for key in self.list:
            self.mark_good(key)
265268
def getScrapers(comics, basepath=None, adult=True, multiple_allowed=False, listing=False):
    """"""
    if '@' in comics:
        # only scrapers whose directory already exists
        if len(comics) > 1:
            out.warn(u"using '@' as comic name ignores all other specified comics.")
        for scraperclass in scraper.get_scraperclasses():
            dirname = getDirname(scraperclass.getName())
            if os.path.isdir(os.path.join(basepath, dirname)):
                if shouldRunScraper(scraperclass, adult, listing):
                    yield scraperclass()
    elif '@@' in comics:
        # all scrapers
        for scraperclass in scraper.get_scraperclasses():
            if shouldRunScraper(scraperclass, adult, listing):
                yield scraperclass()
    else:
        # get only selected comic scrapers
        # store them in a set to eliminate duplicates
        scrapers = set()
        for comic in comics:
            # Helpful when using shell completion to pick comics to get
            comic = comic.rstrip(os.path.sep)
            if basepath and comic.startswith(basepath):
                # make the following command work:
                # find Comics -type d | xargs -n1 -P10 dosage -b Comics
                comic = comic[len(basepath):].lstrip(os.sep)
            if ':' in comic:
                name, index = comic.split(':', 1)
                indexes = index.split(',')
            else:
                name = comic
                indexes = None
            scraperclasses = scraper.find_scraperclasses(name, multiple_allowed=multiple_allowed)
            for scraperclass in scraperclasses:
                if shouldRunScraper(scraperclass, adult, listing):
                    scraperobj = scraperclass(indexes=indexes)
                    if scraperobj not in scrapers:
                        scrapers.add(scraperobj)
                        yield scraperobj
42436
public void configureForRobustness()
    {
        doValidateAttributes(true);
        doValidateStructure(true);
        doValidateNames(true);

        /* This the actual "meat": we do want to not only check if the
         * content is ok, but also "fix" it if not, and if there's a way
         * to fix it:
         */
        doValidateContent(true);
        doFixContent(true);
    }
1305046
def make_complete(self):
        
        # reset the site indices from 0 to N-1 and set self.complete to self
        self.array['sids'] = numpy.arange(len(self), dtype=numpy.uint32)
        self.complete = self
322719
def has_gocomics_comic(name):
    """"""
    cname = "Gocomics/%s" % name
    for scraperclass in get_scraperclasses():
        lname = scraperclass.getName().lower()
        if lname == cname.lower():
            return True
    return False