Planet Leo

a→ab (Jacob Peck)LTD Week 2014 01

Interesting week… here’s some highlights:

  • Work
    • Finished up post-blackboard-migration cleanup
    • Installed a custom page to make maintainence downtimes less user-hostile on blackboard
    • Fixed some yearly accounting errors related to holdiays… silly unix
    • Encountered a mysterious bug on an email script that only runs once a month
    • Made a user account on one of our machines
  • Responsibility
    • Refactored my LTD stuff into an external script (things were getting ugly)
  • Leisure
    • Added @color support to @buttons in Leo
    • Ran through a test run of migrating Leo from bzr to github
    • Worked a bit on silica
    • Updated the Leo color map
    • Updated orison’s software
    • Failed to get a Red Eclipse server installed on orison… I’ll try again soon.

a→ab (Jacob Peck)LTD Week Fourteen

Being a holiday week — and also containing my birthday — I slacked off a bit this week.

  • Work
    • Install ghostscript 9.10 on blackboard server
    • Initial cleanup of old blackboard server stuff
    • Dead email address purging from several scripts
  • Responsibility
    • Applied for an apartment (whoo!)
    • That’s about it…
  • Leisure
    • Worked a bit on silica (‘modules’ work now)
    • Worked on the beginnings of a Leo-Trello sync plugin
    • Designed 2(!) micro RPGs
    • Read “Dark Guest”
    • Read WMLP #5

a→ab (Jacob Peck)LTD Week Thirteen

Busy busy pre-holiday week:

  • Work
    • Added a database into our backup policy
    • Replaced a dead power supply on a server
    • Performed the final blackboard migration (in record time!)
  • Responsibility
    • Flundered big time on my Tabata routine. Grr.
    • Reconciled my checkbook (a mammoth undertaking!)
    • Did some housekeeping on my LTD workbook
  • Leisure
    • Started work on silica! Yes!
    • Read WMLP #3 and #4
    • Rewrote a good chunk of the Mint Fudge rules
    • Updated orison’s software

Whee…

Oh, and yesterday was my birthday :)

Official Leo Editor BlogRegistering Leo with Windows

a post in progress

Installing Leo using the standard setup program from Sourceforge does nice things like create Start Menu & Desktop shortcuts and enable open Leo files with a simple double-click. For those that like to run from source code or a portable drive there are manual instructions for doing the same, but it's fiddly and rapidly gets old. Why repeat when automation is possible?

Introducing register-leo.leox (and unregister-leo): which creates the necessary Windows registry keys for integration with Explorer and friends. After running this script .leo and .leox files are shown with the Leo icon, and double-clicking on them will open them in Leo.

To use: open a command shell with administrative rights, and run:

    d:\path\to\python.exe d:\path\to\leo\launchLeo.py e:\path\to\register-leo.leox

All in one step: you can try the elevate.py script which will ask for Admin privileges from a regular command shell:

    d:\path\to\python.exe d:\path\to\leo\leo\scripts\elevate.py e:\path\to\register-leo.leox

Eventually I'd like to see this activated from a Settings/Options/Preferences menu. Then we can distribute daily and portable builds of Leo and still have easy (dis)integration with the host (on Windows) and not rely so heavily on stable builds and installers, which are few and long between 'cause of the pain in building them.

Developed and tested with Python 2.7, Leo 4.10 and Win7 x64. Py3 needs work.

Feedback/testing/patches welcome (see mailing list).

-Matt Wilkie


Notes

What's this .leox?

I created this convention so I could easily distinguish regular Leo files, which can be about anything, and Leo files which are runnable Leo scripts. The intention is to allow for things like:

    leo --script d:\path\to\scripts\register-leo.leox

At present double-clicking a .leox opens in edit mode. It occurs to me as I write this it could be changed so it runs automatically by adding, --script (quotes might need fiddling with):

ftype LeoFile="C:\Python27\python.exe" "B:\apps\leo\launchLeo.py" "--script ""%1"" %*

Any .leo is a launcher

Association has the added benefit of removing the need for most to create a batch file and then figure out where in PATH to store it in order to use Leo. As a matter of fact, any .leo file becomes the equivalent of launchLeo.py, just try this:

%homedrive%\homepath%\workbook.leo x:\path\to\some\other\leofile.leo

or to build on the previous note:

%homedrive%\homepath%\workbook.leo --script ..\scripts\unregister-leo.leox

Resources used

http://superuser.com/questions/88491/force-cmd-exe-to-run-as-admin/
http://stackoverflow.com/questions/2331690/how-to-set-a-icon-file-while-creating-file
http://stackoverflow.com/questions/771689/how-can-i-set-an-icon-for-my-own-file-extension

Official Leo Editor BlogNodewatch for Productivity

Over on my personal blog, I've posted a quick example of how I use nodewatch.py to stay productive.

Official Leo Editor BlogLeo editor bookmarks plugin demo on Vimeo

a hewer of maps (Matt Wilkie)Portable Leo from scratch on Windows

Here is a recipe for installing Leo from scratch on Windows (Win7 tested). The only prerequisites are command line wget in PATH and an internet connection.

About 50mb of files are downloaded and 200mb consumed when done.

Open a command prompt and run:

mkdir X:\testing

pushd X:\testing



wget -O apt.exe --no-clobber http://download.osgeo.org/osgeo4w/release/apt/apt-r1193M.exe

SET OSGEO4W_ROOT=%~dp0\root

apt setup

apt update

apt install pyqt4 sip



call root\osgeo4w.bat



wget --no-check-certificate http://gist.github.com/maphew/5393935/raw/install-pip.py

python install-pip.py GO

python install-pip.py GO



pip install -i https://testpypi.python.org/pypi leo-editor



python apps\Python27\Scripts\leo

After this the directory X:\testing\root can be renamed and/or moved anywhere.

To run leo in future sessions, simply call x:\path\to\root\osgeo4w.bat python apps\Python27\Scripts\leo, either as a batch file or windows shortcut.

IMPORTANT NOTE - this is just a proof of concept. It pulls together a couple of my different projects, and is very satisfying in that regard (yay! they work!), but is not ready for prime time. Feedback welcome.

(((this is a post in progress, see this thread for more)))

MJ's work reproduced

2010-Oct-08

I've successfully recreated the single octant and eight octant Open Office drawings from the macros and instructions provided. It took a couple of hours because I had to figure out how OO macro dialogs work, and don't. There were some errors at the beginning that went away by themselves -- which always make me nervous because one is never sure if one day they might also decide to come back by themselves! I used OO v3.2 on linux so that may have contributed to the difficulty.

8-octant-svg_thumb.png

Results are at https://bitbucket.org/maphew/cahill-...t/5b36f8fd8471 (download using [get source] link at right)\ \ Anyway, the upshot is now I have a practical understanding of what the macros do and some glimmerings of how to improve one or two things. I don't have much faith in being able to use oo-Draw long term for this project as it is quite sluggish already with just the grid and graticule let alone any geography loaded. On the other hand, it *is* a working prototype so it's not time to discard just yet. :)\ \ The .svg file was created by a simple File > Export from oo-Draw and loads into Inkscape very nicely. This is encouraging as it means the work is portable; SVG - scalable vector graphic - is a vendor  independent standard format understood by a variety of programs in both the graphic design and GIS/CAD industries.\  

Footnotes