python and npm and windows oh my!

So, I'm trying to play around with somebody else's image-bot: https://github.com/beaugunderson/node-twitter-not-quote-right

Only the dependencies need python.

Thus begins my arduous journery.
StackOverflow has some suggestions:

cinst python
npm i -g node-gyp

Although the installer says that python was added to the PATH, restart the shell anyway.
'cause it can't be found.

Now, npm i throws a new error:

c:\projects\node-twitter-not-quote-right\node_modules\canvas-utilities\node_modules\canvas>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.4.2, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & <
3.0.0.

So, looks like it specifically need to be

cinst python2

Then, we still have issues:

Warning: Missing input files:
C:\GTK\bin\zlib1.dll
C:\GTK\bin\libexpat-1.dll
C:\GTK\bin\libpng14-14.dll
C:\GTK\bin\libcairo-2.dll
C:\GTK\bin\libfontconfig-1.dll
C:\GTK\bin\libfreetype-6.dll
build/binding.sln(1): Solution file error MSB5014: File format version is not recognized. MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.

Also, the StackOverlow link, above, suggests other MS libs or build-tools that need to be present. I'll keep at this....

node-gyp installation notes specifically note that For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDK. I did not have it installed.

....

Still error.

I double-checked, and the DK was supposed to be at C:\Program Files\Microsoft SDKs\Windows\v7.1 but did not exist.

so... re-running installer as Administrator....

Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information.

UPDATE (the next day): looks like I got it working with the following:

"%VS100COMNTOOLS%"\\vsvars32.bat // VS2010 environment variables

Based on this SO answer.

node-gyp works, but there are now issues are in the node-canvas utilities.

https://github.com/Automattic/node-canvas/wiki/Installation---Windows

Windows shells

I've been using Console2 for.... a year+ ?
I read about ConEmu sometime this fall, but haven't used it a lot.

At work, my GnuTools are not on the path... for some reason (interference with corp. build tools? undocumented data hygeine practice? sheer voodo? prolly the latter).
Which makes working with ConEmu a pain, because nothing I'm used to is present.

However, there are startup commands that it can execute, just like Console2. Who'd a thunk it, right?!!

%comspec% /k set PATH=\path\to\GnuWin32\bin;%PATH%

HOWEVER, that removes all the other init.bat niceness that exists.

I ended up interleaving this command into the existing init.bat file. Not sure of a better way to handle it, yet.


UPDATE: at home, the tools are on the PATH variable, and I have no such issues. C'est la vie.

Tweet Embed

Added a new recipe to the wiki that allows for easy tweet embedding.
I'm thinking of tweaking it, as I prefer a different method of markup.

[tweet url=https://twitter.com/NewsForGoats/status/570971490184761344]

Brackets are a standard character, so I'd prefer something more along the lines of (:

Additionally, I don't see the need for the url= portion. There is an alternate markup that allows for id=<status id.
In both cases, I think the param could be interrogated; if https://twitter.com is present, it's a URL; otherwise it's an ID.

Also, I'm just interested in seeing if the recipe can be extended to grab the raw twitter URL and make an embed from that.

PROBLEM: markup example, above.

See Also: Xrad:Programming/Shell