TankWiki

Really not just a WikiEngine/WikiFarm, but that's it's current outward-facing flavor. Built by Chris Dent who built Tiddly Space. 2014-02-15-DentTankWiki

Free for now, but hopefully he'll eventually charge a sustainable price.

My choice for Picking A Wiki For Your Private Notebook.

https://tank.peermore.com/

https://github.com/cdent/tank

Chris Dent's spaces

mine - I think got emptied https://tank.peermore.com/tanks/BillSeitz/RecentChanges


Starting to work with Tank code

Rough plan: just install Tiddly Web (assume won't be changing that), but make fork of Tank to install (because I'll want to start adding things for my needs, while making it easy for Chris to ignore or improve them).

May23'2014: Make VirtualEnv - virtualenv tank. Activate/enter.

Install Tiddly Web: pip install -U tiddlyweb

Fork Tank in GitHub, clone.

(Walk away for months)

Sept29'2014: get back into it

  • on new MacBook Pro - yikes can't even run Git command-line until I install X Code again.
  • hmm, I had set the upstream to my GitHub repository, but it sounds like I should have it set to the Chris's original one. So I changed it.
  • then synch his updates to local, then push to my GitHub master.
  • since I'm not interested in Tiddly Wiki integration, I'm not installing tiddlywebwiki
    • but then how do I create an instance?
    • he says:
      • do a mkdir - I do mkdir webseitzwiki from in tank/tank
      • put a tiddlywebconfig.py inside it and edit it
      • launch by running twanager server
  • change tiddlywebconfig.py
    • I'm going to run locally on port 8086
    • GitHub OAuth setup -
      • Have to register my app. Using WebSeitzWikiLocal as name, callback as http://localhost:8086/_oauth/callback
        • copy/paste Client ID and Client Secret from response page into config file
    • Not going to use binaries for now, so not setting up AWS.
    • setting server_host.host to localhost
  • run
    • do twanager server from inside webseitzwiki: {{{ $ twanager server Traceback (most recent call last): File "/Users/billseitz/Documents/djcode/tank/bin/twanager", line 19, in handle(args) File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/manage.py", line 66, in handle from tiddlyweb.config import config File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/config.py", line 221, in read_config(config) File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/util.py", line 72, in read_config from tiddlywebconfig import config as custom_config File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebconfig.py", line 3, in import mangler Import Error: No module named mangler }}}
  • Chris Dent provides some direction
    • there's already a copy of mangler.py in the repo - copy into the instance directory. Done.
    • get different tiddlywebconfig.py from here. Customize.
      • Aside from obvious stuff, look for hard-coded paths currently set to include /home/tiddlyweb/
    • set up some symlinks: The tiddlywebplugins.tank and tiddlywebplugins.oauth and the "src" and "templates" dirs from the tank repo need to be symlinked into your instance dir: {{{ cd instancedir ln -s /Users/billseitz/Documents/djcode/tank/tank/src . ln -s /Users/billseitz/Documents/djcode/tank/tank/tiddlywebplugins . ln -s tiddlywebplugins/templates . cd tiddlywebplugins ln -s /Users/billseitz/Documents/djcode/tank/tank/tiddlywebplugins/oauth . }}}
      • note had to pull in tiddlywebplugins/oauth from here
      • that last line gives ln: ./oauth: File exists which I'm going to ignore for now
  • try to run again: {{{ File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/mangler.py", line 10, in import tiddlywebplugins.utils Import Error: No module named utils }}}
    • go grab tiddlywebplugins.utils from here
  • try to run again: {{{ File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebplugins/tank/init.py", line 11, in from tiddlywebplugins.atom import init as atom_init Import Error: No module named atom }}}
  • Chris notes there are a bunch of plugins required, listed in install_requires inside setup.py
    • temporarily remove oath from that list, then python setup.py develop
    • installs everything, generating some warnings along the way
    • then put oauth back in the list
  • try running again - looks like that symlink failure noted above is an issue: {{{ File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebplugins/tank/init.py", line 18, in from tiddlywebplugins.oauth import init as oauth_init File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebplugins/oauth/init.py", line 8, in from .consumer import do_user_auth File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebplugins/oauth/consumer.py", line 19, in from oauth2client.client import Error as OAuthError Import Error: No module named oauth2client.client }}}
  • Chris says do pip install -U oauth2client
  • run: {{{ File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebplugins/tank/closet.py", line 9, in from boto.s3.connection import S3 Connection Import Error: No module named boto.s3.connection }}}
  • Chris says do a massive pip from this line
  • run: {{{ ERROR:root:Failed to load PyY A M L, will not parse YAML Traceback (most recent call last): File "/Users/billseitz/Documents/djcode/tank/bin/twanager", line 19, in handle(args) File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/manage.py", line 83, in handle imported_module.init(config) File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebplugins/tank/init.py", line 137, in init dispatcher_init(config) File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlywebplugins.dispatcher-0.9-py2.6.egg/tiddlywebplugins/dispatcher/init.py", line 24, in init make_provider_beanstalkc(config, bail=True) File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlywebplugins.dispatcher-0.9-py2.6.egg/tiddlywebplugins/dispatcher/init.py", line 48, in make_beanstalkc client = beanstalkc.Connection(host=host, port=port) File "build/bdist.macosx-10.9-intel/egg/beanstalkc.py", line 59, in init File "build/bdist.macosx-10.9-intel/egg/beanstalkc.py", line 65, in connect File "build/bdist.macosx-10.9-intel/egg/beanstalkc.py", line 43, in wrap beanstalkc.SocketError: [Errno 61] Connection refused }}}
  • Chris says add line to config section of tiddlywebconfig.py: 'use_dispatcher': False
  • run: same error
  • Chris says also add line 'beanstalk.listeners': []
  • run: same error
  • Chris says: in tiddlywebplugins/tank/__init__.py comment out the line that says dispatcher_init(config)
  • run: success!
  • but going to fix the YAML issue: pip install -U pyyaml
  • launch server again
  • hit http://localhost:8086/ - get sign-in-or-up-with-GitHub page
  • get GitHub Authorize page, then get form to create my username, then get Hi Bill Seitz page. Says I have 2 tanks: Bill Seitz and Bill Seitz-notebook.
  • click link into Bill Seitz get error page ending in {{{ Import Error: couldn't load module for tiddlywebplugins.markdown: No module named importlib, No module named tiddlywebplugins.markdown }}}
  • do pip install -U importlib
  • ack, this is all running python 2.6.8, and Mark Down library only supports 2.7 and 3.2+ now.

Oct02: see if I can upgrade Python without having to re-install all those plugins - if have to re-install, will probably just dump the VirtualEnv and create a new one from scratch...

  • non-VirtualEnv Python is currently 2.7.2, while latest version available is 2.7.7. Downloading binary of latest version.
  • try following instruction on VirtualEnv page to point the VirtualEnv at that newer Python that's not in the virtualenv. Smells like need to upgrade virtualenv. {{{ File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise [Distribution Not Found] # XXX put more info here pkg_resources.Distribution Not Found: virtualenv==1.7.1.2 }}}
  • Try to upgrade virtualenv - smells like need to upgrade pip first: {{{ pip install virtualenv --upgrade Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in working_set.require(requires) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise [Distribution Not Found] # XXX put more info here pkg_resources.Distribution Not Found: pip==1.1 }}}
  • Try running get-pip.py: {{{ python get-pip.py Downloading/unpacking pip Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip Cleaning up... No distributions at all found for pip Storing debug log for failure in /Users/billseitz/.pip/pip.log }}}
  • try other way: {{{ $ pip install -U pip Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in working_set.require(requires) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise [Distribution Not Found] # XXX put more info here pkg_resources.Distribution Not Found: pip==1.1 }}}
  • ahh: sudo easy_install -U pip worked.
  • now do sudo pip install virtualenv --upgrade
  • now try $ sudo virtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/billseitz/Documents/djcode/tank fail {{{ Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 5, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in working_set.require(requires) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise [Distribution Not Found] # XXX put more info here pkg_resources.Distribution Not Found: virtualenv==1.7.1.2 }}}
  • uninstalled and re-installed virtualenv per here
  • then {{{ $ sudo virtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/billseitz/Documents/djcode/tank Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/2.7/bin/python New python executable in /Users/billseitz/Documents/djcode/tank/bin/python Installing setuptools, pip...done. Overwriting /Users/billseitz/Documents/djcode/tank/bin/activate with new content Overwriting /Users/billseitz/Documents/djcode/tank/bin/activate.fish with new content Overwriting /Users/billseitz/Documents/djcode/tank/bin/activate.csh with new content }}}
  • enter/launch the virtualenv, check - looks good: {{{ which python /Users/billseitz/Documents/djcode/tank/bin/python (tank)Bill SeitzMacBook Pro:webseitzwiki billseitz$ python Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) }}}
  • now try launching server - I think I'm hosed: {{{ $ twanager server Traceback (most recent call last): File "/Users/billseitz/Documents/djcode/tank/bin/twanager", line 9, in from tiddlyweb.manage import handle Import Error: No module named tiddlyweb.manage }}}

Edited:    |       |    Search Twitter for discussion