Commit graph

42 commits

Author SHA1 Message Date
acc01decbe Change *help-messages* to parameter
When testing in the REPL and reloading the package, using a `defvar'
causes it to collect the names and help messages for commands more than
once. With `defparameter' this variable is reset every time the package
is loaded.
2013-10-06 14:35:50 +02:00
b6716954f2 Export commands 2013-10-06 14:35:39 +02:00
97d631db55 Change that crazy name
Practical Common Lisp suggested that most Lisp projects used Java-like
naming schemes. I have not seen this happen in the real world so much.
2013-10-06 14:30:15 +02:00
31f1be23f2 Fix compilation errors 2013-10-06 13:47:31 +02:00
b7d4fe7c21 Allow CLark to be used from the lisp REPL 2013-10-06 13:47:20 +02:00
b4769c70c4 Move command definitions to separate file
Hoping to keep the clark source file clean.
2013-10-06 02:29:23 +02:00
df47a68535 Add remove-tags command
This command removes the given tags (or all if none are specified) from
a bookmark's tag list.
2013-07-02 22:30:46 +02:00
6121891396 Check bookmark doesn't exist before inserting
The `add' command checks if the given url has been registered before and
if so will print a message about this.
2013-06-12 23:22:22 +02:00
6f5171c1ca Allow LISP to be specified on the outside
I don't think it's wise to force everyone to use system-wide lisp
libraries by specifying `--no-userinit' here, but my pkgbuilds need it.
2013-06-06 22:57:05 +02:00
2ddf0ce51c Use parameter instead of constant for version
The `defconstant' form generates an error when compiling, that the value
is not `eq' to the previous value.
2013-06-04 01:16:30 +02:00
7fd20d720d Move most queries to queries.lisp 2013-06-04 01:12:38 +02:00
9e6199a5aa Add random command
This command simply prints a random URL. A tag may be specified to limit
the search to that tag. In the Conkeror module this command immediately
loads the random bookmark in the current buffer.

- js/clark.js: If `error' is empty, return the value of `data'. This
  makes it easier for some commands to use the result of the command.
  Add `clark-random' to `clark_keymap'.
2013-06-04 01:12:13 +02:00
0ab12f6f71 Bump version to v0.1.1 2013-04-07 03:53:07 +02:00
54baffa58e Rename *version* to version
Since `*version*' is a constant, it should not be named as a special
variable.
2013-04-07 03:24:08 +02:00
86aa545775 Remove McCLIM as dependency and properly require
The McCLIM dependency will come back, but for v0.1.* it is not a
requirement.

Also properly require `cl-sqlite' by adding it in the `asdf:defsystem'
call.
2013-04-07 03:23:19 +02:00
c1cbf7d59a Exit with status 1 on error
Add macros `with-error-status' and `with-error-and-help' that help to
easily report errors to the user. The latter also calls the `help'
command.

All commands, when done, exit with `*exit-status*' being the status
code used. The `with-error-status' macro let-binds this variable so
that the command function exits with the given status code.
2013-04-06 17:24:05 +02:00
ce8cfd58f4 Fix usage without XDG_*_HOME
`concatenate' does not work as I thought, cannot handle list
arguments, except `nil'.
2013-04-06 15:39:47 +02:00
8cad2d8582 Eval make-command-name during execute
So that it also works when loaded from some other place.
2013-04-06 14:58:58 +02:00
85868d6dcf Move the export to package definition
That's where it belongs.
2013-04-06 14:43:31 +02:00
c442bbfe95 Add sql macro
This gives SQL queries a little more Lisp-y feel and allows for better
formatting of the code written.
2013-03-30 15:46:54 +01:00
933a51ed70 Change order of script output
The order of parameters for `--script' and without it was different,
to keep things simple these should be the same.
2013-03-28 00:52:48 +01:00
dfd6f71c4d Clarify defcommand
Writing a command like with a normal labmda-list to indicate
parameters is much clearer than using an `args' parameter that
semmingly comes out of nowhere.
2013-03-28 00:39:29 +01:00
703f8f7782 Bump version in system, 0.0.1 is very low... 2013-03-27 21:39:35 +01:00
ac7d882292 Print to *error-output* when an error occurs 2013-03-27 21:38:15 +01:00
30acc48afd Load an init file at startup
With this init file one can change certain defaults, and define their
own commands.
2013-03-24 21:57:59 +01:00
eabe0f3978 Update the help messages to include the option
The `--script' option was not yet documented in the help message.
2013-03-23 20:58:00 +01:00
9d5973a022 Simplify usage of call-command 2013-03-23 20:57:13 +01:00
e41bb3a930 Add remove command
Removes a bookmark from the database.
2013-03-23 20:52:49 +01:00
280769a222 Add set-tags command
The set-tags command clears any tags for the bookmark, and then adds
the ones given.
2013-03-23 20:46:19 +01:00
e94a9ac013 Add edit command
Allows one to edit the name and description of a bookmark.
2013-03-23 19:25:28 +01:00
d1eb7d4c37 Check argument numbers for each command
This should keep error conditions from being signalled when someone
enters the wrong number of arguments.
2013-03-23 18:40:54 +01:00
3b165c81d9 Add --script option
When passing in the --script option all output will be formatted in a
machine-readable way.
2013-03-23 17:58:31 +01:00
50bb0f58ea Simplify get-bookmarks 2013-03-23 17:57:35 +01:00
2a37c88b34 Fix typo 2013-03-23 16:53:08 +01:00
977627a8af Simplify the exists command 2013-03-23 16:50:18 +01:00
fdce2ed81c Hide command detail
Hide the fact that a command is just of the form NAME-command by
abstracting it away into a macro.
2013-03-23 16:37:41 +01:00
c7f9d27638 Improve help messages
The `help' command can now be used to view help about other commands.
2013-03-23 16:31:22 +01:00
cbe1830f83 Add exists command
This command shows whether or not the given url is known to CLark.
2013-03-23 13:38:19 +01:00
dd47751a43 Place the database in XDG_DATA_HOME if possible 2013-03-23 13:24:43 +01:00
9e747fde54 Add some Makefile targets 2013-03-23 01:05:05 +01:00
0b3e5c09d3 Add GPLv3 license info 2013-03-23 00:51:31 +01:00
02be3af2fd Move lisp sources to lisp/ 2013-03-23 00:15:52 +01:00