Add site and some complementary files
This commit is contained in:
parent
ff09103c05
commit
504949ebc6
10 changed files with 370 additions and 18 deletions
25
CONTRIBUTING
Normal file
25
CONTRIBUTING
Normal file
|
@ -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.
|
48
INSTALL
Normal file
48
INSTALL
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# -*- mode: org; -*-
|
||||||
|
# Copyright (C) 2013 Tom Willemsen <tom at ryuslash dot org>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#+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.
|
40
NEWS
Normal file
40
NEWS
Normal file
|
@ -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.
|
45
README.org
45
README.org
|
@ -18,20 +18,22 @@
|
||||||
#+TITLE: CLark
|
#+TITLE: CLark
|
||||||
#+STARTUP: showall
|
#+STARTUP: showall
|
||||||
|
|
||||||
* Name
|
* NAME
|
||||||
|
|
||||||
clark - collect bookmarks on your command-line
|
CLark - collect bookmarks on your command-line
|
||||||
|
|
||||||
* Synopsis
|
* SYNOPSIS
|
||||||
|
|
||||||
=clark= [options] [<command> [<options> ...]]
|
=clark [<options>...] [<command> [<options>...] [<arguments>...]]=
|
||||||
|
|
||||||
* Description
|
* DESCRIPTION
|
||||||
|
|
||||||
CLark is a bookmark collection application for the command-line. It
|
CLark is a bookmarking program for the command-line. It is meant to
|
||||||
is a drag being dependant on your browser or an internet connection
|
interface with other programs to make its use easy, whilst remaining
|
||||||
to be able to collect, manage and look through your bookmarks, so
|
free of being locked in to any single browser or program (except for
|
||||||
we're breaking free... slowly.
|
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 ...?
|
** CLark?! What the ...?
|
||||||
|
|
||||||
|
@ -51,12 +53,12 @@
|
||||||
thing in Common Lisp! So I name it CLark, because it is Common
|
thing in Common Lisp! So I name it CLark, because it is Common
|
||||||
Lisp, and a rewrite of mARKam.
|
Lisp, and a rewrite of mARKam.
|
||||||
|
|
||||||
* Options
|
* COMMANDS
|
||||||
|
|
||||||
- =--script= :: Change the output of some commands to be somewhat more
|
Each command has it's own arguments and description, to see:
|
||||||
machine-friendly, making it easier to parse the data.
|
#+BEGIN_EXAMPLE
|
||||||
|
clark help <command>
|
||||||
* Commands
|
#+END_EXAMPLE
|
||||||
|
|
||||||
- =add= :: Add a new bookmark to the database.
|
- =add= :: Add a new bookmark to the database.
|
||||||
|
|
||||||
|
@ -65,13 +67,20 @@
|
||||||
- =exists= :: Check if a bookmark is already present in the database.
|
- =exists= :: Check if a bookmark is already present in the database.
|
||||||
|
|
||||||
- =help= :: Prints a usage and help message, showing a list of
|
- =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.
|
- =remove= :: Remove a bookmark from the database.
|
||||||
|
|
||||||
- =search= :: Search through the database looking for a partial match
|
- =search= :: Search through bookmarks for a certain title or tag.
|
||||||
on its name or an exact-matching tag.
|
|
||||||
|
|
||||||
- =set-tags= :: Replace or remove a bookmark's tags.
|
- =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.
|
||||||
|
|
100
js/README.org
Normal file
100
js/README.org
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
# Copyright (C) 2013 Tom Willemsen <tom at ryuslash dot org>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#+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=.
|
1
site/.gitignore
vendored
Normal file
1
site/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
_publish/
|
9
site/Makefile
Normal file
9
site/Makefile
Normal file
|
@ -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
|
35
site/index.org
Normal file
35
site/index.org
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#+TITLE: CLark
|
||||||
|
#+LINK_HOME: http://ryuslash.org/
|
||||||
|
#+OPTIONS: num:nil toc:nil author:nil
|
||||||
|
#+STARTUP: showall
|
||||||
|
#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||||
|
#+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
|
17
site/project.el
Normal file
17
site/project.el
Normal file
|
@ -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"))))
|
68
site/stylesheet.css
Normal file
68
site/stylesheet.css
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in a new issue