Remove depricated code. Use "jdone" project instead.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 17 Nov 2011 20:08:16 +0200
changeset 831 2fb6f961702d
parent 830 52df3d263c55
child 832 6ee7dee9df3a
Remove depricated code. Use "jdone" project instead.
Makefile
stmcrblog-mode.el
stmcrblog.sh
--- a/Makefile	Thu Nov 17 12:17:14 2011 +0200
+++ b/Makefile	Thu Nov 17 20:08:16 2011 +0200
@@ -87,7 +87,6 @@
 	$(EMACS) --batch \
 		--eval='(let ( (generated-autoload-file "~/.emacs.d/my-lisp/autoload-my.el") ) (update-directory-autoloads "~/.emacs.d/my-lisp") )'
 	./.emacs-autogen.sh $(HOME)/.emacs-autogen
-	install -m 775 stmcrblog.sh $(HOME)/usr/bin/stmcrblog
 
 .PHONY: uninstall
 uninstall:
--- a/stmcrblog-mode.el	Thu Nov 17 12:17:14 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-;;; stmcrblog-mode.el --- static micro-blogging engine from Emacs
-
-;; Copyright (C) 2011 by Oleksandr Gavenko <gavenkoa@gmail.com>
-
-;; You can do anything with this file without any warranty.
-
-;; Author: Oleksandr Gavenko <gavenkoa@gmail.com>
-;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com>
-;; Created: 2011-11-10
-;; Version: 0.1
-;; Keywords: blog, microblog, blogging, gtd
-
-;;; Commentary:
-;;
-;; Very pure release.
-;;
-;; Depricated. Use 'jdone' mode.
-
-;;; Code:
-
-(defconst stmcrblog-major-version 0
-  "stmcrblog major version.")
-
-(defconst stmcrblog-minor-version 1
-  "stmcrblog major version.")
-
-(defun stmcrblog-version (&optional here)
-  "Return stmcrblog version."
-  (interactive "P")
-  (let ( (version-string (format "stmcrblog %d.%d" stmcrblog-major-version stmcrblog-minor-version)) )
-    (if here
-        (insert version-string)
-      (if (called-interactively-p 'interactive)
-          (message "%s" version-string)
-        version-string))
-    ))
-
-(defvar stmcrblog-file "~/.stmcrblog"
-  "Blog entries storage file name.")
-
-(defvar stmcrblog-after-add-entry-hook nil
-  "`stmcrblog-after-add-entry-hook' called after adding entries.
-You can use this hook to render and publish `stmcrblog-file'.")
-
-(defun stmcrblog-add-entry (msg)
-  "Add post to blog.
-Automatically set time to current value. Only first line of MSG
-was added.
-
-`stmcrblog-after-add-entry-hook' called after adding entries. You
-can use this hook to render and publish `stmcrblog-file'."
-  (let (
-        (coding-system-for-read 'utf-8)
-        (coding-system-for-write 'utf-8)
-        pos
-        )
-    (setq pos (string-match "\n" msg))
-    (when pos
-      (setq msg (substring msg 0 pos)))
-    (save-excursion ;save-window-excursion
-      (find-file stmcrblog-file)
-      (beginning-of-buffer)
-      (insert
-       (format-time-string "%Y-%m-%d %H:%M" (current-time))
-       " "
-       msg
-       "\n")
-      (save-buffer)
-      (kill-buffer)
-      )
-    (run-hooks 'stmcrblog-after-add-entry-hook)
-    ))
-
-(defvar stmcrblog-buffer-name "*stmcrblog-entry*"
-  "`stmcrblog' buffer name for composing editing message")
-
-(defun stmcrblog-post-edit (&optional msg)
-  (let (
-        (buffer (get-buffer-create stmcrblog-buffer-name))
-        (current-buffer (current-buffer))
-        )
-    (switch-to-buffer buffer)
-    (local-key-binding )
-    (kill-buffer buffer)
-    (error "not-implemented")
-    ))
-
-;;;###autoload
-(defun stmcrblog-post (&optional prefix start end)
-  "Post entry.
-Interactively, in Transient Mark mode when the mark is active,
-operate on the contents of the region. Otherwise, open
-`stmcrblog-buffer-name' buffer for message editing."
-  (interactive "P\nr")
-  (let ( msg )
-    (when (and (called-interactively-p 'interactive) transient-mark-mode mark-active)
-      (setq msg (buffer-substring-no-properties start end))
-      )
-    (if msg
-        (stmcrblog-add-entry msg)
-      )
-  ))
-
-;;;###autoload
-(defun stmcrblog-post-current-line (prefix)
-  "Post current line.
-With prefix remove current line."
-  (interactive "P")
-  (stmcrblog-add-entry (buffer-substring-no-properties (line-beginning-position) (line-end-position)))
-  (when prefix
-    (move-beginning-of-line 1)
-    (kill-line)
-    )
-  )
-
-(provide 'stmcrblog-mode)
-
-;;; stmcrblog-mode.el ends here
--- a/stmcrblog.sh	Thu Nov 17 12:17:14 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# Example of this script using:
-#   (defun my-stmcrblog-after-add-entry-hook ()
-#     (shell-command (concat "stmcrblog " stmcrblog-file " /srv/www/htdocs/jobdoneblog.html"))
-#     )
-#   (add-hook 'stmcrblog-after-add-entry-hook 'my-stmcrblog-after-add-entry-hook)
-#   (global-set-key (kbd "C-c y") 'stmcrblog-post-current-line)
-
-in=$1
-out=$2
-
-if [[ ! -f $in ]]; then
-  echo Input file not found.
-  exit 1
-fi
-if [[ -z $out ]]; then
-  echo I don\'t know where is output file...
-  exit 1
-fi
-
-{
-  echo '<html>'
-  echo '<head>'
-  echo '  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
-  echo '  <title>Job done blog.</title>'
-  echo '</head>'
-  echo '<body>'
-  echo '<h1>Job done blog.</h1>'
-
-  echo '<ul>'
-
-  sed \
-    -e 's|^\([[:digit:]-]\+[02468]\) \([[:digit:]:]\+\) \(.*\)|  <li><span style="color: green;">\1 \2</span> \3</li>|' \
-    -e 's|^\([[:digit:]-]\+[13579]\) \([[:digit:]:]\+\) \(.*\)|  <li><span style="color: blue;">\1 \2</span> \3</li>|'
-
-  echo '</ul>'
-
-  echo '<address>'
-  echo '  <a href="mailto:gavenko@bifit.com.ua">Oleksandr Gavenko</a>'
-  echo '  </address>'
-  echo '</body>'
-  echo '</html>'
-
-} <$in >$out
-