Skip to content

Commit

Permalink
tidy up, rename osx services, stub for changelog, remove homebrew, ad…
Browse files Browse the repository at this point in the history
…d osx gthnk script
  • Loading branch information
iandennismiller committed Nov 21, 2017
1 parent 9ee02c2 commit 09caea5
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 249 deletions.
4 changes: 4 additions & 0 deletions bin/gthnk
@@ -0,0 +1,4 @@
#!/bin/bash

# Open Gthnk in the default web browser
open "http://localhost:1620"
File renamed without changes.
36 changes: 4 additions & 32 deletions bin/integration.py
Expand Up @@ -3,11 +3,7 @@
# gthnk (c) Ian Dennis Miller

import sys

import click
import os
import random
import string
import warnings

from flask.exthook import ExtDeprecationWarning
Expand Down Expand Up @@ -39,43 +35,19 @@ def cli():

@cli.command('install', short_help='integrate Gthnk with the operating system')
def do_install():
sys.path.insert(0, '.')
from gthnk.integration import make_config
config = make_config()
config["do_install"](config)


@cli.command('uninstall', short_help='remove Gthnk installation')
def do_uninstall():
sys.path.insert(0, '.')
from gthnk.integration import make_config
config = make_config()
config["do_uninstall"](config)


def make_config():
sys.path.insert(0, '.')
from gthnk.integration.osx import install_osx, uninstall_osx
from gthnk.integration.windows import install_windows, uninstall_windows

chars = string.ascii_letters + string.digits + '^!$&=?+~#-_.:,;'

if os.name == 'nt':
config = {
'secret_key': repr(os.urandom(24)),
'hash_salt': "".join([random.choice(chars) for _ in range(24)]),
'home_directory': os.environ["USERPROFILE"],
"app_data": os.environ["APPDATA"],
'do_install': install_windows,
'do_uninstall': uninstall_windows,
}
else:
config = {
'secret_key': repr(os.urandom(24)),
'hash_salt': "".join([random.choice(chars) for _ in range(24)]),
'home_directory': os.path.expanduser("~"),
'do_install': install_osx,
'do_uninstall': uninstall_osx,
}

return(config)


if __name__ == '__main__':
cli()
11 changes: 6 additions & 5 deletions docs/Todo.md
Expand Up @@ -2,33 +2,34 @@

## Milestone 1

- [ ] rename OS X integration services
- [ ] bug: fix date picker
- [ ] bug: image attachments not centering
- [ ] improvement: narrow screen rendering
- [ ] improvement: remove /admin prefix on URLs

## Milestone 2

- [ ] powerpoint presentation
- [ ] produce installation videos
- [ ] produce overview video
- [ ] produce usage video
- [ ] overview powerpoint presentation
- [ ] more robust testing of journal_explorer attachments
- [ ] installers - windows setup.exe and osx .pkg for Python/virtualenv
- [ ] enable flake8 Dxxx checks
- [ ] testing for integration, somehow
- [ ] testing for integration.py
- [ ] fill out changelog

## Milestone 3

- [ ] installers - windows setup.exe and osx .pkg for Python/virtualenv
- [ ] integration for Debian/Ubuntu-flavored Linux
- [ ] integration for Redhat/Fedora-flavored Linux

## Done
## Ready for Upcoming Release

- [x] integration for Windows
- [x] refresh documentation with new installation procedures
- [x] testing for View components
- [x] code coverage
- [x] basic testing for Model components
- [x] testing for Librarian
- [x] rename OS X integration services
13 changes: 10 additions & 3 deletions docs/about/history.rst
@@ -1,8 +1,15 @@
History of gthnk
================

I began documenting my work-related thoughts in a *work journal* circa 2006. Initially, I used Open Office templates. I chose to separate journal entries with a timestamp because I could type it pretty quickly on a numeric keypad. I iterated through quite a few methods for keeping a chronological sequence of entries until I ended up with **gthnk**.
I began documenting my work-related thoughts in a *work journal* circa 2006.
Initially, I used Open Office templates.
I chose to separate journal entries with a timestamp because I could type it pretty quickly on a numeric keypad.
I iterated through quite a few methods for keeping a chronological sequence of entries until I ended up with **gthnk**.

This work was inspired by DevonThink, which I really tried to use. For me, I needed a less opaque container for my information. I wanted my text files to stay text files, because my concern was that years or decades down the road, I would not be able to access text files stored in a DevonThink filesystem container.
This work was inspired by DevonThink, which I really tried to use.
For me, I needed a less opaque container for my information.
I wanted my text files to stay text files, because my concern was that years or decades down the road, I would not be able to access text files stored in a DevonThink filesystem container.

This work was also inspired by Vernor Vinge's *Marooned in Realtime*, which featured a companion-like computer called "Greenthink". This computer presented an interface that was hight customized to the person who trained and used their Greenthink system.
This work was also inspired by Vernor Vinge's *Marooned in Realtime*, which featured a companion-like computer called "GreenInc".
This computer presented an interface that was hight customized to the person who trained and used their GreenInc system.
Ironically enough, I misremembered the name of Vinge's system as "GreenThink" to the extent that I had used it as a name for an earlier prototype of the Gthnk system.
32 changes: 32 additions & 0 deletions docs/changelog.rst
@@ -0,0 +1,32 @@
Changelog
=========

0.5.0
-----

- 2017-11-XX
- ...

0.4.0
-----

- 2016-01-05
- 20f71c7a773c2321b52b421b831d039ef23d6d01

0.3.0
-----

- 2015-01-31
- 70efeefdfb4d5e54bb8713d94301375b68db8c08

0.2.0
-----

- 2014-11-15
- b8793334ccd918a3ca5f0739ca668527e08de1b4

0.1.0
-----

- 2013-12-09
- 90fd96647ca24d568d16779420029c8fbb2d41b6
1 change: 1 addition & 0 deletions docs/index.rst
Expand Up @@ -34,6 +34,7 @@ About

about/history
about/flask-diamond
changelog
License

.. about/credits-and-attributions
Expand Down
29 changes: 29 additions & 0 deletions gthnk/integration/__init__.py
Expand Up @@ -2,6 +2,8 @@
# gthnk (c) Ian Dennis Miller

import os
import random
import string
import subprocess
from six.moves import input
from getpass import getpass
Expand Down Expand Up @@ -68,3 +70,30 @@ def create_db(db_filename, conf_filename, python_path, manage_path):
print("result:\t{0}".format(res))
else:
print("exists:\t{0}".format(db_filename))


def make_config():
from .osx import install_osx, uninstall_osx
from .windows import install_windows, uninstall_windows

chars = string.ascii_letters + string.digits + '^!$&=?+~#-_.:,;'

if os.name == 'nt':
config = {
'secret_key': repr(os.urandom(24)),
'hash_salt': "".join([random.choice(chars) for _ in range(24)]),
'home_directory': os.environ["USERPROFILE"],
"app_data": os.environ["APPDATA"],
'do_install': install_windows,
'do_uninstall': uninstall_windows,
}
else:
config = {
'secret_key': repr(os.urandom(24)),
'hash_salt': "".join([random.choice(chars) for _ in range(24)]),
'home_directory': os.path.expanduser("~"),
'do_install': install_osx,
'do_uninstall': uninstall_osx,
}

return(config)
121 changes: 0 additions & 121 deletions gthnk/integration/homebrew/gthnk.rb

This file was deleted.

62 changes: 0 additions & 62 deletions gthnk/integration/homebrew/poet-homebrew.sh

This file was deleted.

0 comments on commit 09caea5

Please sign in to comment.