thechangelog / nightly

Changelog Nightly unearths the hottest repos on GitHub before they blow up. Subscribe for free. Keep up.
https://changelog.com/nightly
MIT License
206 stars 19 forks source link

Add a Text/plain content type of the nightly. #30

Closed jperras closed 5 years ago

jperras commented 5 years ago

It would be advantageous for some of the more curmudgeonly subscribers, such as myself, to receive the nightly newsletter in text/plain.

jerodsanto commented 5 years ago

Are you the one I was chatting with on Twitter about this? Or is "curmudgeonly subscribers" appropriately pluralized? 😉

jperras commented 5 years ago

@jerodsanto Apparently there are dozens of us! It wasn't me on Twitter.

I read my email in text/plain, and while w3m does a decent job of formatting the HTML into ASCII, it's not as good as it could be. I know I'm one of the minority of people that abhor HTML in emails, though, so I make do with what I can :)

jerodsanto commented 5 years ago

That's hilarious. This is not that hard of a feature, really, I just figured nobody cared. 😆

So we do send it in both html and text formats currently, but we're just letting Campaign Monitor consume our html and spit out a text version, which is not ideal.

Are you saying that your client ignores the text version we deliver and does its own ASCII conversion?

jperras commented 5 years ago

Are you saying that your client ignores the text version we deliver and does its own ASCII conversion?

I thought I was only receiving HTML emails, which my client would then convert to something more readable (I can usually tell by how it ends up looking), but I was mistaken. You are actually sending the text/plain content type:

Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

So, it must be the conversion from HTML to text/plain that Campaign Monitor is performing that just looks odd, as you mentioned.

jerodsanto commented 5 years ago

Ok that makes sense. I'm keen on making this happen, but as an html kinda dude I don't know what a good text version would look like...

Would sensible Markdown text be ideal? If not, maybe you could take the most recent issue and convert it to an ASCII style that is pleasing to you and we can go from there?

jperras commented 5 years ago

Would sensible Markdown text be ideal? If not, maybe you could take the most recent issue and convert it to an ASCII style that is pleasing to you and we can go from there?

I can definitely do that. Is appending the result to this issue ok?

jerodsanto commented 5 years ago

Yeah that works for me

jperras commented 5 years ago

Here's a first pass at it. I took some liberty to add in pseudo template variables:

