use nopublish option in all cases

This commit is contained in:
Michael Murtaugh 2020-06-01 07:05:27 +02:00
parent c8f4d90d87
commit a2616972f1

View File

@ -165,23 +165,23 @@ def main (args):
except OSError: except OSError:
pass pass
text = getjson(info['localapiurl']+'getText?'+urlencode(data))
##########################################
## ENFORCE __NOPUBLISH__ MAGIC WORD
##########################################
if args.nopublish and args.nopublish in text:
# NEED TO PURGE ANY EXISTING DOCS
print ("NOPUBLISH", file=sys.stderr)
try_deleting((p+raw_ext,p+".raw.html",p+".diff.html",p+".meta.json"))
continue
if args.all or args.text: if args.all or args.text:
text = getjson(info['localapiurl']+'getText?'+urlencode(data))
ver = {"type": "text"} ver = {"type": "text"}
versions.append(ver) versions.append(ver)
ver["code"] = text["_code"] ver["code"] = text["_code"]
if text["_code"] == 200: if text["_code"] == 200:
text = text['data']['text'] text = text['data']['text']
##########################################
## ENFORCE __NOPUBLISH__ MAGIC WORD
##########################################
if args.nopublish and args.nopublish in text:
# NEED TO PURGE ANY EXISTING DOCS
print ("NOPUBLISH", file=sys.stderr)
try_deleting((p+raw_ext,p+".raw.html",p+".diff.html",p+".meta.json"))
continue
ver["path"] = p+raw_ext ver["path"] = p+raw_ext
ver["url"] = quote(ver["path"]) ver["url"] = quote(ver["path"])
with open(ver["path"], "w") as f: with open(ver["path"], "w") as f: