Skip to content

danforth-restorative/Marshall-Rosenberg_Quotes

Repository files navigation

Marshall Rosenberg Quotes (@MBR_Quotes)

As time goes on I'll be gathering more quotes from various presentations by Marshall Rosenberg, along with links to content he references, and make sure this account can stay fresh for a long time. This message is too valuable for it to not be shared.

Quote-Bots

I made these to demonstrate autoposting to twitter using GitHub Actions.

Quote Bot (text)

The twitter quote bots were adapted the script found in this guide. I saved the secrets for the Marshall Rosenberg Quotes account as encrypted environment variables saved in this repository, which are pulled into a bash shell as part of the action, and then called into the python script. If you copy this code, you'll need to set your own.

Using the GitHub Action workflow file .github/workflows/quote.yml, this quotes.py runs every 5 hours at the 33rd minute:

    - cron:  '33 */5 * * *'

Workflow Scheduler/Cron Syntax

quotes.py pulls a random quote from quotes.yaml and sends it as a status update to @MarshallRsnberg the Marshall Rosenberg Quotes twitter account.

Quimg Bot

I printed quotes onto images using quimg.py.

.github/workflows/quimg.yml sends an image quote status update every 9 hours at the 11th minute.

    - cron:  '11 */9 * * *'

Cropping Tools

Aspect Ratio Calculator:

https://andrew.hedges.name/experiments/aspect_ratio/

Need Imagemagick for all this stuff:

https://imagemagick.org/index.php

crop all in directory

http://www.fmwconcepts.com/imagemagick/aspectcrop/index.php

for f in * ;
./aspectcrop -a 1920:1080 $f cropped.$f

Using Convert

Aspectcrop only crops proportionally, if you want exact dimensions cropped, use convert.

for f in * ;   
convert $f -crop 1080x1080+0+0 -gravity center insta.$f

Optimization

Reduce size of jpg in place

https://stackoverflow.com/questions/50985087/how-to-reduce-the-file-size-on-jpeg-images-in-batch-mac

mogrify -define jpeg:extent=300kb *.jpg

PngQuant

https://pngquant.org/

Privacy Policy

This app does not collect or store any user data.

Privacy Policy for MBR Quote Bot


With Love

About

Quotes of Marshall Rosenberg auto posted to social media (twitter\facebook) and related tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors