Last change
on this file since 15 was
9,
checked in by peter, 13 years ago
|
- use SQL::Interp to generate the SQL for Bookmarks::get_resources()
- Bookmarks::get_resources() accepts a limit parameter to add a limit to the SQL query
- added a feed run mode that returns an Atom feed of the most recent 12 bookmarks; can have an optional ?tag parameter that only looks for bookmarks with that tag
- added an explicit "list" dispatch target that calls the `list run mode
|
-
Property svn:executable set to
*
|
File size:
703 bytes
|
Rev | Line | |
---|
[2] | 1 | #!/usr/bin/perl -w |
---|
| 2 | use strict; |
---|
| 3 | |
---|
| 4 | # bookmarklet to add a bookmark via the browser |
---|
| 5 | # javascript:(function(){window.open("http://grim.ath.cx/~peter/bookmarks?uri="+document.location+"&title="+document.title,"edit_bookmark","width=800,height=250")})() |
---|
| 6 | |
---|
[5] | 7 | use CGI::Application::Dispatch; |
---|
| 8 | CGI::Application::Dispatch->dispatch( |
---|
| 9 | table => [ |
---|
| 10 | '[get]' => { app => 'BookmarkApp', rm => 'list' }, |
---|
[9] | 11 | 'list[get]' => { app => 'BookmarkApp', rm => 'list' }, |
---|
| 12 | 'feed[get]' => { app => 'BookmarkApp', rm => 'feed' }, |
---|
[5] | 13 | ':id/:field?[get]' => { app => 'BookmarkApp', rm => 'view' }, |
---|
| 14 | ':id?[post]' => { app => 'BookmarkApp', rm => 'edit' }, |
---|
| 15 | ], |
---|
[2] | 16 | ); |
---|
Note: See
TracBrowser
for help on using the repository browser.