使用导入全文和标注到 obsidian 时间格式异常

This issue has been tracked since 2022-11-17.

具体表现为,昨天创建的标注,导出的文件时间是今天,而 date 属性是昨天,而且文件上的时间各式也错乱了,月和日是反的
image
image

lyserenity wrote this answer on 2022-11-17

我需要你提供一下模版:包括以下两个部分(可以的话,搭配一下截图),感谢

image

isFire wrote this answer on 2022-11-17

我需要你提供一下模版:包括以下两个部分(可以的话,搭配一下截图),感谢

image

稍等

isFire wrote this answer on 2022-11-17

稍后读模板

title: "{{title}}"
alias: 
<% if ( unread.note && unread.title != unread.note ) { %>  - "{{note}}"
<% } %>  - "{{title}}"
created-date: {{create|yyyy-mm-dd HH:mm:ss}}
type: Simpread
<% if (unread.img) { %>banner: "<%- unread.img %> "
banner_icon: 🔖
<% } -%>
tag: {{ |tag| | }}
idx: {{idx}}
---

# {{title}}
<%
let ifURI = "http://localhost:7026/unread/"+unread.idx
%>
> [!example]- [🧷内部链接](<<%= ifURI %>>) [🌐外部链接](<{{ext_uri}}>)    
> URI:: [🧷](<<%= ifURI %>>) [🌐](<{{ext_uri}}>) 
> intURI:: [🧷内部链接](<{{int_uri}}>)

%%
> [!example]+ **Comments**  
> ```dataview
> TABLE 
>     WITHOUT ID
>     link(Source, dateformat(date(Source), "yyyy-MM-dd")) as Date___, 
>     regexreplace(rows.Comments,"^@@\[\[.+?\]\]\s","") as "Comments"
> FROM "journals"
> WHERE  contains(cmnt, this.file.name)
> FLATTEN cmnt as Comments
> WHERE contains(Comments, this.file.name)
> GROUP BY file.link as Source
> SORT rows.file.day desc
> ```
>  **Description**:: {{desc}}
%%

> [!md] Metadata  
> **标题**:: [{{title}}]({{url}})  
> **日期**:: [[{{create|yyyy-mm-dd}}]]  
<% if ( unread.annotations && unread.annotations.length > 0 ) { %>
## Annotations

{{annotations}}
<% } -%>
<% if ( unread.tags && unread.tags.includes('Highlights') ) { %>
![[<%% tp.file.title %>_mentions#Highlight Mentions]]
<% } -%>
<% if ( unread.refs ) { %>
## Reference   
{{-|refs}}  
<% } %>
isFire wrote this answer on 2022-11-17

标注模板

<%
let colors = [ '#B4D9FB', '#ffeb3b', '#a2e9f2', '#a1e0ff', '#a8ea68', '#ffb7da' ],
    color  = colors[ annote.color ];
let chls = [ 'srhl1', 'srhl2', 'srhl3', 'srhl4', 'srhl5', 'srhl6' ],
    chl  = chls[ annote.color ];
let iframeURI = "http://localhost:7026/unread/"+unread.idx+"#id="+annote.id
if (unread.note && unread.title != unread.note) {
var filetitle = unread.note;
}
else {
var filetitle = unread.title;
}
let wikilinks = "[[SR" + unread.idx + "@" + filetitle + "|📄]]";
-%>
<% if (annote.note.startsWith("######")) { %>
<% 
let note = annote.note.slice(7);
-%>
###### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else if (annote.note.startsWith("######")) { %>
<% 
let note = annote.note.slice(6);
-%>
###### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else if (annote.note.startsWith("####")) { %>
<% 
let note = annote.note.slice(5);
-%>
#### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else if (annote.note.startsWith("###")) { %>
<% 
let note = annote.note.slice(4);
-%>
### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else { %>
> [!<%= chl %>] <%- wikilinks %> <mark style="background-color: <%= color %>">Highlights</mark> [🧷](<<%= iframeURI %>>) [🌐](<{{an_ext_uri}}>) {{#|an_tag| }}  
{{{html_format|>|{{an_html}}}}}
<% if (annote.refs) { -%>
{{> - 🔗|an_refs}}
<% } -%>
<% if (annote.note) { -%>
<% if (annote.note.startsWith("todo:") == false && annote.note.startsWith("done:") == false) { -%>
>  
> - 📝{{an_note}}
> ^sran-{{an_id}}
<% } else { -%>
<% 
let note = annote.note.slice(6);
if (annote.note.startsWith("todo:")) {
  var taskStatus = " "; }
  else {
  var taskStatus = "x";
}
-%>
> ^sran-{{an_id}}

- [<%= taskStatus %>] <%- note %> #web ^srtask-{{an_id}}
<% } -%>
<% } else { -%>
> ^sran-{{an_id}}
<% } -%>
<% } -%>
isFire wrote this answer on 2022-11-17

截图
image

lyserenity wrote this answer on 2022-11-17

「出错」的是这个文件名?然后第一个截图里框起来的部分是对的?

上面这个图是这模版的哪部分?是这个吗?
image

isFire wrote this answer on 2022-11-18

「出错」的是这个文件名?然后第一个截图里框起来的部分是对的?

上面这个图是这模版的哪部分?是这个吗?
image

是的

lyserenity wrote this answer on 2022-11-18

我是 logseq 的用户,等我去找个 ob 大佬来帮你.....

isFire wrote this answer on 2022-11-18

我是 logseq 的用户,等我去找个 ob 大佬来帮你.....

🙃感谢大佬

More Details About Repo
Owner Name Kenshin
Repo Name simpread
Full Name Kenshin/simpread
Language JavaScript
Created Date 2016-12-19
Updated Date 2022-12-08
Star Count 6548
Watcher Count 91
Fork Count 481
Issue Count 1480

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date