nybbles / obsidian-pocket

Pocket integration for Obsidian
MIT License
231 stars 21 forks source link

Add {{date}} and/or {{time}} support in Pocket item note template #67

Open rcrcr-omni opened 2 years ago

rcrcr-omni commented 2 years ago

When using {{date}} in the Pocket note template, it doesn't behave in the same way an Obsidian template does. It just prints {{date}}.

I'd like to be able to auto-populate the date I'm retrieving the article (i.e. today).

nybbles commented 2 years ago

Yes, this Pocket plugin doesn't work the same way as the Template core plugin. Neither {{date}} nor {{time}} are listed in the docs.

What would {{date}} mean in this context? Two possible interpretations in this context of this plugin are:

  1. The date that the Pocket item note was created.
  2. The date that the Pocket item was saved to Pocket.
rcrcr-omni commented 2 years ago

There might be a third useful one: the date the article was written. But I don't think Pocket captures that. I certainly can't see it in the API docs.

Then again I can't see the date that the Pocket item was saved to Pocket either but it's definitely there because it shows up on Zapier.

nybbles commented 2 years ago

yea the date the article was written isn't in Pocket. The date that the Pocket item was saved to Pocket is indeed being saved - you can view that by using Developer tools within Obsidian and looking at the IndexedDB table that the Pocket plugin saves to.

On Thu, Jan 6, 2022 at 2:49 PM rcrcr-omni @.***> wrote:

There might be a third useful one: the date the article was written. But I don't think Pocket captures that. I certainly can't see it in the API docs.

Then again I can't see the date that the Pocket item was saved to Pocket either but it's definitely there because it shows up on Zapier.

— Reply to this email directly, view it on GitHub https://github.com/nybbles/obsidian-pocket/issues/67#issuecomment-1006992147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG36KLOQESJRNHZHWVI5LUUYMAJANCNFSM5LMYE5PQ . You are receiving this because you commented.Message ID: @.***>

-- Nimalan Mahendran

masonfocus commented 2 years ago

Would love to see the date feature improved. The date the article pocketed or archived or edited can be used to filter articles to analyse the articles read last week or between March and July.

As the date the item saved to pocket is saved in the table it seems like these values are retrieved:

image

but adding

Dates Added: {{time_added}}
Last Edited: {{time_updated}}

to the YAML template won't work as they are not defined.

Is there a current workaround or we have to wait for the update?

As a matter of fact, I would like use nearly all the other attributes retrieved from pocket, for example word cont and time_favorited time_read time_to_read

all good dimension for future analysis.

Is that possible?

ygol commented 1 year ago

I use <% tp.date.now("YYYY-MM-DD dddd") %> in the template

baseliners commented 1 year ago

Would love to see the date feature improved. The date the article pocketed or archived or edited can be used to filter articles to analyse the articles read last week or between March and July.

+1, this would be great to see!