Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ContentType of Pocket item accessible #36

Open
Superelmanu opened this issue Aug 11, 2021 · 9 comments
Open

Make ContentType of Pocket item accessible #36

Superelmanu opened this issue Aug 11, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@Superelmanu
Copy link

Could we have an option to import all the articles in MD format when retrieving it from Pocket?

@nybbles
Copy link
Owner

nybbles commented Aug 12, 2021

Do you mean to automatically create a corresponding note for each Pocket item?

@Superelmanu
Copy link
Author

Sorry for the very bad description.
The idea is to be able to important more then just the title and the summary of the article.
Having the option to import in a MD format the All article into Obsidian it's basically what I'm asking.

@nybbles
Copy link
Owner

nybbles commented Aug 12, 2021

Oh I see what you're saying - you want all fields in the article to be available?

The code right now actually does retrieve and store all fields that are exposed by Pocket's API, but only title, URL and excerpt are exposed to the user.

What specific fields are you interested in having access to? I'd need to consider each one, and see how it should be exposed.

@nybbles
Copy link
Owner

nybbles commented Aug 12, 2021

Regarding having all of the metadata in a Markdown file - that's certainly possible - when you create a note for a Pocket item, you can specify a template that's used to create that note.

That template can contain placeholders for title, URL and excerpt (as described in the README). I can add other fields, but would appreciate a specific list.

@Superelmanu
Copy link
Author

Here are a couple of high-level things useful to retrieve.
Highlight
Tag
ContentType :

  • is_article - 0 or 1 - 1 if the item is an article
  • has_image - 0, 1, or 2 - 1 if the item has images in it - 2 if the item is an image
  • has_video - 0, 1, or 2 - 1 if the item has videos in it - 2 if the item is a video

For the ContentType selecting the type to be created as note as an option can be very helpful. Example create notes for all is_article

DetailType :

  • simple = return basic information about each item, including title, url, status, and more
  • complete = return all data about each item, including tags, images, authors, videos, and more

If I understand correctly, you can retrieve form pocket a full article in an MD format, choosing the complete type. Having the option to chose between simple and complete in the plugin can be possible?

Getting all the articles in a markdown form in Obsidian for research, it's very useful.

@nybbles
Copy link
Owner

nybbles commented Aug 28, 2021

Full article text

This is not actually available in the Pocket retrieve API - it is available as part of a private access API (see https://getpocket.com/developer/docs/v3/article-view), and so it's out of scope for this plugin at the moment. Perhaps once this plugin gets further along, this decision could be revisited and I can talk to Pocket to see if I can get access for this plugin.

Tags

This was just added in #43, although I have to also finish #47 so its usable from the Pocket item note template.

Highlights

This is covered in #34. TBH, due to the complexity it seems to involve (in how to display highlights in Obsidian), I would rather get other pieces of functionality done first.

ContentType

Could you describe how you would use is_article, has_image and has_video, outside of bulk note create (which does not exist yet and I'm not sure if it makes sense to implement it)? Perhaps it would be useful for filtering Pocket items (i.e. when/if search/filter is implemented)?

@nybbles
Copy link
Owner

nybbles commented Aug 28, 2021

I'm going to focus this issue on ContentType, as I am trying to avoid having catch-all issues.

@nybbles nybbles changed the title Inporting the all article Make ContentType of Pocket item accessible Aug 28, 2021
@nybbles nybbles added enhancement New feature or request question Further information is requested labels Aug 28, 2021
@nybbles nybbles removed the question Further information is requested label Nov 3, 2021
@bpriyum
Copy link

bpriyum commented Dec 3, 2021

Hi,

First of all thanks a bunch for making this plugin.

I was wondering if , in addition to the website url , the getpocket url can also be imported. Pocket gives every saved article a unique url like https://getpocket.com/read/xxxxxxxxxx .

Having this url would take the user straight to the article view in pocket.

Thanks again

Cheers

@nestor50
Copy link

Hello @nybbles I guess you're still looking for somebody to maintain the plugin and unfortunately I'm not a coder but I was wondering if the problem of getting the whole contents of a pocket item could be "work-arounded" by embedding, in the note created from an item, a script that:

  • get the url of the item (better the unique pocket url as it is in a readability format) which can be found in the yaml frontmatter
  • getting the contents of the page (the full text)
  • copying to the clipboard and pasting in the note

Here's an Obsidian Plugin that allows to run shell commands from within a note with the ability of running commands based on certain events
What do you all think, guys?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants