{"id":16292940,"url":"https://github.com/ainoya/pocketmd","last_synced_at":"2025-06-13T08:07:13.754Z","repository":{"id":244350303,"uuid":"814004479","full_name":"ainoya/PocketMD","owner":"ainoya","description":"A script collection for fetching, summarizing, and saving Pocket articles in markdown format locally. Ideal for use with Obsidian.","archived":false,"fork":false,"pushed_at":"2025-05-31T19:57:57.000Z","size":87,"stargazers_count":5,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T20:53:58.434Z","etag":null,"topics":["obsidian","pocket-api","vertex-ai"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ainoya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-12T06:51:10.000Z","updated_at":"2025-05-01T03:03:01.000Z","dependencies_parsed_at":"2024-08-27T00:29:13.215Z","dependency_job_id":null,"html_url":"https://github.com/ainoya/PocketMD","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":0.07692307692307687,"last_synced_commit":"bd46bf40d83c77bba24f5c46aa64d97e07057f82"},"previous_names":["ainoya/pocketmd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ainoya/PocketMD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainoya%2FPocketMD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainoya%2FPocketMD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainoya%2FPocketMD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainoya%2FPocketMD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ainoya","download_url":"https://codeload.github.com/ainoya/PocketMD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainoya%2FPocketMD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259606977,"owners_count":22883559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["obsidian","pocket-api","vertex-ai"],"created_at":"2024-10-10T20:09:26.555Z","updated_at":"2025-06-13T08:07:13.737Z","avatar_url":"https://github.com/ainoya.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pocket Article Fetcher\n\n## Overview\n\n- This is a collection of scripts designed to retrieve articles saved in [Pocket](https://getpocket.com/) and save them locally in markdown format.\n- It stores information in a local SQLite database and includes features to fetch additional information not available from Pocket API.\n\n## Features\n\n- Retrieve articles from Pocket and save them in SQLite.\n- Extract URLs from SQLite and use the [Distiller API](https://github.com/ainoya/cloudflare-dom-distiller) to fetch the full text of the articles and save it.\n- Generate summaries of articles using Google Vertex AI based on the information stored in SQLite.\n- Convert the information stored in SQLite to markdown format and save it locally, intended for use with Obsidian or similar applications.\n\n## Required Environment Variables\n\nYou will need authentication credentials to connect to Pocket, an API key for the [Distiller API](https://github.com/ainoya/cloudflare-dom-distiller), and GCP credentials to connect to Vertex AI.\n\nRefer to the `.env.example` file for details.\n\n## Setup\n\n```bash\nnpm install\n# Initialize the database\nnpm run db:migrate\n```\n\n## Usage\n\nFetch articles from Pocket:\n\n```bash\nnpm run fetch\n```\n\nRetrieve the full text of articles:\n\n```bash\nnpm run distill\n```\n\nGenerate summaries of articles:\n\n```bash\nnpm run summary\n```\n\nExecute all steps:\n\n```bash\nnpm run fetch-write\n```\n\n## Custom Instructions\n\nWhen generating summaries, you can provide additional instructions to the AI by setting the `CUSTOM_INSTRUCTION` variable.\n\n```bash\nexport CUSTOM_INSTRUCTIONS=\"Find up to three important keywords and add them separately at the end of the results, enclosing each keyword in double square brackets `[[ ]]`. Keyword output example: [[keyword1]] [[keyword2]] [[keyword3]]\"\n\nnpm run summary\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainoya%2Fpocketmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fainoya%2Fpocketmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainoya%2Fpocketmd/lists"}