mirror of
https://github.com/wassname/template.git
synced 2026-10-01 12:43:05 +08:00
Updating
This commit is contained in:
commit
e4bb6c0ba6
3 files changed
+19
-19
No files matched your search
@@ -2,13 +2,9 @@
|
||||
|
||||
export default function(data) {
|
||||
|
||||
if (data.published == undefined) {
|
||||
//console.warn("Can't generate XML for post ", data.title, "with data", data);
|
||||
//return "";
|
||||
data.published = new Date("invalid");
|
||||
}
|
||||
|
||||
var date = data.published;
|
||||
var date = data.publishedDate;
|
||||
|
||||
var batch_timestamp = Math.floor(Date.now() / 1000);
|
||||
var batch_id = data.authors.length ? data.authors[0].lastName.toLowerCase().slice(0,20) : "Anonymous";
|
||||
batch_id += "_" + date.getFullYear();
|
||||
@@ -28,10 +24,10 @@ export default function(data) {
|
||||
{doi_batch_id: batch_id},
|
||||
{timestamp: batch_timestamp},
|
||||
{depositor: [
|
||||
{depositor_name: data.journal.depositorName},
|
||||
{email_address: data.journal.email},
|
||||
{depositor_name: data.journal.publisherName},
|
||||
{email_address: data.journal.publisherEmail},
|
||||
]},
|
||||
{registrant: "Distill"},
|
||||
{registrant: data.journal.publisherName},
|
||||
]},
|
||||
|
||||
{body: [
|
||||
|
||||
Vendored
+13
-9
@@ -282,6 +282,8 @@ function Type$2(tag, options) {
|
||||
|
||||
var type = Type$2;
|
||||
|
||||
/*eslint-disable max-len*/
|
||||
|
||||
var common$4 = common$1;
|
||||
var YAMLException$3 = exception;
|
||||
var Type$1 = type;
|
||||
@@ -893,6 +895,8 @@ function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
/*eslint-disable no-bitwise*/
|
||||
|
||||
var NodeBuffer;
|
||||
|
||||
try {
|
||||
@@ -1350,6 +1354,8 @@ var default_full = Schema$6.DEFAULT = new Schema$6({
|
||||
]
|
||||
});
|
||||
|
||||
/*eslint-disable max-len,no-use-before-define*/
|
||||
|
||||
var common = common$1;
|
||||
var YAMLException$1 = exception;
|
||||
var Mark = mark;
|
||||
@@ -2941,6 +2947,8 @@ var loader$1 = {
|
||||
safeLoad: safeLoad_1
|
||||
};
|
||||
|
||||
/*eslint-disable no-use-before-define*/
|
||||
|
||||
var common$7 = common$1;
|
||||
var YAMLException$5 = exception;
|
||||
var DEFAULT_FULL_SCHEMA$2 = default_full;
|
||||
@@ -8298,13 +8306,9 @@ var hoverBox = function(dom) {
|
||||
|
||||
var generateCrossref = function(data) {
|
||||
|
||||
if (data.published == undefined) {
|
||||
//console.warn("Can't generate XML for post ", data.title, "with data", data);
|
||||
//return "";
|
||||
data.published = new Date("invalid");
|
||||
}
|
||||
|
||||
var date = data.published;
|
||||
var date = data.publishedDate;
|
||||
|
||||
var batch_timestamp = Math.floor(Date.now() / 1000);
|
||||
var batch_id = data.authors.length ? data.authors[0].lastName.toLowerCase().slice(0,20) : "Anonymous";
|
||||
batch_id += "_" + date.getFullYear();
|
||||
@@ -8324,9 +8328,9 @@ var generateCrossref = function(data) {
|
||||
{doi_batch_id: batch_id},
|
||||
{timestamp: batch_timestamp},
|
||||
{depositor: [
|
||||
{depositor_name: data.journal.depositorName},
|
||||
{email_address: data.journal.email} ]},
|
||||
{registrant: "Distill"} ]},
|
||||
{depositor_name: data.journal.publisherName},
|
||||
{email_address: data.journal.publisherEmail} ]},
|
||||
{registrant: data.journal.publisherName} ]},
|
||||
|
||||
{body: [
|
||||
{journal: [
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":null,"sources":["../components/html.js","../components/styles.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/index.js","../components/front-matter.js","../node_modules/bibtex-parse-js/bibtexParse.js","../components/bibliography.js","../node_modules/d3-time/src/interval.js","../node_modules/d3-time/src/millisecond.js","../node_modules/d3-time/src/duration.js","../node_modules/d3-time/src/second.js","../node_modules/d3-time/src/minute.js","../node_modules/d3-time/src/hour.js","../node_modules/d3-time/src/day.js","../node_modules/d3-time/src/week.js","../node_modules/d3-time/src/month.js","../node_modules/d3-time/src/year.js","../node_modules/d3-time/src/utcMinute.js","../node_modules/d3-time/src/utcHour.js","../node_modules/d3-time/src/utcDay.js","../node_modules/d3-time/src/utcWeek.js","../node_modules/d3-time/src/utcMonth.js","../node_modules/d3-time/src/utcYear.js","../node_modules/d3-time-format/src/locale.js","../node_modules/d3-time-format/src/defaultLocale.js","../node_modules/d3-time-format/src/isoFormat.js","../node_modules/d3-time-format/src/isoParse.js","../components/expand-data.js","../components/meta.js","../components/header.js","../node_modules/mustache/mustache.js","../components/byline.js","../components/appendix.js","../components/footer.js","../components/citation.js","../components/footnote.js","../node_modules/marked/lib/marked.js","../components/markdown.js","../node_modules/prismjs/prism.js","../components/code.js","../components/hover-box-include.js","../components/generate-crossref.js","../index.js"],"sourcesContent":["export default function(dom) {\n if (!dom.querySelector(\"html\").getAttribute(\"lang\")) {\n dom.querySelector(\"html\").setAttribute(\"lang\", \"en\")\n }\n\n let head = dom.querySelector(\"head\");\n\n if (!dom.querySelector(\"meta[charset]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"charset\", \"utf-8\");\n head.appendChild(meta);\n }\n if (!dom.querySelector(\"meta[name=viewport]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1\");\n head.appendChild(meta);\n }\n}\n","import base from './styles-base.css';\nimport layout from './styles-layout.css';\nimport article from './styles-article.css';\nimport code from './styles-code.css';\n\nexport default function(dom) {\n let s = dom.createElement(\"style\");\n s.textContent = base + layout + article + code;\n dom.querySelector(\"head\").appendChild(s);\n}\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (NumbeLine truncated
|
||||
{"version":3,"file":null,"sources":["../components/html.js","../components/styles.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/index.js","../components/front-matter.js","../node_modules/bibtex-parse-js/bibtexParse.js","../components/bibliography.js","../node_modules/d3-time/src/interval.js","../node_modules/d3-time/src/millisecond.js","../node_modules/d3-time/src/duration.js","../node_modules/d3-time/src/second.js","../node_modules/d3-time/src/minute.js","../node_modules/d3-time/src/hour.js","../node_modules/d3-time/src/day.js","../node_modules/d3-time/src/week.js","../node_modules/d3-time/src/month.js","../node_modules/d3-time/src/year.js","../node_modules/d3-time/src/utcMinute.js","../node_modules/d3-time/src/utcHour.js","../node_modules/d3-time/src/utcDay.js","../node_modules/d3-time/src/utcWeek.js","../node_modules/d3-time/src/utcMonth.js","../node_modules/d3-time/src/utcYear.js","../node_modules/d3-time-format/src/locale.js","../node_modules/d3-time-format/src/defaultLocale.js","../node_modules/d3-time-format/src/isoFormat.js","../node_modules/d3-time-format/src/isoParse.js","../components/expand-data.js","../components/meta.js","../components/header.js","../node_modules/mustache/mustache.js","../components/byline.js","../components/appendix.js","../components/footer.js","../components/citation.js","../components/footnote.js","../node_modules/marked/lib/marked.js","../components/markdown.js","../node_modules/prismjs/prism.js","../components/code.js","../components/hover-box-include.js","../components/generate-crossref.js","../index.js"],"sourcesContent":["export default function(dom) {\n if (!dom.querySelector(\"html\").getAttribute(\"lang\")) {\n dom.querySelector(\"html\").setAttribute(\"lang\", \"en\")\n }\n\n let head = dom.querySelector(\"head\");\n\n if (!dom.querySelector(\"meta[charset]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"charset\", \"utf-8\");\n head.appendChild(meta);\n }\n if (!dom.querySelector(\"meta[name=viewport]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1\");\n head.appendChild(meta);\n }\n}\n","import base from './styles-base.css';\nimport layout from './styles-layout.css';\nimport article from './styles-article.css';\nimport code from './styles-code.css';\n\nexport default function(dom) {\n let s = dom.createElement(\"style\");\n s.textContent = base + layout + article + code;\n dom.querySelector(\"head\").appendChild(s);\n}\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (NumbeLine truncated
|
||||
Reference in new issue
Block a user