1
0
Fork 0
Commit graph

134 commits

Author SHA1 Message Date
a2c76e586e Reverse tag page posts order
So the newest post comes out on top.
2013-04-03 03:36:19 +02:00
ea8c3a5642 Make tag page look more like index
Blurr the distinction between the index page and a tag page so that
tag pages may be used as stand-alone pages.
2013-04-03 03:16:02 +02:00
Andy Wingo
a08ae0c9a7 make urlish? less -ish
* tekuti/util.scm (urlish?): Use string->uri.
2012-06-03 23:49:14 +02:00
Andy Wingo
085b4c76ef faster git-rev-parse
* tekuti/git.scm (git-rev-parse): Try to read the ref ourselves, first.
  Fall back to using git if that doesn't work (for example, if it's a
  packed ref).
2012-02-15 22:31:54 +01:00
Andy Wingo
8034123827 no sxml, no body
* tekuti/page-helpers.scm (respond): Give no body if there is no SXML.
  Fixes perhaps spurious errors raised by Guile's web server.
2012-02-14 17:29:08 +01:00
Andy Wingo
82c7790016 remove trailing whitespace 2012-02-12 20:48:50 +01:00
Andy Wingo
29a6144123 handle HEAD requests (requires Guile from today)
* tekuti/request.scm (request-path-case): Dispatch HEAD requests as GET
  requests, relying on new Guile web servers to elide the HEAD body.
2012-02-12 13:46:22 +01:00
Andy Wingo
afec0daa99 stop hitting git when fetching post metadata
Inspired by a patch from Aleix Conchillo Flaqué.  Thanks, Aleix!

* tekuti/index.scm (index-specs):
* tekuti/post.scm (reindex-posts, reindex-posts-by-date): Change to have
  the "posts" index be a hash table mapping key -> post.
  "posts-by-date" is a list of keys, from newest to oldest.
  (post-from-git): This is what post-from-key was.
  (post-from-key): New function, pulls out a post from the posts hash
  table.
  (munge-post): Use post-from-git.
  (delete-post): Take the post directly.
  (latest-posts): New awesome helper for fetching the lastest N posts
  that match some predicates.

* tekuti/page-helpers.scm (find-posts-matching): Adapt to post-from-key
  change.
  (published-posts): Remove, replaced with latest-posts.

* tekuti/page.scm (page-admin, page-admin-posts, page-admin-post)
  (page-archives, page-feed-atom): Use the new latest-posts helper.
  (page-admin-delete-post, page-admin-delete-comment, page-show-post)
  (page-new-comment, page-show-tag): Adapt to post-from-key change.

* tekuti/tags.scm (compute-related-posts, compute-related-tags): Adapt
  to post-from-key change.
  (reindex-tags): Use latest-posts.
2012-02-11 18:54:51 +01:00
Andy Wingo
f89e4b128b better errors when reindexing
* tekuti/index.scm (maybe-reindex): Reindex within a
  call-with-error-handling.
2012-02-11 18:38:21 +01:00
Andy Wingo
7a1944b240 per-tag feed links
* tekuti/page.scm (page-show-tag): Add a feed link here.
2011-04-26 15:39:06 +02:00
Andy Wingo
62a351d8d5 optimization for with=foo
* tekuti/page.scm (page-feed-atom): Reduce "with=unknown" to nothing.
2011-04-26 15:12:05 +02:00
Andy Wingo
cee672f117 multiple with query args add tags to the set
* tekuti/page.scm (page-feed-atom): Reimplement more clearly, and give
  "with" inclusionary meaning.
2011-04-25 20:30:57 +02:00
Andy Wingo
08e1e58f1f add ?with=guile&without=gnu
* tekuti/page.scm (page-feed-atom): Reimplement Brian's thing with
  "with" and "without" query args, to allow for multiple tags to be
  included or excluded.

* tekuti/request.scm (request-query-ref-all): New helper.
2011-04-25 20:06:11 +02:00
Andy Wingo
26216a593a with-i/o procedures close their ports
* tekuti/util.scm (with-output-to-string*, with-input-from-string*): New
  hacky helpers, which close the port before returning the string or
  result.  Hopefully reduce pressure on the GC.
  (shell:quote):
* tekuti/git.scm (git-commit-reverse-operations, with-output-to-blob*)
  (with-input-from-blob*):
* tekuti/filters.scm (wordpress->sxml): Use the string* procedures.
2011-04-25 19:10:07 +02:00
Brian Gough
a4bad7a561 add atom feeds for tags 2011-04-25 19:05:49 +02:00
Andy Wingo
efc25df8f4 don't bother allocating iconv info on pipe
* tekuti/git.scm (run): Don't set encoding on pipe, as we just use
  bytevector io anyway.
2011-02-22 23:52:11 +01:00
Andy Wingo
a05d9a5df8 use ice-9 binary-ports
* tekuti/git.scm:
* tekuti/request.scm: Use ice-9 binary-ports instead of (rnrs io
  ports).
2011-02-22 22:21:30 +01:00
Andy Wingo
1636c96f9f remove obsolete (tekuti url)
* tekuti/url.scm: Remove.
* Makefile.am: Remove url.scm

* tekuti/post.scm: Remove reference to (tekuti url).
  (parse-post-data): Use uri-encode.
2011-02-22 22:19:30 +01:00
Aleix Conchillo Flaque
800e7d9a05 do not remove numbers and s/./-/ in post keys 2011-02-18 23:36:10 +01:00
Andy Wingo
fce14fbddf s/unparse-uri/uri->string/ 2011-02-18 23:34:57 +01:00
Aleix Conchillo Flaque
2a87435f81 fixes due to (web http) updates 2011-02-18 23:34:27 +01:00
Andy Wingo
a357b2a0dc support for deleting post comments 2011-02-18 23:34:17 +01:00
Andy Wingo
9ec70ebff5 add support for deleting posts 2011-02-18 23:31:42 +01:00
Aleix Conchillo Flaque
66e04753f6 wordpress-xmlrpc: added usage help 2011-02-18 23:28:46 +01:00
Aleix Conchillo Flaque
cffa7dea90 wordpress-xmlrpc: more youtube/googlevideo updates 2011-02-18 23:27:50 +01:00
Aleix Conchillo Flaque
612577eca9 inform the user of malformed xhtml internal error when publishing 2011-02-18 23:27:45 +01:00
Aleix Conchillo Flaque
0dee43b2a0 wordpress-xmlrpc: use video.google.com instead of .es 2011-02-18 23:26:18 +01:00
Aleix Conchillo Flaque
199ad57615 wordpress-xmlrpc: fix googlevideo and youtube urls 2011-02-18 23:26:13 +01:00
Aleix Conchillo Flaque
606ecad873 wordpress-xmlrpc: fix media html tags (again) 2011-02-18 23:26:09 +01:00
Aleix Conchillo Flaque
2da5248073 wordpress-xmlrpc: fix media html tags 2011-02-18 23:26:05 +01:00
Aleix Conchillo Flaque
280696ea06 wordpress-xmlrpc: added support for wp media tags youtube/googlevideo 2011-02-18 23:25:59 +01:00
Aleix Conchillo Flaque
736a074097 wordpress-xmlrpc: download unlimited comments 2011-02-18 23:25:43 +01:00
Aleix Conchillo Flaque
fc07af26f6 wordpress-xmlrpc: use str type for pycurl urls 2011-02-18 23:23:06 +01:00
Aleix Conchillo Flaque
93789f0d07 add head link tag for atom feed 2011-02-18 23:22:46 +01:00
Aleix Conchillo Flaque
bf90b687e0 added wordpress (xmlprc) to tekuti script 2011-02-18 23:22:11 +01:00
Andy Wingo
f350e252fc mod-lisp updates
* tekuti/mod-lisp.scm: update tekuti/mod-lisp to parse headers to
  symbols, and to deal in bytevectors only.
2011-02-18 23:20:26 +01:00
Andy Wingo
bed9fff79d request-form-data smarter about character encodings
* tekuti/request.scm (request-form-data): Allow the body to be a
  bytevector. Update to new uri interface, and allow alternate
  encodings.
2010-12-11 19:18:13 +01:00
Andy Wingo
98cac18528 mod-lisp calls setvbuf only once
* tekuti/mod-lisp.scm (mod-lisp-read): Like the http impl, just setvbuf
  once, and don't throw away data (!).
2010-12-06 20:01:43 +01:00
Andy Wingo
68966d9e17 fix time comparisons
* tekuti/cache.scm (make-entry): Fix time comparisons.
2010-12-06 13:06:50 +01:00
Andy Wingo
8f2e3b741c more etag
* tekuti/page.scm (page-feed-atom): Also set etag on 304 responses
  here.
2010-12-06 13:04:24 +01:00
Andy Wingo
839d2e27eb cache returns 304 as appropriate; more pages set etags
* tekuti/cache.scm (update-cache): Expand cache size back to 20.
  (cached-response-and-body, make-entry): Entries are now procedures
  that return the cached pair. They also have some more smarts regarding
  etags, last-modified, and conditional requests.

* tekuti/page-helpers.scm (respond): Add etag arg. Set a date.

* tekuti/page.scm: Set etags on a number of pages.
2010-12-06 13:00:53 +01:00
Andy Wingo
15f024a12d robustness in mod-lisp-read
* tekuti/mod-lisp.scm (mod-lisp-read): Close the port if there is an
  error reading the request.
2010-12-06 11:37:47 +01:00
Andy Wingo
fc386dcb71 fix caching
* tekuti/cache.scm: Update with more structure. Use take-max, not
  list-head. Only cache cacheable request-response pairs.

* tekuti/index.scm: Add cache as index entry. Also return the index ref
  within the index itself, instead of at the head.

* tekuti/web.scm: Don't pass cache around, it's part of the index
  now. Adapt to new API.
2010-12-05 20:23:01 +01:00
Andy Wingo
aa86b62d79 simpler caching algorithm
* tekuti/cache.scm: Simpler LRU algorithm for the cache. Conses more,
  but throws away the cache less.
2010-12-04 20:08:16 +01:00
Andy Wingo
bc53abe0b6 mod-lisp sets client sockets to iso-8859-1
* tekuti/mod-lisp.scm (read-request/mod-lisp): Set port's encoding to
  latin-1, so that we reading one char reads one byte.
2010-12-04 13:15:47 +01:00
Andy Wingo
83a569885a use the simple cache
* tekuti/web.scm: Use the cache.
2010-12-03 19:59:45 +01:00
Andy Wingo
c099b9532c add a simple cache
* tekuti/cache.scm: Add a simple cache.
2010-12-03 19:59:32 +01:00
Andy Wingo
55617ccff2 tekuti git uses get-bytevector-all
* tekuti/git.scm (run): Use get-bytevector-all instead of
  read-delimited.
2010-12-03 19:59:15 +01:00
Andy Wingo
5900823c3e update mod-lisp web server impl
* tekuti/mod-lisp.scm: Update to use the poll set, do the right thing
  for SIGPIPE, etc, following http.scm. Maybe now it will actually be
  reliable.
2010-12-03 17:00:10 +01:00
Andy Wingo
a8ad41b06d src/tekuti is a shell script
* src/tekuti: Change to be a shell script.
2010-11-24 21:37:27 +01:00