Skip to content

Bot to Share News and Relevant Information for a City or Geographic Area

License

Notifications You must be signed in to change notification settings

ericrosenberg1/CityBot2

Repository files navigation

Contributors Forks Stargazers Issues

CityBot2

CityBot2 is a Python-based application designed to create social media posts for a local area. The initial version supports news source RSS feeds and government data on weather and earthquakes. It can post to Bluesky, Facebook, LinkedIn, and Twitter/X.

You can download it to your server and schedule it to run with city-specific customizations. Testing and improvements are welcome!

This is a major upgrade and full rewrite of the original CityBot (archived).

Snyk Maintainability Test Coverage Codacy Badge

Table of Contents
  1. Built With
  2. Getting Started
  3. Dependencies
  4. Usage
  5. Roadmap
  6. Contributing
  7. Contributors
  8. License
  9. Acknowledgments

Built With

(back to top)

Getting Started

Disclaimer: This app comes with no warranties or guarantees. Use it at your own risk. It's recommended to use a virtual environment to keep your dependencies isolated from the rest of your system.

Prerequisites

  • Ensure you have a recent version of Python installed.
  • Create and activate a virtual environment.
  • Update pip.

Example:

mkdir CityBot2
cd CityBot2
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip

Installation

  1. Clone the repository:

    git clone https://github.com/ericrosenberg1/CityBot2
    cd CityBot2
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure city and credentials:

    cd config
    mv credentials.env.example credentials.env
    nano credentials.env

    Update credentials and save.

    Update city configuration:

    nano city_example.json

    Set your city details, save, and exit.

  4. Run the app:

    cd ..
    python main.py
  5. View logs:

    tail -f logs/citybot.log

(back to top)

Dependencies

CityBot2 may require system dependencies for mapping and geospatial support. On Debian/Ubuntu systems, you might need:

  • python3-pip
  • python3-dev
  • build-essential
  • libatlas-base-dev
  • gfortran
  • libgeos-dev
  • libproj-dev
  • proj-data
  • proj-bin
  • libcairo2-dev
  • pkg-config
  • python3-cartopy
  • cutycapt

(back to top)

Usage

After configuration and installation, run python main.py to start the bot. Check logs/citybot.log for activity and error messages.

(back to top)

Roadmap

  • Create documentation
  • Improve error handling
  • Create a basic web GUI
  • Make it easier to update city configurations
  • Publish on PyPi or provide apt install method

See the open issues for a full list of proposed features and known issues.

(back to top)

Contributing

Contributions are welcome! If you find a bug or have a suggestion, open an issue or create a pull request.

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

Stars are appreciated!

(back to top)

Contributors

(back to top)

License

Distributed under the GPLv3 License. See LICENSE.txt for more information.

(back to top)

Acknowledgments

(back to top)

About

Bot to Share News and Relevant Information for a City or Geographic Area

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages