{"_id":"@dataresearchcenter/ftm-assets","_rev":"2-956e4372f5999320fd23863d73cb1225","name":"@dataresearchcenter/ftm-assets","dist-tags":{"rc1":"0.0.3-rc1","latest":"0.0.3"},"versions":{"0.0.3-rc1":{"name":"@dataresearchcenter/ftm-assets","version":"0.0.3-rc1","author":{"name":"Simon Wörpel","email":"simon.woerpel@pm.me"},"license":"AGPLv3+","_id":"@dataresearchcenter/ftm-assets@0.0.3-rc1","maintainers":[{"name":"simonwoerpel","email":"simon@investigativedata.org"}],"homepage":"https://github.com/dataresearchcenter/ftm-assets#readme","bugs":{"url":"https://github.com/dataresearchcenter/ftm-assets/issues"},"dist":{"shasum":"d607f15647947174e90d8c68a4c6ed61ae6ca598","tarball":"https://registry.npmjs.org/@dataresearchcenter/ftm-assets/-/ftm-assets-0.0.3-rc1.tgz","fileCount":11,"integrity":"sha512-5f7chQAN5he3++RERX0vbVQIWKv32n/YFhC1ZucyB6Qizs0y0ZHM4YOZVtauF8ySiPVHJrWxSt8+QLdG7cviHw==","signatures":[{"sig":"MEQCICW5GsbQxZ/iq7KMJpPCM+ACSRqf3K8GapyvCULoH7UVAiAkoY7X0oH2jMTPdMFn7HS8gNSxmjhwhZXSh5exZYsZ1Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81380},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"223ad4c8a0fdff5186b4781f3ff70756f03b7d3b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"rm -rf dist ; tsc"},"_npmUser":{"name":"simonwoerpel","email":"simon@investigativedata.org"},"repository":{"url":"git+https://github.com/dataresearchcenter/ftm-assets.git","type":"git"},"_npmVersion":"11.3.0","description":"javascript fetching logic for ftm-assets","directories":{"test":"tests"},"_nodeVersion":"22.9.0","dependencies":{"@investigativedata/ftmq":"^0.8.3"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.5.3","babel-core":"^6.26.3","typescript":"^5.8.3","@types/node":"^22.15.17","@types/react":"^19.1.3","babel-runtime":"^6.26.0","@trivago/prettier-plugin-sort-imports":"^5.2.2"},"peerDependencies":{"react":">16"},"_npmOperationalInternal":{"tmp":"tmp/ftm-assets_0.0.3-rc1_1747055387451_0.08100621118144624","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@dataresearchcenter/ftm-assets","version":"0.0.3","description":"javascript fetching logic for ftm-assets","type":"module","main":"dist/index.js","types":"dist/index.d.ts","directories":{"test":"tests"},"scripts":{"build":"rm -rf dist ; tsc","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/dataresearchcenter/ftm-assets.git"},"author":{"name":"Simon Wörpel","email":"simon.woerpel@pm.me"},"license":"AGPLv3+","bugs":{"url":"https://github.com/dataresearchcenter/ftm-assets/issues"},"homepage":"https://github.com/dataresearchcenter/ftm-assets#readme","peerDependencies":{"react":">16"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^5.2.2","@types/node":"^22.15.17","@types/react":"^19.1.3","babel-core":"^6.26.3","babel-runtime":"^6.26.0","prettier":"^3.5.3","typescript":"^5.8.3"},"dependencies":{"@investigativedata/ftmq":"^0.8.3"},"_id":"@dataresearchcenter/ftm-assets@0.0.3","gitHead":"6eeb1a5c379b37fd644f52ffd2aa957b1b0d159c","_nodeVersion":"22.9.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-c3FjRn5+Tg0zLGFwZsnL6pFKGXFPnGl5v/zLcHOOMkA1sjqWD7wp4oari+FOu/jw4cWC2W4gXaEu2ucSYUxocg==","shasum":"a464d7a2d0d1ef12af2df53acf1bee77f7d8e13c","tarball":"https://registry.npmjs.org/@dataresearchcenter/ftm-assets/-/ftm-assets-0.0.3.tgz","fileCount":11,"unpackedSize":82101,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHx8kYaUCHDWwUtsUaUY2R5S5FkGJu5Uw2ooQ2cYgU2iAiBWLkdA5cdKhE5OjNE/WAwMtl4QDEJKqKZmmYf28WKbYw=="}]},"_npmUser":{"name":"simonwoerpel","email":"simon@investigativedata.org"},"maintainers":[{"name":"simonwoerpel","email":"simon@investigativedata.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ftm-assets_0.0.3_1747062506539_0.4461111844587369"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-12T13:09:47.393Z","modified":"2025-05-12T15:08:26.909Z","0.0.3-rc1":"2025-05-12T13:09:47.687Z","0.0.3":"2025-05-12T15:08:26.743Z"},"bugs":{"url":"https://github.com/dataresearchcenter/ftm-assets/issues"},"author":{"name":"Simon Wörpel","email":"simon.woerpel@pm.me"},"license":"AGPLv3+","homepage":"https://github.com/dataresearchcenter/ftm-assets#readme","repository":{"type":"git","url":"git+https://github.com/dataresearchcenter/ftm-assets.git"},"description":"javascript fetching logic for ftm-assets","maintainers":[{"name":"simonwoerpel","email":"simon@investigativedata.org"}],"readme":"[![ftm-assets on pypi](https://img.shields.io/pypi/v/ftm-assets)](https://pypi.org/project/ftm-assets/)\n[![Python test and package](https://github.com/dataresearchcenter/ftm-assets/actions/workflows/python.yml/badge.svg)](https://github.com/dataresearchcenter/ftm-assets/actions/workflows/python.yml)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![Coverage Status](https://coveralls.io/repos/github/dataresearchcenter/ftm-assets/badge.svg?branch=main)](https://coveralls.io/github/dataresearchcenter/ftm-assets?branch=main)\n[![AGPLv3+ License](https://img.shields.io/pypi/l/ftm-assets)](./LICENSE)\n\n# ftm-assets\n\nResolve assets (currently images) related to [FollowTheMoney](https://followthemoney.tech) entities.\n\n## Get images based on qid\n\n```bash\ncat entities.ftm.json | ftm-assets load-entities\n```\n\n## Run api server\n\n```bash\nuvicorn --port 8000 ftm_assets.api:app --workers 4\n```\n\n## Get asset metadata\n\nFor images:\n\n```bash\ncurl https://localhost:8000/img/<entity_id>\n```\n\n```json\n{\n    \"id\": \"<entity_id>\",\n    \"url\": \"...\",\n    \"alt\": \"...\",\n    \"attribution\": {\n        \"author\": \"...\",\n        \"license\": \"...\",\n    }\n}\n```\n\n## Run as an OpenAleph worker service\n\n    pip install ftm-assets[openaleph]\n\nTo ingreate `ftm-assets` into the [OpenAleph](https://openaleph.org) ecosystem as a worker that processes entities, start the worker queue like this:\n\n    PROCRASTINATE_APP=ftm_assets.tasks.app procrastinate worker -q ftm-assets\n\nTo defer tasks from other places, use `ftm-assets` as queue name and `ftm_assets.tasks.resolve_image` as the task identifier.\n\n### Docker\n\nRun the queue worker with changing the entrypoint to `procrastinate`:\n\n    docker run ghcr.io/dataresearchcenter/ftm-asstets --entrypoint procrastinate worker -q ftm-assets\n\n## License and Copyright\n\n`ftm-assets`, (C) 2025 [Data and Research Center – DARC](https://dataresearchcenter.org)\n\n`ftm-assets` is licensed under the AGPLv3 or later license.\n\nsee [NOTICE](./NOTICE) and [LICENSE](./LICENSE)\n","readmeFilename":"README.md"}