{"id":21374870,"url":"https://github.com/banool/pants","last_synced_at":"2025-03-16T09:21:02.158Z","repository":{"id":90881389,"uuid":"210176696","full_name":"banool/pants","owner":"banool","description":"Save anything to Pocket 👖👖👖👖👖👖","archived":false,"fork":false,"pushed_at":"2022-03-17T06:12:23.000Z","size":3075,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T23:43:25.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","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/banool.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":"2019-09-22T16:13:55.000Z","updated_at":"2022-03-16T21:24:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f6ebb0f-eef8-4594-b37c-4787bf894acc","html_url":"https://github.com/banool/pants","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fpants","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fpants/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fpants/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fpants/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/banool","download_url":"https://codeload.github.com/banool/pants/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243848100,"owners_count":20357490,"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":[],"created_at":"2024-11-22T08:45:56.604Z","updated_at":"2025-03-16T09:21:02.120Z","avatar_url":"https://github.com/banool.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pants\n\nA simple webapp written with [Rocket](https://rocket.rs) for saving anything to Pocket. It's a lil Pocket Rocket hehehehehehehehh 🚀🚀🚀.\n\n## Setup\n### Get Pocket access token\nFirst, make an app here: https://getpocket.com/developer/apps/new. It should give you a consumer key once you do this.\n\nNow, to get a code for your Pocket user specifically, do this. Pretend our consumer key is `87796-6bf78d700933260a0f9b1b97`.\n```\ncurl -d \"consumer_key=87796-6bf78d700933260a0f9b1b97\u0026redirect_uri=https://google.com\" -X POST https://getpocket.com/v3/oauth/request\n```\nYou should see a response like this:\n```\ncode=07f3123f-0a12-d2f6-07e8-abcdef\n```\nNow you can authorize your app for your Pocket by visting this link:\n```\nhttps://getpocket.com/auth/authorize?request_token=07f3123f-0a12-d2f6-07e8-abcdef\u0026redirect_uri=https://www.google.com\n```\nNow finally get the authorization token:\n```\ncurl https://getpocket.com/v3/oauth/authorize -X POST -H \"Content-Type: application/json\" -H \"X-Accept: application/json\" -d \"{\\\"consumer_key\\\":\\\"87796-6b548d766433260a0f9b1b97\\\",\\\"code\\\":\\\"07f3123f-0a12-d2f6-07e8-abcdef\\\"}\"\n```\nThe response should look like this:\n```\n{\"access_token\":\"d44c7cc9-2434-de18-332c-923ad5\",\"username\":\"danielporteous1@gmail.com\"}\n```\nThis is the token you need to set for the `PANTS_ACCESS_TOKEN` env var below\n\n## Running locally\nThis assumes you have server-setup checked out above this directory.\n```\n./run.sh\n```\n\n## Running with docker\nBuild:\n```\ndocker build . -t pants\n```\nRun:\n```\ndocker run -e PANTS_PAGES_ROOT=\"/pages\" -e PANTS_SITE=\"0.0.0.0\" -e PANTS_CONSUMER_KEY=\"87796-6bf78d700933260a0f9b1b97\" -e PANTS_ACCESS_TOKEN=\"d48c7af9-2450-de18-3e9c-9065f5\" -e PANTS_ROCKET_SECRET_KEY=\"Ebbudtp1ttI8NMwDc54kQB1tStVV7KVp7L9Q1UTZ8/U=\" -e PANTS_STATIC_ROOT=\"/var/static\" --publish 8000:8000 -v /tmp/pantspages:/pages -it pants\n```\n\n## To publish\n```\n# Change the version in Cargo.toml\ncargo publish\n```\n\n## The problem\nI find myself liking Pocket more and more, and I want to start using it to keep track of everything I want to read and have read. Unfortunately, not everything I want to read really fits Pocket's reading model, even if the tracking model is great. It doesn't really make sense to save The Hobbit to Pocket for example since there is no dedicated webpage containing that content.\n\n## The solution\nYou can see in [the docs](https://getpocket.com/developer/docs/v3/add) for Pocket's add API that a URL is required, so we need to make one.\n\nLet's say I want to read Big Boi's Bakery, by Big Boi, I can go to Pants and enter the title (and optionally some tags) and then Pants will go and make a webpage under `/pages`, in this case `/pages/bigboisbakery`, and then add it to Pocket.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanool%2Fpants","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbanool%2Fpants","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanool%2Fpants/lists"}