├── client ├── debian │ ├── compat │ ├── control │ ├── copyright │ ├── rules │ └── changelog ├── bash_profile ├── setup.py ├── Makefile ├── zshrc ├── experimental │ └── interactive-history.py ├── test_history_file.py ├── test_inline_tag.py ├── test_shell_sink_client.py └── shellsink-client ├── server ├── images │ ├── tag.png │ ├── button.png │ ├── favicon.ico │ ├── annotate.png │ ├── lt-arrow.png │ ├── rt-arrow.png │ ├── shellsink-plain.jpg │ └── shellsink-lowres.jpg ├── __init__.py ├── app.yaml ├── html │ ├── command.html │ ├── tags.html │ ├── commands_by_tag.html │ ├── atom.xml │ ├── add_tag.html │ ├── annotation.html │ ├── shellsink.gpg │ ├── preferences.html │ ├── commands.html │ └── shellsink_base.html ├── index.yaml ├── paging_helper.py ├── test │ ├── test_paging_helper.py │ ├── test_command_tag.py │ ├── test_sysadmin.py │ └── test_command.py ├── todo.txt ├── command.py ├── sysadmin.py ├── stylesheets │ └── style.css ├── js │ └── shellsink.js ├── command_tag.py ├── shellsink.py └── command_search.py ├── gpl ├── RELEASE_HELP.txt └── README.markdown /client/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /server/images/tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/tag.png -------------------------------------------------------------------------------- /server/images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/button.png -------------------------------------------------------------------------------- /server/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/favicon.ico -------------------------------------------------------------------------------- /server/images/annotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/annotate.png -------------------------------------------------------------------------------- /server/images/lt-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/lt-arrow.png -------------------------------------------------------------------------------- /server/images/rt-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/rt-arrow.png -------------------------------------------------------------------------------- /server/images/shellsink-plain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/shellsink-plain.jpg -------------------------------------------------------------------------------- /server/images/shellsink-lowres.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuacronemeyer/shellsink/HEAD/server/images/shellsink-lowres.jpg -------------------------------------------------------------------------------- /client/bash_profile: -------------------------------------------------------------------------------- 1 | #Shell Sink 2 | #See http://shell-sink.blogspot.com/2008/12/installing-shellsink-client-application.html for installation instructions. 3 | shopt -s histappend 4 | export SHELL_SINK_COMMAND=shellsink-client 5 | export SHELL_SINK_ID=your-hex-id 6 | PROMPT_COMMAND="history -a;$SHELL_SINK_COMMAND" 7 | export SHELL_SINK_TAGS=colon:delimited:list:of:tags 8 | -------------------------------------------------------------------------------- /client/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from distutils.core import setup 4 | 5 | setup(name = "shellsink", 6 | version = "0.1", 7 | description = "Shellsink is a tool for storing your bash history on the shellsink.com server", 8 | author = "Josh Cronemeyer", 9 | author_email = "joshuacronemeyer@shellsink.com", 10 | url = "http://shellsink.com", 11 | data_files = [('/usr/bin', ['shellsink-client'])] 12 | ) 13 | -------------------------------------------------------------------------------- /client/debian/control: -------------------------------------------------------------------------------- 1 | Source: shellsink 2 | Section: utils 3 | Priority: extra 4 | Maintainer: Josh Cronemeyer 5 | Build-Depends: python (>=2.4), debhelper (>= 5) 6 | Standards-Version: 3.7.3 7 | 8 | Package: shellsink 9 | Architecture: any 10 | Depends: python (>=2.4), ${shlibs:Depends}, ${misc:Depends} 11 | Description: Client for logging bash history to shellsink.com 12 | Shellsink is a client for logging bash history to shellsink.com 13 | -------------------------------------------------------------------------------- /client/Makefile: -------------------------------------------------------------------------------- 1 | # $Id: Makefile,v 1.6 2008/12/26 01:01:35 josh Exp $ 2 | # 3 | PYTHON=`which python` 4 | DESTDIR=/ 5 | 6 | all: 7 | @echo "make install - Install on local system" 8 | @echo "make buildsrc - Generate a deb source package" 9 | @echo "make clean - Get rid of scratch and byte files" 10 | 11 | install: 12 | $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) 13 | 14 | buildsrc: 15 | debuild -S 16 | 17 | clean: 18 | $(PYTHON) setup.py clean 19 | $(MAKE) -f $(CURDIR)/debian/rules clean 20 | -------------------------------------------------------------------------------- /client/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by qa on 2 | Mon, 22 Dec 2008 20:37:24 -0800. 3 | 4 | It was downloaded from https://code.launchpad.net/shellsink 5 | 6 | Upstream Author(s): 7 | 8 | joshuacronemeyer@shellsink.com 9 | 10 | Copyright: 11 | 12 | 13 | 14 | License: 15 | 16 | GNU GPL v3 17 | 18 | The Debian packaging is (C) 2008, qa and 19 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 20 | -------------------------------------------------------------------------------- /client/zshrc: -------------------------------------------------------------------------------- 1 | #Shellsink 2 | #See http://shell-sink.blogspot.com/2008/12/installing-shellsink-client-application.html for installation instructions. 3 | 4 | # number of lines kept in history 5 | export HISTSIZE=1000 6 | 7 | # number of lines saved in the history after logout 8 | export SAVEHIST=1000 9 | 10 | # location of history 11 | export HISTFILE=~/.zhistory 12 | 13 | # append command to history file once executed 14 | setopt inc_append_history 15 | 16 | # allow interactive comments 17 | setopt interactivecomments 18 | 19 | # execute shellsink before a new command is run 20 | function precmd { 21 | /path/to/shellsink-client; 22 | } 23 | -------------------------------------------------------------------------------- /server/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.5 2 | # 3 | # Copyright 2008 Google Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | -------------------------------------------------------------------------------- /gpl: -------------------------------------------------------------------------------- 1 | """ 2 | This file is part of Shell-Sink. 3 | Copyright Joshua Cronemeyer 2008, 2009 4 | 5 | Shell-Sink is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | Shell-Sink is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License v3 for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with Shell-Sink. If not, see . 17 | """ 18 | -------------------------------------------------------------------------------- /server/app.yaml: -------------------------------------------------------------------------------- 1 | application: shell-sink 2 | version: 3 3 | runtime: python 4 | api_version: 1 5 | 6 | handlers: 7 | - url: /images 8 | static_dir: images 9 | 10 | - url: /stylesheets 11 | static_dir: stylesheets 12 | 13 | - url: /js 14 | static_dir: js 15 | 16 | - url: /favicon.ico 17 | static_files: images/favicon.ico 18 | upload: images/favicon.ico 19 | 20 | - url: /addCommand* 21 | script: shellsink.py 22 | 23 | - url: /addTag* 24 | script: shellsink.py 25 | 26 | - url: /atom* 27 | script: shellsink.py 28 | 29 | - url: /pull* 30 | script: shellsink.py 31 | 32 | - url: /shellsink.gpg 33 | static_files: html/shellsink.gpg 34 | upload: html/shellsink.gpg 35 | 36 | - url: /.* 37 | login: required 38 | script: shellsink.py 39 | -------------------------------------------------------------------------------- /server/html/command.html: -------------------------------------------------------------------------------- 1 | 18 | {% extends "commands.html" %} 19 | 20 | {% block paging %} 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /server/html/tags.html: -------------------------------------------------------------------------------- 1 | 18 | {% for tag in tags %}{{ tag }}, {% endfor %} 19 | -------------------------------------------------------------------------------- /RELEASE_HELP.txt: -------------------------------------------------------------------------------- 1 | ##Instructions for creating a new release of the client code to push to the 2 | ##shellsink PPA. Of course *I* use shellsink for this, but I thought somebody 3 | ##else might have to do this someday. 4 | 5 | ##Dependencies: 6 | -dput 7 | -debuild 8 | -dch 9 | 10 | ##Make the ~/.dput.cf file have this entry 11 | [shellsink-ppa] 12 | fqdn = ppa.launchpad.net 13 | method = ftp 14 | incoming = ~shellsink/ubuntu/ 15 | login = anonymous 16 | allow_unsigned_uploads = 0 17 | 18 | ##Of course you need the shellsink pgp key to sign packages 19 | 20 | ##Steps: 21 | bzr co lp:shellsink #get the code 22 | cd shellsink 23 | mv client shellsink #the directory we are packaging must match package name 24 | cd shellsink/debian 25 | dch -v 0.2.0 #update the changelog and version 26 | cd shellsink 27 | make buildsrc #build the source deb 28 | cd .. 29 | dput shellsink-ppa shellsink_0.2.0_source.changes #send the change to the ppa 30 | -------------------------------------------------------------------------------- /server/html/commands_by_tag.html: -------------------------------------------------------------------------------- 1 | 18 | {% extends "commands.html" %} 19 | 20 | {% block heading %} 21 |
Commands tagged with: {{ tag }}
22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /server/html/atom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ nickname }}'s Private Feed 4 | tag:shellsink.com,{{ year }}:/{{ user_id }} 5 | 6 | {{ update_time }} 7 | {% for command in commands %} 8 | 9 | tag:shellsink.com,{{ year }}:command/{{ command.key }} 10 | {{ command.date }} 11 | {{ command.date }} 12 | 13 | {{ nickname }} executed {{ command.command|truncatewords:2 }} 14 | 15 | {{ command.command }} 16 | 17 | 18 | {{ nickname }} 19 | 20 | 21 | {% endfor %} 22 | 23 | -------------------------------------------------------------------------------- /server/html/add_tag.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 |
21 | 22 | 23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /client/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | build: 4 | #nothing to do 5 | 6 | clean: 7 | dh_testdir 8 | dh_clean 9 | 10 | install: build 11 | dh_testdir 12 | dh_testroot 13 | dh_prep 14 | dh_installdirs 15 | 16 | # Add here commands to install the package into debian/shellsink. 17 | $(MAKE) DESTDIR=$(shell pwd)/debian/shellsink COMPILE=--no-compile install 18 | 19 | binary-indep: build install 20 | # We have nothing to do by default. 21 | 22 | # Build architecture-dependent files here. 23 | binary-arch: build install 24 | dh_testdir 25 | dh_testroot 26 | dh_installchangelogs 27 | dh_installdocs 28 | dh_installexamples 29 | # dh_install 30 | # dh_installmenu 31 | # dh_installdebconf 32 | # dh_installlogrotate 33 | # dh_installemacsen 34 | # dh_installpam 35 | # dh_installmime 36 | # dh_python 37 | # dh_installinit 38 | # dh_installcron 39 | # dh_installinfo 40 | dh_installman 41 | dh_link 42 | dh_strip 43 | dh_compress 44 | dh_fixperms 45 | # dh_perl 46 | # dh_makeshlibs 47 | dh_installdeb 48 | dh_shlibdeps 49 | dh_gencontrol 50 | dh_md5sums 51 | dh_builddeb 52 | 53 | binary: binary-indep binary-arch 54 | .PHONY: clean binary-indep binary-arch binary install 55 | -------------------------------------------------------------------------------- /server/html/annotation.html: -------------------------------------------------------------------------------- 1 | 18 | 19 |
{{ command.annotation|escape }}
20 |