Skip to content

AWS Lambda-hosted rss parser used to read update notes from the warframe official forums and post them to the warframe community subreddit

License

Notifications You must be signed in to change notification settings

desmaraisp/CephalonAhmes

Repository files navigation

Contributors Forks Stargazers Issues MIT License codecov


Logo

AWS Lambda-hosted rss feed parser used to read update notes from the warframe official forums and post them to the warframe community subreddit
Report Bug or Request Feature

About The Project

This reddit bot focuses on parsing rss feeds like this one and converting them into reddit-compatible markdown.

You can see here the reason behind the creation of this project. You can also see the full list of submissions made by the bot over here.

Built With

This project uses the following technologies, among others:

  • Python

  • Docker

  • Lambda

  • SAM CLI/AWS CloudFormation

Getting Started

To get a local copy up and running, follow these simple example steps.

Prerequisites

Local Setup

  1. Create a new reddit application
  2. Create an AWS key pair. Alternatively, you can skip this and log in with aws configure sso if your account supports it.
  3. Clone the repo
    git clone https://github.com/desmaraisp/CephalonAhmes.git
  4. Create .envvars file, then update all secrets using the previously created values
    cp ./.envvars.template ./.envvars
  5. Open directory using VSCode devcontainer

Local deployment to AWS

Once you've started your devcontainer, all the tools required to start your own instance of CephalonAhmes should be ready to use. You might want to update the configuration first though, but once you've configured everything, start a bash prompt in vscode and use the following query to create your AWS Lambda function:

aws cloudformation deploy --stack-name CephalonAhmesPipelineResources  --template-file SAMDeploy/SAMPreliminaryDeploy.yml

RepositoryUri=$(aws cloudformation list-exports --query "Exports[?Name=='CephalonAhmesRepositoryUri'].Value" --no-paginate --output text)

sam build --template-file ./SAMDeploy/SAMTemplate.yaml

sam deploy --config-file ./SAMDeploy/samconfig.toml --image-repositories "CephalonAhmesFunction=$RepositoryUri" --parameter-overrides "CEPHALONAHMESPRAWCLIENTID=$CEPHALONAHMES_PRAW_CLIENT_ID CEPHALONAHMESPRAWCLIENTSECRET=$CEPHALONAHMES_PRAW_CLIENT_SECRET CEPHALONAHMESPRAWPASSWORD=$CEPHALONAHMES_PRAW_PASSWORD CEPHALONAHMESPRAWUSERNAME=$CEPHALONAHMES_PRAW_USERNAME ConfigurationName=base"

This will use the values we've configured in the .envvars file to configure aws cli authentication and to upload environment variables to AWS Lambda upon deploying.

Configuration

All the project settings can be found in the settings file. It is possible to override the base settings by adding another settings file, such as the test settings and by specifying the ConfigurationName env variable.

You can also directly override configuration items by setting environment variables formatted as such: CEPHALONAHMES_[Name of the setting you want to override]. For example, to override the PRAW_PASSWORD setting, set an env var for CEPHALONAHMES_PRAW_PASSWORD.

For a full list of all configuration items, see here

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

/u/desmaraisp

Acknowledgments

About

AWS Lambda-hosted rss parser used to read update notes from the warframe official forums and post them to the warframe community subreddit

Topics

Resources

License

Stars

Watchers

Forks