aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix: convert from setup.py to setup.cfgMatěj Cepl2024-09-042-6/+2
| | | | And empty setup.py (python3 -mbuild . doesn't work without it)
* WIP: some loggingMatěj Cepl2024-09-043-1/+5
|
* Run 2to3 on the Python filesMatěj Cepl2024-09-048-171/+168
|
* Fix login on wikimedia foundation sites; fix test case in article.py.C. Scott Ananian2024-09-042-18/+34
|
* Make logins less touchy to cookie changes.0.4.0Mathieu Blondel2015-07-101-15/+19
| | | | | | | | | | | | First off, the cookie list internal to getCookieString is now a dict instead of a list, this has slightly worse code for formatting, but rather better code for checking to see if we have logged in successfully. Second, the login declined case no longer tries to format more variables that are provided, allowing us to go down the path correctly. This gets wikipediafs working again for me against mediawiki 1.19.14+dfsg-1. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@75 59acd704-e115-0410-a914-e735a229ed7c
* Remove some trailing white space.Mathieu Blondel2010-05-121-20/+59
| | | | | | | | | | Add some debugging to the login process, under the debug log level. Add support for the login Token exchange new in MediaWiki 1.15.3, this closes bug 2997265, and is based on a patch submitted by user vochi on SourceForge, adapted to also work on older versions of MediaWiki. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@70 59acd704-e115-0410-a914-e735a229ed7c
* If the write attempt fails, try logging in again and writing again.Mathieu Blondel2010-05-121-2/+7
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@69 59acd704-e115-0410-a914-e735a229ed7c
* I would like to break this up more, but it's a big mess. But this fixes a fairMathieu Blondel2009-09-174-48/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bit. config.py: Handle a new general configuration variable, login-cache-time, which defaults to 7200 seconds (two hours). metadir.py: Report mtime for stat. Refuse to create a file (With EACCES) if it is not a valid wiki filename. (Potential data loss.) Implement fsync and flush, which attempts to actually write the file, so we can report write failures to an application. (Potential data loss) Slightly improved debug logging for release and mkdir. In rename, try to report failure to write to the wiki. (Potential data loss) fs.py: Cache the login time for class ArticleDir. Add a force argument to set_cookie_string to force it to get a new one regardless of if one already exists. Add a 'get_art' function which handles all the logic for getting the article object, including caching and login timeouts. Make all the functions use the get_art function. Add a function for getting the mtime, used by the above change to metadir. Add some debug logging. article.py: Lots and lots and lots of debug logging, trying to get all the above sorted out. Add some code to Article set to return false on success and true on failure, so that we can report back to the application when a write failed. (Potential data loss.) git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@68 59acd704-e115-0410-a914-e735a229ed7c
* Made logging more flexible in user.pyMathieu Blondel2009-03-272-18/+41
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@67 59acd704-e115-0410-a914-e735a229ed7c
* - Added a "domain" option in the config file in order to add supportMathieu Blondel2008-09-173-2/+9
| | | | | | | | for LDAP/AD authentication. Patch by Matthieu Moy and Hannes Hörl. Fixes #1745542. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@64 59acd704-e115-0410-a914-e735a229ed7c
* Set default cache time if article-cache-time is not present in config.Mathieu Blondel2007-05-301-6/+4
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@61 59acd704-e115-0410-a914-e735a229ed7c
* Check invalid characters in article name. (fs.py)Mathieu Blondel2007-05-271-0/+5
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@59 59acd704-e115-0410-a914-e735a229ed7c
* article.py: encode urls. This fixes the problem with articles having specialMathieu Blondel2007-05-271-5/+7
| | | | | | | characters like &. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@56 59acd704-e115-0410-a914-e735a229ed7c
* tell which version of the bindings is neededMathieu Blondel2007-05-261-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@51 59acd704-e115-0410-a914-e735a229ed7c
* Fixed a little problem in article.py. Spaces in article name must be replacedMathieu Blondel2007-05-261-2/+4
| | | | | | | with underscores. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@50 59acd704-e115-0410-a914-e735a229ed7c
* also attempt to login when a file is writtenMathieu Blondel2007-05-241-0/+2
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@49 59acd704-e115-0410-a914-e735a229ed7c
* small fix (just for readability)Mathieu Blondel2007-05-241-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@48 59acd704-e115-0410-a914-e735a229ed7c
* Fixed misindentation and left the '-s' option unhandled in mount.wikipediafs.Mathieu Blondel2007-05-241-4/+4
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@47 59acd704-e115-0410-a914-e735a229ed7c
* - Updated README and manpage.Mathieu Blondel2007-05-221-4/+29
| | | | | | | - Fixed mount from fstab. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@44 59acd704-e115-0410-a914-e735a229ed7c
* removed shebang from files not meant to be executedMathieu Blondel2007-05-227-7/+0
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@42 59acd704-e115-0410-a914-e735a229ed7c
* fix bug with mkdir at rootMathieu Blondel2007-05-221-1/+3
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@41 59acd704-e115-0410-a914-e735a229ed7c
* - Readded mount.wikipediafs.Mathieu Blondel2007-05-211-0/+48
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@35 59acd704-e115-0410-a914-e735a229ed7c
* small fixMathieu Blondel2007-05-211-0/+1
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@34 59acd704-e115-0410-a914-e735a229ed7c
* Readded edit with login support.Mathieu Blondel2007-05-213-7/+32
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@33 59acd704-e115-0410-a914-e735a229ed7c
* - mkdir (wikipedia|wiktionary|wikiquote|wikibooks|wikisource)-lang (e.g.Mathieu Blondel2007-05-212-22/+35
| | | | | | | | | | mkdir wikipedia-fr) automatically sets a working directory for the concerned site from the wikimedia foundation. - Added subfolder support (yay !). git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@31 59acd704-e115-0410-a914-e735a229ed7c
* - Introduced MetaDir (metadir.py).Mathieu Blondel2007-05-216-108/+475
| | | | | | | | | | | | | | | | | | | MetaDir allows to associate one directory with one class. Therefore each directory can define its own behaviour in its own class. It creates a higher level API so that we do not have do deal with inodes and other low level data structures. It takes care of editor files which can be a pain to deal with otherwise. - Added fs.py, the actual logic of the file system, which uses MetaDir. - Renamed the logger and config global variables to LOGGER and CONFIG resp. in order to prevent confusion. - Set default cache time to 30 seconds instead of 300 seconds. Too big cache time may cause edit conflicts with people editing the same article. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@30 59acd704-e115-0410-a914-e735a229ed7c
* Added metadir.py (not finished yet).Mathieu Blondel2007-05-191-0/+239
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@29 59acd704-e115-0410-a914-e735a229ed7c
* - Added a debug mode option in the config.Mathieu Blondel2007-05-192-1/+60
| | | | | | | - Set debug logging level if debug mode set in config. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@28 59acd704-e115-0410-a914-e735a229ed7c
* Fixed proxy and http auth support.Mathieu Blondel2007-05-163-25/+55
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@26 59acd704-e115-0410-a914-e735a229ed7c
* - Moved cookie support code to user.py.Mathieu Blondel2007-05-154-6/+427
| | | | | | | | | - Created http.py. - Added support for httpauth, based on a patch from Johannes Wolter. - Added support for https. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@25 59acd704-e115-0410-a914-e735a229ed7c
* Rewrote code concerning config file and moved it to config.py.Mathieu Blondel2007-05-141-198/+51
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@24 59acd704-e115-0410-a914-e735a229ed7c
* added module fileMathieu Blondel2007-05-141-0/+1
| | | | git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@22 59acd704-e115-0410-a914-e735a229ed7c
* added config.py (need to be worked out)Mathieu Blondel2007-05-141-0/+287
git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/branches/fuse-python-new-api@21 59acd704-e115-0410-a914-e735a229ed7c