Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fsemulation: by-tags: sort tagsHEADmasterSascha Silbe2014-06-231-1/+1
| | | | | | Present the tags listing (i.e. the entries of the by-tags directory) in alphanumerical sort order to make it easier for the user to locate a particular tag they're looking for.
* Fix search result pagesSascha Silbe2014-05-221-0/+2
| | | | | | The previous commit forgot to calculate details URLs on search result pages, so an undefined local variable caused the search result pages to break.
* journal2webdav: add details page in HTML viewSascha Silbe2014-05-151-12/+64
| | | | | | | In addition to the download link, we now provide a separate "details" page for each data store object. It shows a highlighted list of user-configurable "important" properties as well as a list of all other properties.
* fsemulation: make nesting level publicSascha Silbe2014-05-151-6/+7
| | | | | | | For some use cases, the API consumer needs to build paths relative to an emulated file system object. Make the nesting level we already keep internally public so the caller can construct relative paths to the root.
* fsemulation: add TODOSascha Silbe2013-11-161-0/+3
|
* fsemulation: guard all data store accesses with lockSascha Silbe2013-11-161-0/+30
| | | | | | | | Despite having internal locking, python-dbus / libdbus apparently isn't thread-safe. All current data store implementations are single-threaded anyway, so just guard all data store accesses (which happen via D-Bus) with a (single) lock to prevent multiple D-Bus calls being invoked in parallel.
* fsemulation: replace sugar-base dependency by python-xdgSascha Silbe2013-11-161-8/+38
| | | | | Use xdg.Mime and xdg.BaseDirectory instead of sugar.mime so we don't depend on sugar-base.
* Add search supportSascha Silbe2013-08-121-7/+79
| | | | | | | | | | | | | Add a simple search field accepting Xapian queries. The actual search is done by fsemulation in SearchResultDirectory which will merge the user-provided query with the root query securely. The SearchResultDirectory doesn't persist across queries and PyWebDAV doesn't allow us to add custom response headers to relay the object title as filename. In order to provide a user-friendly name to the browser for saving the file and yet identify the entry uniquely, we encode both the title and the object id in the URL for each search result.
* check Xapian query for imbalanced parenthesesSascha Silbe2013-08-121-0/+23
| | | | | | | | | | | | When merging the root query with a user-provided Xapian query, special care must be taken. Asymmetric parentheses inside the user-provided query can close outer parenthesis used for logically combining the two queries, while still resulting in a valid query overall. Explicitly check that the parenthesis are well-balanced inside the user-provided query before using it. This is a security fix, but as the search functionality isn't exposed in journal2webdav so far there's no impact for any user.
* Add HTTPS supportSascha Silbe2013-08-121-3/+35
| | | | | Add optional HTTPS support, including client certificate support. Configured using command line options.
* remove dead codeSascha Silbe2013-08-121-6/+0
|
* Add a few pychecker hintsSascha Silbe2013-08-121-0/+8
| | | | | | Squelch pychecker warnings by adding explicit hints. Some are for issues in code we copied from PyWebDAV, others are for cases where pychecker isn't smart enough.
* Fix a few style issues noticed by pycheckerSascha Silbe2013-08-121-18/+31
|
* ObjectListHtmlResource: factor out BufferResource from, add footer supportSascha Silbe2013-06-221-11/+24
| | | | | | Factor out a generic BufferResource from ObjectListHtmlResource and add support for including a footer in the HTML (to be used by search support later).
* Fix compatibility with HTTP/1.1 browsersSascha Silbe2013-06-221-0/+2
| | | | | PyWebDAV internally makes some assumptions that are only true if we're an HTTP/1.1 server. So just turn us into one; it shouldn't hurt.
* journal2webdav: catch errors for invalid object idsSascha Silbe2013-06-221-1/+1
| | | | | | If the object id is invalid (i.e. the data store object doesn't exist at all or isn't exported), fsemulation will raise a ValueError rather than IOError.
* fsemulation: add support for "search" directoriesSascha Silbe2013-06-221-3/+13
| | | | | | | | | | Add support for exporting arbitrary search results as a directory. The directory can be requested using the new API FSEmulation.search() and will expect to live directly below the root directory (for symlinking purposes). Like with all other directories, the root query will be taken into account.
* fsemulation: don't try to duplicate data store / Xapian matchingSascha Silbe2013-06-221-12/+21
| | | | | | | | | | | | | | | _matches_root_query() was meant to verify that a requested entity has actually been exported by the user (using root_query). But in order to do that, a lot of the matching functionality in the data store (usually implemented using Xapian) would have to be duplicated for any except the most basic export selections to work. E.g. exporting based on tags needs to work on parts (words) of a single value, rather than an exact match on the full string. Instead, let the data store do the verification by using its searching API even if we already know the object id. There's some performance impact to this, but it's not clear a reasonably functional _matches_root_query() would be much faster.
* Fix typo in commentSascha Silbe2013-06-181-1/+1
|
* Add another pywebdav work-around, fix up one work-aroundSascha Silbe2013-06-011-98/+200
| | | | | | | | | | | | | | | Add a work-around for compatibility with HTTP/1.0 clients that don't have persistent connections support and expect the connection to be closed by the server. Fix up the work-around for the <allprops/> response with depth!=0. It was returning 404 for properties that are on _some_ resource, but not the current one. Make the work-arounds conditional, so we can deactivate them for upstream versions that have the bugs fixed already. Otherwise we risk breaking with future upstream versions that change implementation details.
* Add support for pywebdav 0.9.8+Sascha Silbe2013-06-011-17/+31
| | | | | | | | | | | pywebdav was restructed in 0.9.8. Try the new names first and fall back to the old ones. Also adjust a few places where compatibility was broken by upstream without notice. While we try to retain compatibility with previous versions of pywebdav, this was only tested with pywebdav 0.9.8.
* fsemulation: set ctime / mtime on object symlinks according to objectSascha Silbe2013-06-011-30/+65
| | | | | | Setting ctime and mtime on object symlinks to the values of the object itself enables sorting directories of symlinks (e.g. by-title) by time.
* Don't advertise standard WebDAV properties we don't supportSascha Silbe2012-04-031-2/+7
| | | | | | | Override the PROPS dictionary from dav_interface to remove the properties that we don't support because they're not applicable or impossible to determine. This fixes 404 Not Found errors being returned for a proper request from a client.
* Resurrect HTML output for directory listingsSascha Silbe2012-04-031-24/+34
| | | | | Output (rather minimal) HTML listings for directories if they're accessed via GET. This allows regular web browsers to browse a journal2webdav server.
* README.creole: fix WebDAV URLsSascha Silbe2012-04-031-2/+2
|
* add a README explaining how to install and run journal2webdavSascha Silbe2012-04-031-0/+99
| | | | | | It's in WikiCreole [1] format. [1] http://wikicreole.org/
* add setup.pySascha Silbe2012-04-032-0/+31
| | | | Add a standard interface for easy installation of journal2webdav.
* add CLI for host, port, root query and verbositySascha Silbe2012-04-031-18/+41
| | | | | Previously the user had to hack journal2webdav.py to adjust these, making updates more cumbersome than necessary.
* fsemulation: add support for root querySascha Silbe2012-04-031-20/+44
| | | | | The root query is used to restrict the file system view to a certain subset of the data store.
* Merge remote-tracking branch 'datastore-fuse/master'Sascha Silbe2012-01-051-18/+168
|\ | | | | | | | | | | * datastore-fuse/master: (2 commits) fsemulation: add support for by-tags fsemulation: Fix '.' and '..' directory entries
| * fsemulation: add support for by-tagsSascha Silbe2012-01-051-8/+138
| | | | | | | | | | Add (resp. bring back, in the case of datastore-fuse) support for listing data store entries by tag (still just a single tag, not recursive).
| * fsemulation: Fix '.' and '..' directory entriesSascha Silbe2012-01-051-10/+30
| | | | | | | | | | | | When using generators, we can't simply call the parent method. Instead we need to iterate over the iterator it returns and yield each entry individually.
| * Refactor to use fsemulation.py (from journal2webdav)Sascha Silbe2012-01-052-216/+969
| | | | | | | | | | | | | | | | | | | | | | While FSEmulation does not support by-tags yet (a regression from current datastore-fuse functionality), both projects will be easier to maintain once they share a common implementation (with sufficiently abstract API) of the file system emulation "glue code". As the overhead of moving fsemulation.py to a new package is rather high, the file will be carried by both projects for now and merged manually whenever it makes sense (potentially on every commit).
| * Don't pass unicode strings to FUSESascha Silbe2011-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | FUSE doesn't like getting passed unicode strings; it does strange things like ignoring readdir() results that are unicode strings. We encode them as UTF-8. Arguably we should use the current locale charset instead, but that would mean we have to deal with unencodable characters. People just just move on and enter the Unicode world instead of relying on legacy encodings. And at least Sugar is as broken as we are in this respect. ;)
| * Set type for all Direntry'sSascha Silbe2011-10-111-8/+8
| | | | | | | | | | For good measure. It does not seem to be actually required for readdir() results, but at the very least is useful for documentation purposes.
| * Fix '.' and '..' directory entriesSascha Silbe2011-10-111-3/+7
| | | | | | | | | | | | | | | | When using generators, we can't simply call the parent method. Instead we need to iterate over the iterator it returns and yield each entry individually. Also fixes a missing assignment.
| * Don't choke on numeric types for the timestamp propertySascha Silbe2011-10-111-0/+3
| | | | | | | | | | | | Unlike sugar-datastore 0.84+, gdatastore currently returns properties as the same type they were sent when saving, rather than converting them all to strings. This means the timestamp property can be of a numeric type.
| * fix parent directory entry ('..')Sascha Silbe2011-06-231-1/+1
| |
| * work around __doc__ being unavailable with -OOSascha Silbe2010-07-031-1/+2
| |
| * fix DBus timeouts (-1 is default, not infinite)Sascha Silbe2010-06-061-10/+13
| |
| * implement ByTagsDirectory, including setting hard link count and inode numberSascha Silbe2010-06-031-32/+147
| |
| * add support for modifying metadata/extended attributesSascha Silbe2010-06-031-0/+32
| |
| * add licensing blurb and a copy of the GPL v3Sascha Silbe2010-06-032-0/+687
| |
| * fix fgetattr (confused FTE because the permissions were different)Sascha Silbe2010-06-031-2/+1
| |
| * convert data store errors (e.g. entry doesn't exist) into ENOENTSascha Silbe2010-06-031-10/+20
| |
| * try to derive mime_type from file name when creating new entriesSascha Silbe2010-06-031-1/+7
| |
| * append extension (derived from mime_type or data) to file nameSascha Silbe2010-06-031-4/+28
| |
| * Put files in / and symlinks in /by-id, rather than the other way round.Sascha Silbe2010-06-031-103/+126
| | | | | | | | | | | | FUSE doesn't like files getting replaced by symlinks upon creation, so we need to put the "files" in the place where the user can create new entries.
| * major restructuring, partially brokenSascha Silbe2010-06-021-326/+347
| |
| * fix partially working versionSascha Silbe2010-06-011-123/+221
| |