ropensci-org / knowtifier

heroku twitter bot for new ropensci pkgs and versions
https://twitter.com/roknowtifier
MIT License
3 stars 0 forks source link

Avoid truncation in tweets #3

Closed seaaan closed 7 years ago

seaaan commented 7 years ago

When app titles + other tweet text are too long, the tweets break text awkwardly. For example, here. Currently it builds the tweet with "New @rOpenSci pkg. [package name] (v.[version number]) [link]" and then as many characters from the title field of the package description as will fit.

Ideas to prevent truncation:

sckott commented 7 years ago

Right, the current situation isn't ideal.

Will have a go at it, unless you like to do some Ruby, in which case go for it

seaaan commented 7 years ago

I've been thinking about this for a few days. Even with careful human craftsmanship, it's hard to convey the purpose of a package in 50 characters; with automated text retrieval, it seems hopeless. For that reason, absent a policy requiring 50 carefully chosen characters for every rOpenSci package, my solution would be to omit the description entirely.

Without the description, the whole tweet could be expanded slightly to use more characters, something like "New version of @ropensci package [name] (v. [#]) just released, more here: [link]", or left as is.

Just my 2 :moneybag:. Thanks for all you do.

sckott commented 7 years ago

thanks @seaaan - part of the reason for using the pkg description is that they are all different - from what I've read about twitter terms, if you make the format of tweets too similar, they will more easily detect the acct as a bot, and shut it down - so the variation serves a purpose.

having said that, i like your ideas above and can definitely try to:

Require a 50-character package description as part of rOpenSci onboarding

good idea, though in practice, i think would take a long time to get these in every pkg, since we have so many diff. maintainers, etc.

sckott commented 7 years ago

@seaaan made some changes, here's a few examples of what they'll look like

these weren't cut off on end

New ver @rOpenSci pkg git2r (v.0.19.0) https://cran.r-project.org/package=git2r - Provides Access to Git Repositories
New @rOpenSci pkg. historydata (v.0.1) https://cran.r-project.org/package=historydata Data Sets for Historians

these cut off on end

New ver @rOpenSci pkg rImpactStory (v.0.05) https://cran.r-project.org/package=rImpactStory - Retrieves altmetrics from ImpactStory. See
New ver @rOpenSci pkg rsnps (v.0.2.0) https://cran.r-project.org/package=rsnps - Get 'SNP' ('Single-Nucleotide' 'Polymorphism') Data on the
seaaan commented 7 years ago

I think that's a great improvement. Nicely done!

On Wed, Sep 13, 2017 at 7:43 AM, Scott Chamberlain <notifications@github.com

wrote:

@seaaan https://github.com/seaaan made some changes, here's a few examples of what they'll look like

these weren't cut off on end

New ver @rOpenSci pkg git2r (v.0.19.0) https://cran.r-project.org/package=git2r - Provides Access to Git Repositories New @rOpenSci pkg. historydata (v.0.1) https://cran.r-project.org/package=historydata Data Sets for Historians

these cut off on end

New ver @rOpenSci pkg rImpactStory (v.0.05) https://cran.r-project.org/package=rImpactStory - Retrieves altmetrics from ImpactStory. See New ver @rOpenSci pkg rsnps (v.0.2.0) https://cran.r-project.org/package=rsnps - Get 'SNP' ('Single-Nucleotide' 'Polymorphism') Data on the

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropenscilabs/knowtifier/issues/3#issuecomment-329190470, or mute the thread https://github.com/notifications/unsubscribe-auth/AKDNdUyKjRObehxP_U2acsdcCpka6qisks5sh-okgaJpZM4OF_1l .

sckott commented 7 years ago

coolio