This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
navierstokes [2014/09/01 23:25] sekula [Download Latest Release] |
navierstokes [2015/07/24 22:47] sekula [Other Information] |
||
---|---|---|---|
Line 21: | Line 21: | ||
===== Download Latest Release ===== | ===== Download Latest Release ===== | ||
- | {{:navierstokes-0.9.0.tgz|}} | + | <code> |
+ | git clone https://hub.polari.us/code/index.cgi/navierstokes/ | ||
+ | git checkout v1.0.0 | ||
+ | </code> | ||
Release notes: | Release notes: | ||
- | * Welcome to Jon Robbins (https://io.jrobb.org/jrobb) who is now an active developer on this project. His major contributions are mentioned below. | + | * Removed Facebook support - fbcmd is an abandoned project and there is no suitable replacement that speaks to the current FB API. If you want to push to FB, I recommend using a bridge from another social network, like the one from Twitter to FB (and vice versa). |
- | * Changes since v0.8.1 | + | * The Message Object now supports a link back to the original post on the web (e.g. a URL pointing to the pump.io web object corresponding to the original note, or a URL pointing to the RSS news story turned into a message). |
- | * Total overhaul of the way message IDs are defined and then stored to archive files. Now use unique IDs from social network. If such a thing does not exist, then generate the ID as an MD5 checksum from the message content | + | * Twitter now will post all messages shared to it, even those with >140 characters. Message content is truncated, depending on whether there is an attached image or not, and a link to the original message is embedded in the tweet. This will also help "spread the word" about the existence of alternative social networks by linking back to them. |
- | * Jon Robbins added a new set of configuration options for URL shortening and support for using UR1 or Shortenizer. Thanks, Jon! | + | * Twitter images are now no longer just t.co links inside a tweet; the image HTML and content itself is downloaded and processed, the image is rescued from the original tweet, and physically attached to messages posted to other social networks. |
- | * BUGS Fixed: | + | * Improved unicode handling in messages for Python 2.7.X, which is still the basic Python supported by this code. |
- | * [[http://polari.us/dokuwiki/doku.php?id=community:bug_handle_unicode_better]]: try/except attempts to catch places where strings and unicode might get mixed. | + | * BUGFIXES: handle missing message object attributes in a more robust way; improved use of subprocess for running and checking the success of commands like "t"; avoid posting empty messages; lots of bugfixes for FacebookTools, but since it's gone now anyway... who cares? |
- | * [[http://polari.us/dokuwiki/doku.php?id=community:bug_strip_urls_from_text_before_fuzzy_matching]]: URLs shortened or handled in different ways by different networks caused posts to falsely have a negative fuzzy match. Jon Robbins suggested that we strip URLs from text, then fuzzy match. That seems to work great. | + | |
- | * [[http://polari.us/dokuwiki/doku.php?id=community:bug_facebook_always_gets_two_copies_of_some_posts]]: Fixing the MD5/message ID definitions and handling and the fuzzy text matching issue appears to have resolved this problem. Keep an eye on it anyway... | + | |
- | * LICENSE file added (Apache 2.0) | + | |
- | * Lots of small code improvements and bug fixes | + | |
- | + | ||
- | * This is now a BETA release. Still, use it at your own risk. It's very likely that the same post will appear 500 times in one hour on your favorite social network and cost you half of your friends. | + | |
* Email any bugs you find to <navierstokes+NOSPAM@polari.us> | * Email any bugs you find to <navierstokes+NOSPAM@polari.us> | ||
- | ---- | + | Browse the code: [[https://hub.polari.us/code/index.cgi/navierstokes/]] |
+ | ---- | ||
===== Requirements ===== | ===== Requirements ===== | ||
Line 55: | Line 53: | ||
* cd fuzzywuzzy | * cd fuzzywuzzy | ||
* python setup.py install | * python setup.py install | ||
- | * FBCMD | ||
- | * This is needed if you want to bridge to Facebook. | ||
- | * [[http://fbcmd.dtompkins.com/]] | ||
* t (Ruby Gem for interacting with Twitter) | * t (Ruby Gem for interacting with Twitter) | ||
* This is needed if you want to bridge to Twitter. | * This is needed if you want to bridge to Twitter. | ||
Line 63: | Line 58: | ||
* gem install t (requires Ruby 1.9 or greater) | * gem install t (requires Ruby 1.9 or greater) | ||
* txt2html: needed for clean text -> HTML conversion (e.g. from Twitter messages to Pump.io) | * txt2html: needed for clean text -> HTML conversion (e.g. from Twitter messages to Pump.io) | ||
+ | * ImageMagick: needed to rescale image attachments | ||
In general, here are the Python libraries needed to make this package operate: | In general, here are the Python libraries needed to make this package operate: | ||
Line 94: | Line 90: | ||
===== Installation ===== | ===== Installation ===== | ||
- | - Unpack the tarball. This automatically creates the navierstokes/ application directory | + | - Check out the code from the git repository above. This automatically creates the navierstokes/ directory. |
- You should create a configuration file for NavierStokes: ~/.navierstokes/navierstokes.cfg. The syntax for the file is explained below. | - You should create a configuration file for NavierStokes: ~/.navierstokes/navierstokes.cfg. The syntax for the file is explained below. | ||
- If you intend to bridge between Pump.io and other networks, you must use PyPump to register a client (e.g. NavierStokesApp) on Pump.io. Follow their instructions for getting the client credentials and tokens. Enter those into the <code>~/.navierstokes/navierstokes.cfg</code> file (see example below). PyPump docs: [[https://pypump.readthedocs.org/en/latest/]] | - If you intend to bridge between Pump.io and other networks, you must use PyPump to register a client (e.g. NavierStokesApp) on Pump.io. Follow their instructions for getting the client credentials and tokens. Enter those into the <code>~/.navierstokes/navierstokes.cfg</code> file (see example below). PyPump docs: [[https://pypump.readthedocs.org/en/latest/]] | ||
Line 127: | Line 123: | ||
aspect: public | aspect: public | ||
sharelevel: All | sharelevel: All | ||
- | |||
- | [facebook] | ||
- | type: facebook | ||
- | username: My Name On Facebook | ||
- | album: Timeline Photos | ||
- | sharelevel: Public | ||
[twitter] | [twitter] | ||
Line 154: | Line 144: | ||
</code> | </code> | ||
- | Note that "sharelevel" means at what level of publicity from other networks you want a notice shared to this one. I've set this, for now, the way I like it. If you set this to "Public", ONLY notices that are public on other networks will go there. For instance, I only like to share things that are public on pump.io with Facebook and Twitter. Things on Twitter are public by default, so they will ALWAYS be shared with other networks. | + | Note that "sharelevel" means at what level of publicity from other networks you want a notice shared to this one. I've set this, for now, the way I like it. If you set this to "Public", ONLY notices that are public on other networks will go there. For instance, I only like to share things that are public on pump.io with Twitter. Things on Twitter are public by default, so they will ALWAYS be shared with other networks. |
"shortenurls" presently enabled will take ALL URLs listed in the message text and shorten them via ur1.ca. In the future, this will be a choice the user can make. | "shortenurls" presently enabled will take ALL URLs listed in the message text and shorten them via ur1.ca. In the future, this will be a choice the user can make. | ||
Line 164: | Line 154: | ||
===== Running NavierStokes ===== | ===== Running NavierStokes ===== | ||
- | Once you have written a .cfg file and setup account information in it (and, in the case of Pump.io, Twitter, and Facebook, authenticated PyPump, t, and FBCMD against those respective networks as clients), you can try executing NavierStokes manually: | + | Once you have written a .cfg file and setup account information in it (and, in the case of Pump.io and Twitter, authenticated PyPump and t against those respective networks as clients), you can try executing NavierStokes manually: |
> python ./NavierStokes.py | > python ./NavierStokes.py | ||
Line 225: | Line 215: | ||
- | * The logo is a mashup of a Wikimedia Commons image from the Navier-Stokes Equation Wikipedia Page and the logo of the Pump.io, GNU Social, and Diaspora networks. I intentionally left Twitter and Facebook off the logo as I don't want to deal with issues of using their logo. | + | * The logo is a mashup of a Wikimedia Commons image from the Navier-Stokes Equation Wikipedia Page and the logo of the Pump.io, GNU Social, and Diaspora networks. I intentionally left Twitter off the logo as I don't want to deal with issues of using their logo. |
* Bernoulli Fluid Flow image: "BernoullisLawDerivationDiagram" by MannyMax (original) - [[:Image:BernoullisLahenrique gostoso da america latia .,.... wDerivationDiagram.png]]. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons - https://commons.wikimedia.org/wiki/File:BernoullisLawDerivationDiagram.svg#mediaviewer/File:BernoullisLawDerivationDiagram.svg | * Bernoulli Fluid Flow image: "BernoullisLawDerivationDiagram" by MannyMax (original) - [[:Image:BernoullisLahenrique gostoso da america latia .,.... wDerivationDiagram.png]]. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons - https://commons.wikimedia.org/wiki/File:BernoullisLawDerivationDiagram.svg#mediaviewer/File:BernoullisLawDerivationDiagram.svg | ||
* Pump.io logo: "Pump.io" by Mathiasgebbe - Own work. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Pump.io.svg#mediaviewer/File:Pump.io.svg | * Pump.io logo: "Pump.io" by Mathiasgebbe - Own work. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Pump.io.svg#mediaviewer/File:Pump.io.svg |