abromberg / cryptonote-cli

CryptoNote from the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cryptonote-cli

Use CryptoNote from the command line:

$ cryptonote 'I am using CryptoNote.org from the command line'
https://cryptonote.org/messages/387213a5-1f2a-4b78-b8db-f1987644f95f?gen_password=hhIttjzTGeDnQc6vcfsdbo4WXirSBbAt

Config

This depends on:

  • CasperJS
  • Coffee Script

Use brew and npm to install:

$ brew update
$ brew install casperjs
$ sudo npm install -g coffee-script

Setup

Clone wherever:

$ cd ~/Downloads
$ git clone git@github.com:backus/cryptonote-cli.git

Link the two files into your path:

$ cd ~/usr/local/bin
$ ln -s ~/Downloads/cryptonote-cli/cryptonote.coffee
$ ln -s ~/Downloads/cryptonote-cli/cryptonote
$ chmod 777 cryptonote

Optional: If you don't link into /usr/local/bin then change cnpath in cryptonote to the appropriate directory.

Usage

Open the command line and type:

$ cryptonote 'YOUR SECRET MESSAGE'

and get your URL. Remember the single quotes.

Bonus

I made this so I could create notes from Alfred. With cryptonote-cli I can now activate alfred via a hotkey and type my message like so:

Alfred CryptoNote Usage

and a few seconds later Alfred copies the CryptoNote URL to my clipboard and notifies me:

CryptoNote Notification

Setting Up CryptoNote + Alfred

I've included the Alfred Workflow in the repo. To install it you can just go to the repo directory and open the file, Alfred should do the rest:

$ cd ~/Downloads/cryptonote-cli
$ open cryptonote.alfredworkflow

Alfred doesn't inherit system path settings, and my casperjs and phantomjs installations live in /usr/local/bin, which is why the short bash script in the Alfred workflow looks a bit strange. If your executable or script paths are different then you will have to modify the workflow.

Notes on Stability

All this script does is pull up CryptoNote in CasperJS's headless browser, update the form, submit the page, and grab the final URL. If Alain updates the CryptoNote HTML that this script touches then it will probably break. Passwords and geo-fencing are not supported.

About

CryptoNote from the command line

License:MIT License


Languages

Language:CoffeeScript 79.2%Language:Shell 20.8%