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

Initial build out #1

Open
syntheticgoo opened this issue Sep 7, 2024 · 2 comments
Open

Initial build out #1

syntheticgoo opened this issue Sep 7, 2024 · 2 comments
Assignees

Comments

@syntheticgoo
Copy link
Member

Shawn, we have a need to maintain a list of committee logos, most likely sourced solely from the committee Twitter/X accounts.

Some notes:

  • Committees will typically have two Twitter accounts: one for the majority party, and one for the minority party. For starters, we are only interested in the majority party logos.
  • Twitter can be known to block IP Addresses if it detects too many web bot style requests. We'll likely need to use the API. I can give you API keys.
  • The list of Twitter accounts should be saved as a JSON or YAML file as part of the repo. This allows us to make updates to it with a logging history of those changes.
  • The logos themselves should also be part of the repo, in a subfolder called "images/original". We will also have folders for resized versions of the same photos. This isn't crucial for the initial build out though. See this repo as an example: https://github.com/unitedstates/images
  • The scraping logic should be written in Typescript. Any API keys should be env variables not saved in the code.

A list of the accounts is forthcoming. I'll post it to this repo shortly.

@syntheticgoo
Copy link
Member Author

syntheticgoo commented Sep 9, 2024

Tasks:

  • decide whether to use Deno or Node. If Node, run npm run init -y from root of project to create package.json.
  • test and create a png to jpeg script for existing original files
  • create a script which resizes original images to WxH of: 350x425, 200x200, 100x100, 40x40

@syntheticgoo
Copy link
Member Author

syntheticgoo commented Sep 9, 2024

Suggestions: look at npm sharp library for resizing

https://sharp.pixelplumbing.com/api-constructor (Docs)
npm library: https://www.npmjs.com/package/sharp

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

No branches or pull requests

2 participants