* View Web Version: {WEB_VERSION_URL}
* Fork on GitHub: {NIGHTLY_REPO_URL} 
* Changelog Weekly: {CHANGELOG_WEEKLY_URL}
* Changelog Nightly: {CHANGELOG_NIGHTLY_URL 

--

## Top Starred Repositories – First Timers

These repos were not previously featured in Changelog Nightly

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{STARS_COUNT} stars, up by {UP_COUNT}.

{REPO_DESCRIPTION}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{STARS_COUNT} stars, up by {UP_COUNT}.

{REPO_DESCRIPTION}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{STARS_COUNT} stars, up by {UP_COUNT}.

{REPO_DESCRIPTION}

--

## Top New Repositories

These repos were open sourced on {NEW_REPO_DATE}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{STARS_COUNT} stars, up by {UP_COUNT}.

{REPO_DESCRIPTION}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{STARS_COUNT} stars, up by {UP_COUNT}.

{REPO_DESCRIPTION}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{STARS_COUNT} stars, up by {UP_COUNT}.

{REPO_DESCRIPTION}

--

## Top Starred Repositories – Repeat Performers

These repos were previously featured in Changelog Nightly.

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{TOTAL_STARS_COUNT} stars, up by {UP_COUNT}, and listed {NUM_LIST_COUNT} times.

{REPO_DESCRIPTION}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{TOTAL_STARS_COUNT} stars, up by {UP_COUNT}, and listed {NUM_LIST_COUNT} times.

{REPO_DESCRIPTION}

### {REPOSITORY_NAME} - {REPOSITORY_URL} ({REPO_MAIN_LANGUAGE})

{TOTAL_STARS_COUNT} stars, up by {UP_COUNT}, and listed {NUM_LIST_COUNT} times.

{REPO_DESCRIPTION}

--

Subscribe to Changelog Weekly [https://changelog.com/weekly] – our curated and less frequent email.

You're receiving this because you subscribed at https://changelog.com/nightly/

I kept it as Markdown but without the [url](href) structure, since if you're not rendering the raw ASCII into Markdown it doesn't really make sense, and adds to the line noise.

jerodsanto commented 5 years ago

I dig it; will blend with a few ideas I have and get something shipped. Then you can live with it a few days and provide feedback. I'll also look up the Twitter person and invite them here to give their feedback as well.

jperras commented 5 years ago

@jerodsanto Thanks! Sounds like a plan to me.

jerodsanto commented 5 years ago

Ok here's what I have so far. One thing I considered, but wasn't sure about is maybe indenting the star counts and details would make it easier to scan?

If you're happy with this we can ship it and see what it looks like in an actual email...

# Changelog Nightly

* View on Web: http://nightly.changelog.com/2019/03/16
* Fork on GitHub: https://github.com/thechangelog/nightly
* Changelog Weekly: https://changelog.com/weekly

---

## Top Starred Repositories - First Timers

(These repos were not previously featured in Changelog Nightly)

### the-craft-of-selfteaching (Jupyter Notebook) - https://github.com/selfteaching/the-craft-of-selfteaching

3,168 stars, up by 668

One has no future if one couldn't teach themself.

### code-server (TypeScript) - https://github.com/codercom/code-server

9,760 stars, up by 362

Run VS Code on a remote server.

### js-dev-reads - https://github.com/twhite96/js-dev-reads

941 stars, up by 303

A list of books 📚and articles 📝 for the discerning web developer to read.

### laxxx (JavaScript) - https://github.com/alexfoxy/laxxx

1,694 stars, up by 254

Simple & light weight (2kb minified & zipped) vanilla javascript plugin to create smooth & beautiful animations when you scrolllll! Harness the power of the most intuitive interaction and make your websites come alive!

### LARK (Python) - https://github.com/PaddlePaddle/LARK

529 stars, up by 253

LAnguage Representations Kit

### Machine-Learning-Study-Path-March-2019 - https://github.com/clone95/Machine-Learning-Study-Path-March-2019

966 stars, up by 210

A complete ML study path, focused on TensorFlow and Scikit-Learn

### calculator (C++) - https://github.com/Microsoft/calculator

13,370 stars, up by 176

Windows Calculator: A simple yet powerful calculator that ships with Windows

### V - https://github.com/vlang-io/V

1,014 stars, up by 168

Simple, fast, safe, compiled language for creating maintainable software. Supports translation from C/C++.

### ghidra - https://github.com/NationalSecurityAgency/ghidra

11,115 stars, up by 123

Ghidra is a software reverse engineering (SRE) framework

### wechat-format (JavaScript) - https://github.com/lyricat/wechat-format

754 stars, up by 119

微信公众号排版编辑器,转换 Markdown 到微信特制的 HTML

### gmail_clone (Dart) - https://github.com/AppleEducate/gmail_clone

316 stars, up by 117

A Gmail Clone built with Flutter

### Submit News - https://changelog.com/submit

Where do you think we should shine the light?

---

## Top New Repositories

(These repos were open sourced on March 16, 2019)

### strace-little-book - https://github.com/NanXiao/strace-little-book

63 stars, up by 28

A little book which introduces strace.

### GTANativeResolution (C) - https://github.com/TheOfficialFloW/GTANativeResolution

22 stars, up by 14

Internal resolution patch for PSP GTA series

### vue-skeleton-mvp (Vue) - https://github.com/davellanedam/vue-skeleton-mvp

40 stars, up by 13

VueJs, Vuetify, Vue Router and Vuex skeleton MVP written on JavaScript using async/await built to work with API REST skeleton: <a href='https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton'>https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton</a>

### copyless (Rust) - https://github.com/kvark/copyless

19 stars, up by 12

Avoid memcpy calls when working with standard containers

### asmshare - https://github.com/cch123/asmshare

23 stars, up by 11

some ideas about asm &amp;&amp; plan9 asm

### EVTX-SAMPLES - https://github.com/sbousseaden/EVTX-SAMPLES

14 stars, up by 9

Windows Events Samples

### jikefm (Go) - https://github.com/0neSe7en/jikefm

11 stars, up by 8

即刻电台 for cli

### coloursum (Rust) - https://github.com/ticky/coloursum

17 stars, up by 8

🎨 Colourise your checksum output

### Founders Talk - https://changelog.com/founderstalk

In-depth, one on one conversations with founders, CEOs, and makers

---

## Top Starred Repositories - Repeat Performers

(These repos were previously featured in Changelog Nightly)

### libfacedetection (C++) - https://github.com/ShiqiYu/libfacedetection

5,240 stars, up by 508, listed 2 times

An open source library for face detection in images. The face detection speed can reach 1500FPS.

### send (JavaScript) - https://github.com/mozilla/send

6,201 stars, up by 157, listed 4 times

Simple, private file sharing from the makers of Firefox

## END

Subscribe to Changelog Weekly (https://changelog.com/weekly) - our curated and less frequent email

You're receiving this because you subscribed at https://changelog.com/nightly

Copyright Changelog Media, All rights reserved
jperras commented 5 years ago

This looks great. Two suggestions, after thinking about it for a bit:

  1. Indenting the stars/counts sounds like a good idea.
  2. It might be advantageous to put repo URLs on their own separate line - some repos have very long names, and I can see that being a problem. Example:

    ### this-is-a-really-long-project-name-just-for-the-sake-of-having-a-long-name (JavaScript)
    
        - https://github.com/example/this-is-a-really-long-project-name-just-for-the-sake-of-having-a-long-name
        - 6,201 stars, up by 157, listed 4 times
    
    Some really long project that is just to be used as an example.
jerodsanto commented 5 years ago

@jperras okie doke, first plaintext issue will be shipping tonight! 💪

jperras commented 5 years ago

@jerodsanto Thanks! Looking forward to it!

jperras commented 5 years ago

Received it, and it looks great:

text/plain of the nightly

(the blue [N] marks are added by my mail reader so that I can open up URLs by a number instead of having to mouse click/copy them; ignore them in this screenshot)

It also continues to render high plane unicode symbols, which is 👍. The only thing that seems to be amiss is the HTML entities that made their way into the description of one of the repositories, as I've highlighted via red circles in the screenshot above.

The entities are a bit annoying, but not a deal breaker; it might also only be for this particular description, too, since the unicode symbols were encoded just fine.

In any regard, I've dealt with far worse in my mail client. If you're able to figure out what's causing the quoted HTML entities to show up without pulling your hair out then go for it, otherwise I'm really happy with the result!

Mayeu commented 5 years ago

Thank you for this! I was the one asking for this on twitter but did not found the time to take a look at the issue 😅

jerodsanto commented 5 years ago

@jperras we're now unescaping html entities in text descriptions (b80bc92), so that shouldn't be a problem going forward.

I think we can call this feature a wrap, closing issue ✊

jperras commented 5 years ago

Very awesome. Thanks for implementing this, @jerodsanto. It is very much appreciated!