User Tools

Site Tools


navierstokes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 [2016/04/16 12:52]
sekula [Download Latest Release]
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.
 +</​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 APIIf 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.ga 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 filesNow use unique IDs from social network. If such a thing does not existthen generate ​the ID as an MD5 checksum ​from the message content +  SocialHandlers now support a "​noshare_keyword"​ in the .cfg fileIf this keyword is found in a post, that post will never be shared to other social ​networks. This lets you post without having NavierStokes share something ​to another network. 
-    * Jon Robbins added a new set of configuration options for URL shortening ​and support for using UR1 or ShortenizerThanks, Jon!  +  * Twitter now will post all messages shared to iteven those with >140 charactersMessage 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
-    BUGS Fixed: +  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
-      * [[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+  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_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 matchJon Robbins suggested that we strip URLs from textthen fuzzy matchThat seems to work great+  * BUGFIXES: handle missing message object attributes in 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_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 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 54:
     * 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 59:
     * 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 91:
 ===== 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 120: Line 117:
 client_tokens:​ XXXXXXXXXXXXXXXXXX client_tokens:​ XXXXXXXXXXXXXXXXXX
 sharelevel: All sharelevel: All
 +noshare_keyword:​ noshare
  
 [diaspora] [diaspora]
Line 127: Line 125:
 aspect: public aspect: public
 sharelevel: All sharelevel: All
- +noshare_keyworddiaspiverse
-[facebook] +
-typefacebook +
-username: My Name On Facebook +
-album: Timeline Photos +
-sharelevel: Public+
  
 [twitter] [twitter]
Line 154: Line 147:
 </​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 157:
 ===== Running NavierStokes ===== ===== Running NavierStokes =====
  
-Once you have written a .cfg file and setup account information in it (and, in the case of Pump.ioTwitter, and Facebook, authenticated PyPumpt, 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 218:
  
  
-  * 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