GithubHelp home page GithubHelp logo

jibbarth / slacknewsletter Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 1.0 706 KB

A Symfony Project to build a newsletter from slack workspace.

PHP 75.63% Shell 2.27% Twig 22.11%
symfony php slack slackbuilds newsletter newsletter-service symfony5 github-template

slacknewsletter's Introduction

Slack Newsletter Preview

Slack Newsletter

CI Version

This application allows you to generate a newsletter from your Slack channels. It goes through the channels looking for links, combines them into a html file, and sends it by email. It's ideal for keeping track of your finds when the historical Slack reaches its limit.

Installation & Configuration

  1. Clone the project and launch composer install inside.

  2. Generate a Token on your slack workspace

  3. In your .env.local, complete your smtp configuration, the receivers, and your Slack token like that :

MAILER_DSN=smtp://awesome-smtp:25
[email protected],[email protected]
SLACK_TOKEN=xoxp-XXXXXXXXX-XXXXXXX-XXXXXXXXX
  1. Choose your channels to browse and add them in config/channels.json. You can check out the config/channels.json.dist to see how add a new channels

  2. (OPTIONNAL) : Pimp your newsletter by altering parameters in config/package/parameters.yaml

  3. Configure your cron to execute command to browse, build, and send newsletter.

For example :

## Every day at 8am, browse channels and store them
0 8 * * * php bin/console app:newsletter:browse
## Every monday at 8:05 am, build the newsletter and send it
5 8 * * 1 php bin/console app:newsletter:build && php bin/console app:newsletter:send

Build With

Thank to theirs awesome work.

Customize the newsletter

If you want to customize the newsletter, all templates are in templates folder.

Before testing rendering, you have to retrieve some messages :

php bin/console app:newsletter:browse -d 5

The -d or --days is to specified how many days to retrieve. You can have lots of data by this way.

To test the view in web-browser, launch a web server :

symfony local:server:start -d # With Symfony CLI binary
php -S localhost:8000 -t public # Using php built-in web-server

and go to http://127.0.0.1:8000/test/mail

But you probably have to send emails to test compatibility with emails viewer.

You can launch theses commands to avoid archivation of messages and builded news.

php bin/console app:newsletter:build --no-archive
php bin/console app:newsletter:send --no-archive

Contribute

First of all, thank you for contributing โ™ฅ

If you find any typo/misconfiguration/... please send a PR or open an issue.

Also, while creating your PR, please write a description which gives the context and/or explains why you are creating it.

TODOs

  • Make installation as simple as a composer create-project barth/slacknewsletter
  • Browse private channel
  • Make sure it'll work with Slack App and provide a configuration guide
  • Write Tests Suite
  • Add translations
  • Easily extend with other Team Collaboration Software (Discord, HipChat...)

slacknewsletter's People

Contributors

dependabot[bot] avatar jibbarth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

xavierleune

slacknewsletter's Issues

Parameters as env

In order to render newsletter more configurable as possible, use env() processor to define colors, company name, logo, sender, and maybe base_slack_url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.