From 504949ebc61711a01eea86b463407a65d6ef3a39 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 7 Apr 2013 03:48:21 +0200 Subject: [PATCH] Add site and some complementary files --- CONTRIBUTING | 25 +++++++++++ INSTALL | 48 +++++++++++++++++++++ NEWS | 40 ++++++++++++++++++ README.org | 45 ++++++++++++-------- js/README.org | 100 ++++++++++++++++++++++++++++++++++++++++++++ site/.gitignore | 1 + site/Makefile | 9 ++++ site/index.org | 35 ++++++++++++++++ site/project.el | 17 ++++++++ site/stylesheet.css | 68 ++++++++++++++++++++++++++++++ 10 files changed, 370 insertions(+), 18 deletions(-) create mode 100644 CONTRIBUTING create mode 100644 INSTALL create mode 100644 NEWS create mode 100644 js/README.org create mode 100644 site/.gitignore create mode 100644 site/Makefile create mode 100644 site/index.org create mode 100644 site/project.el create mode 100644 site/stylesheet.css diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 0000000..0f8dd45 --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1,25 @@ +# -*- mode: org; -*- +#+STARTUP: showall + +If you wish to contribute you can use either the sources located on +[[http://code.ryuslash.org/cgit.cgi/clark][ryuslash.org]] or the [[http://github.com/ryuslash/clark.git][github]] sources. + +* Getting the source + + If you wish to work on CLark you can get the sources by cloning the + git repository: + #+BEGIN_EXAMPLE + git clone git://ryuslash.org/clark.git + #+END_EXAMPLE + +* Style + + Use spaces, don't use tabs. If you can, keep lines shorter than 80 + characters. Other than that, Emacs + SLIME can handle indentation + pretty well. + +* Patches + + If you want to send any patches I prefer the output generated by =git + request-pull=, possibly with =-p=, over things like github pull + requests. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..994ddde --- /dev/null +++ b/INSTALL @@ -0,0 +1,48 @@ +# -*- mode: org; -*- +# Copyright (C) 2013 Tom Willemsen +# +# This file is part of CLark +# +# CLark is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# CLark is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with CLark. If not, see . + +#+STARTUP: showall + +CLark currently only targets SBCL, but I am not averse to porting it, +or having it ported, to another (free) Common Lisp implementation. + +* Requirements + + - [[http://sbcl.org][SBCL]] + - [[http://common-lisp.net/project/cl-sqlite/][cl-sqlite]] + + The easiest way to install ~cl-sql~ would be to use [[http://quicklisp.org/beta/][quicklisp]]. Once + you have that set-up it should be a matter of: + #+BEGIN_EXAMPLE + (ql:quickload "sqlite") + #+END_EXAMPLE + +* Installation + + To install, just: + #+BEGIN_EXAMPLE + make && sudo make install + #+END_EXAMPLE + + To specify a different install location use the =DESTDIR= environment + variable, like: + #+BEGIN_EXAMPLE + make install DESTDIR=/usr/local/clark + #+END_EXAMPLE + + Otherwise it will install to ~/usr/local~ by default. diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..021b5f5 --- /dev/null +++ b/NEWS @@ -0,0 +1,40 @@ +# -*- mode: org; -*- +#+STARTUP: showall + +* v0.1.1 + + - Any errors that are caught will now exit with status code 1. This + makes it easier for other programs, like Conkeror, to determine + if an action was succesful. This does not yet happen if an + uncaught exception occurs. + + - Errors are now printed to ~stderr~ more consistently. + + - Fixed a bug that would cause an exception if the =XDG_DATA_HOME= or + =XDG_CONFIG_HOME= were not set. + + - Removed the McCLIM dependency. It will be back, but is not used + at the moment, so it should not be required. + + - Add ~NEWS~, ~CONTRIBUTING~, ~INSTALL~ and a ~js/README.org~. + + - Fixed a bug that would cause an infinite loop with unrecognized + command-line options. + +* Changes since Markam + + - Add command system. Instead of trying to figure out if we're + searching or adding a new URL from the arguments use =add= and + =search= commands. + + - Add =edit=, =exists=, =remove= and =set-tags= commands. + + - =help= will show a list of available commands and switches, and can + show a help message for each available command. + +** Conkeror interface + + - Add commands for the =edit=, =exists=, =remove= and =set-tags= commands. + + - Add indicator for the mode-line which shows whether or not the + current URL had been bookmarked in markam. diff --git a/README.org b/README.org index 2a365ea..39d2b23 100644 --- a/README.org +++ b/README.org @@ -18,20 +18,22 @@ #+TITLE: CLark #+STARTUP: showall -* Name +* NAME - clark - collect bookmarks on your command-line + CLark - collect bookmarks on your command-line -* Synopsis +* SYNOPSIS - =clark= [options] [ [ ...]] + =clark [...] [ [...] [...]]= -* Description +* DESCRIPTION - CLark is a bookmark collection application for the command-line. It - is a drag being dependant on your browser or an internet connection - to be able to collect, manage and look through your bookmarks, so - we're breaking free... slowly. + CLark is a bookmarking program for the command-line. It is meant to + interface with other programs to make its use easy, whilst remaining + free of being locked in to any single browser or program (except for + itself). This should allow you to keep your bookmarks in a single, + easily accessible, place regardles of which browser you use at any + moment. ** CLark?! What the ...? @@ -51,12 +53,12 @@ thing in Common Lisp! So I name it CLark, because it is Common Lisp, and a rewrite of mARKam. -* Options +* COMMANDS - - =--script= :: Change the output of some commands to be somewhat more - machine-friendly, making it easier to parse the data. - -* Commands + Each command has it's own arguments and description, to see: + #+BEGIN_EXAMPLE + clark help + #+END_EXAMPLE - =add= :: Add a new bookmark to the database. @@ -65,13 +67,20 @@ - =exists= :: Check if a bookmark is already present in the database. - =help= :: Prints a usage and help message, showing a list of - possible commands and some hints on how to use them. + possible commands and some hints on how to use them. Can + also show help messages for individual commands. - =remove= :: Remove a bookmark from the database. - - =search= :: Search through the database looking for a partial match - on its name or an exact-matching tag. + - =search= :: Search through bookmarks for a certain title or tag. - =set-tags= :: Replace or remove a bookmark's tags. - - =version= :: Prints the CLark version and then quits. + - =version= :: Print CLark's version. + +* OPTIONS + + Command-line options can be passed to CLark with either =-= or =--=. + + - =script= :: Change the output of some commands to be somewhat more + machine-friently, making it easier to parse the data. diff --git a/js/README.org b/js/README.org new file mode 100644 index 0000000..c10acaa --- /dev/null +++ b/js/README.org @@ -0,0 +1,100 @@ +# Copyright (C) 2013 Tom Willemsen +# +# This file is part of CLark +# +# CLark is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# CLark is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with CLark. If not, see . + +#+TITLE: Conkeror +#+STARTUP: showall + +[[http://conkeror.org][Conkeror]] is an awesome xulrunner-based web browser with Emacs-like +functionality. It is easily extended and if you like Emacs, a +pleasure to use. It does not seem to have great bookmark management +capabilities, unless you use firefox's bookmarking tools. This is one +of the reasons CLark was written. + +* Set-up + + To use the CLark Conkeror module you need to put its location in + Conkeror's load path, afterwards you should load or require it. So + in your ~.conkerorrc~ you should put: + #+BEGIN_EXAMPLE + load_paths.push("file:///path/to/clark/js/"); + require("clark"); + #+END_EXAMPLE + + If you don't have the CLark executable in your path you should set + the =clark_program= user variable to the location of the CLark + executable: + #+BEGIN_EXAMPLE + clark_program = "/path/to/clark"; + #+END_EXAMPLE + + Once that is done you kan either bind the available functions to + the keys you like, or you could bind =clark_keymap= to a key, for + example: + #+BEGIN_EXAMPLE + define_key(content_buffer_normal_keymap, "b", clark_keymap); + #+END_EXAMPLE + + If you would like to see whether or not you've bookmarked the + current URL, you could add the =clark_bookmarked_widget= to your + Conkeror mode-line: + #+BEGIN_EXAMPLE + add_hook("mode_line_hook", mode_line_adder(clark_bookmarked_widget), true); + #+END_EXAMPLE + + If you don't like the way the =clark_bookmarked_widget= shows you + whether or not the current URL has been bookmarked, you can + customize these by setting either or both of the variables + =clark_bookmarked_string= and =clark_not_bookmarked_string=. + +* Usage + + The Conkeror module is written to mirror the functionality found in + CLark, here's a list of its commands: + + - =clark-exists-p= :: Prints an indication of whether or not the + current URL has been bookmarked. Uses the same + command the =clark_bookmarked_widget= does, only + requires the user to explicitly call it. + + - =clark-add= :: Add the curren URL to CLark. Asks for a title, + description and any tags you wish to assign it. + + - =clark-add-link= :: Does the same thing =clark-add= does, except it + also asks which link found on the current page + to bookmark, instead of using the current URL. + + - =clark-edit= :: Edit the current URL's data. Asks for a name and a + description, if either one is left empty, it is not + sent to CLark and thus not changed. + + - =clark-find-url= :: Calls =find-url= with completions gathered from + CLark. Uses the =search= command, so any text + typed into the minibuffer gets matched as a + substring of a bookmark's title, or a tag. + + - =clark-find-url-new-buffer= :: Does thee same thing =clark-find-url= + does, except it opens the URL in a new buffer, instead of the + current buffer. + + - =clark-remove= :: Removes the current URL from CLark. + + - =clark-set-tags= :: Replace or remove the tags for the current url's + bookmark. If any tags are given they replace the + bookmark's old tags, if the field is left empty, + all tags are removed. + + All of these are included in the =clark_keymap=. diff --git a/site/.gitignore b/site/.gitignore new file mode 100644 index 0000000..7523547 --- /dev/null +++ b/site/.gitignore @@ -0,0 +1 @@ +_publish/ diff --git a/site/Makefile b/site/Makefile new file mode 100644 index 0000000..3ccaf3c --- /dev/null +++ b/site/Makefile @@ -0,0 +1,9 @@ +.PHONY: export publish + +all: + +export: + emacs -batch -l project.el -f org-publish-all + +publish: export + scp _publish/* ryuslash.org:public_html/orgweb/projects/clark diff --git a/site/index.org b/site/index.org new file mode 100644 index 0000000..82a03c1 --- /dev/null +++ b/site/index.org @@ -0,0 +1,35 @@ +#+TITLE: CLark +#+LINK_HOME: http://ryuslash.org/ +#+OPTIONS: num:nil toc:nil author:nil +#+STARTUP: showall +#+STYLE: +#+MACRO: ver 0.1.1 + +#+BEGIN_CENTER +[[http://code.ryuslash.org/cgit.cgi/clark/][Browse source]] +[[http://blog.ryuslash.org/tags/clark][Read posts]] +Download: [[http://code.ryuslash.org/cgit.cgi/clark/snapshot/clark-{{{ver}}}.tar.gz][TAR.GZ]], [[http://code.ryuslash.org/cgit.cgi/clark/snapshot/clark-{{{ver}}}.zip][ZIP]] +#+END_CENTER + +#+INCLUDE: "../README.org" + +* INTEGRATION + + CLark is mean to be used by other tools (as well as you on the + command-line). + +** Conkeror + +#+INCLUDE: "../js/README.org" :minlevel 3 + +* INSTALLING + +#+INCLUDE: "../INSTALL" :minlevel 2 + +* CONTRIBUTING + +#+INCLUDE: "../CONTRIBUTING" :minlevel 2 + +* NEWS + +#+INCLUDE: "../NEWS" :minlevel 2 diff --git a/site/project.el b/site/project.el new file mode 100644 index 0000000..1c17ebc --- /dev/null +++ b/site/project.el @@ -0,0 +1,17 @@ +(require 'org-publish) + +(setq org-publish-project-alist + '(("clark-files" + :base-directory "./" + :publishing-directory "_publish/" + :recursive nil + :base-extension "css" + :publishing-function org-publish-attachment) + ("clark-org" + :base-directory "./" + :publishing-directory "_publish/" + :recursive nil + :base-extension "org" + :publishing-function org-publish-org-to-html) + ("clark-site" + :components ("clark-org" "clark-files")))) diff --git a/site/stylesheet.css b/site/stylesheet.css new file mode 100644 index 0000000..b661f7f --- /dev/null +++ b/site/stylesheet.css @@ -0,0 +1,68 @@ +a +{ + color: #6d97bf; +} + +a:visited +{ + color: #b27dbf; +} + +body +{ + font-family: "DejaVu Sans", sans-serif; + background-color: #222224; + color: #eeeeec; +} + +code, +pre +{ + font-family: "Envy Code R", monospace; +} + +h3, h4, +.outline-text-2, +.outline-text-3, +.outline-text-4 +{ + margin-left: 20px; +} + +pre +{ + background-color: #111113; + color: #eeeeec; + border: 1px solid #a5a5a4; + border-radius: 2px; +} + +ul +{ + margin-left: -20px; +} + +#content +{ + width: 700px; +} + +#org-div-home-and-up +{ + width: 750px; +} + +#postamble +{ + font-size: 12px; + padding: 3px 5px; + border: 1px solid #a5a5a4; + width: 690px; +} + +#postamble p +{ + margin: 0; + padding: 0; + line-height: 1.3em; +}