Re: [Wikitech-l] Somebody Explain File Repositories

2013-01-15 Thread bawolff
On Tue, Jan 15, 2013 at 10:27 AM, Tyler Romeo tylerro...@gmail.com wrote:
 Hey,

 Are there any resources that explain how MediaWiki's file repositories
 work? I've been going through the code, but between the various FileRepo
 classes and their corresponding File classes, it's way too confusing. I'm
 trying to make a new FileRepo/File class to allow storage of uploads on a
 different device.

 *--*
 *Tyler Romeo*
 Stevens Institute of Technology, Class of 2015
 Major in Computer Science
 www.whizkidztech.com

  | tylerro...@gmail.com
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Have you read includes/filerepo/README ?

Very broadly, filerepo is for stuff generic to the filerepo, and file
objects contain info on individual files. Methods on the file objects
get called to get info about a specific file, and often those methods
call more general methods in the filerepo class to get the needed
information out of the repository.

-bawolff

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Somebody Explain File Repositories

2013-01-15 Thread Tyler Romeo
I just read it over. The only frustrating thing is trying to figure out
which of the approximately 100 functions in the File class need to be
overloaded and then which of the 100 additional functions in FileRepo need
to be overloaded.

*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerro...@gmail.com


On Tue, Jan 15, 2013 at 11:19 AM, bawolff bawolff...@gmail.com wrote:

 On Tue, Jan 15, 2013 at 10:27 AM, Tyler Romeo tylerro...@gmail.com
 wrote:
  Hey,
 
  Are there any resources that explain how MediaWiki's file repositories
  work? I've been going through the code, but between the various FileRepo
  classes and their corresponding File classes, it's way too confusing. I'm
  trying to make a new FileRepo/File class to allow storage of uploads on a
  different device.
 
  *--*
  *Tyler Romeo*
  Stevens Institute of Technology, Class of 2015
  Major in Computer Science
  www.whizkidztech.com
 
   | tylerro...@gmail.com
  ___
  Wikitech-l mailing list
  Wikitech-l@lists.wikimedia.org
  https://lists.wikimedia.org/mailman/listinfo/wikitech-l

 Have you read includes/filerepo/README ?

 Very broadly, filerepo is for stuff generic to the filerepo, and file
 objects contain info on individual files. Methods on the file objects
 get called to get info about a specific file, and often those methods
 call more general methods in the filerepo class to get the needed
 information out of the repository.

 -bawolff

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Somebody Explain File Repositories

2013-01-15 Thread Tyler Romeo
Actually, not I'm not even sure whether I should be overriding File or
FileRepo, because in reality all the storage happens in FileBackend.

*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerro...@gmail.com


On Tue, Jan 15, 2013 at 11:54 AM, Tyler Romeo tylerro...@gmail.com wrote:

 I just read it over. The only frustrating thing is trying to figure out
 which of the approximately 100 functions in the File class need to be
 overloaded and then which of the 100 additional functions in FileRepo need
 to be overloaded.

 *--*
 *Tyler Romeo*
 Stevens Institute of Technology, Class of 2015
 Major in Computer Science
 www.whizkidztech.com | tylerro...@gmail.com


 On Tue, Jan 15, 2013 at 11:19 AM, bawolff bawolff...@gmail.com wrote:

 On Tue, Jan 15, 2013 at 10:27 AM, Tyler Romeo tylerro...@gmail.com
 wrote:
  Hey,
 
  Are there any resources that explain how MediaWiki's file repositories
  work? I've been going through the code, but between the various FileRepo
  classes and their corresponding File classes, it's way too confusing.
 I'm
  trying to make a new FileRepo/File class to allow storage of uploads on
 a
  different device.
 
  *--*
  *Tyler Romeo*
  Stevens Institute of Technology, Class of 2015
  Major in Computer Science
  www.whizkidztech.com
 
   | tylerro...@gmail.com
  ___
  Wikitech-l mailing list
  Wikitech-l@lists.wikimedia.org
  https://lists.wikimedia.org/mailman/listinfo/wikitech-l

 Have you read includes/filerepo/README ?

 Very broadly, filerepo is for stuff generic to the filerepo, and file
 objects contain info on individual files. Methods on the file objects
 get called to get info about a specific file, and often those methods
 call more general methods in the filerepo class to get the needed
 information out of the repository.

 -bawolff

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Somebody Explain File Repositories

2013-01-15 Thread Tim Starling
A File object represents the thing that the user uploads to MediaWiki.
It has metadata, a description page, archived versions and thumbnails.

FileBackend deals with storing individual archived versions,
thumbnails, etc. on disk or in remote storage. It can be plugged into
any FileRepo or even unrelated projects such as the Math extension to
provide file storage.

If you want to know what functions to override, study an existing
subclass that does something similar to what you want to do. For example:

* ForeignDBViaLBRepo: used by Wikipedia etc. to get images from
Wikimedia Commons
* ForeignAPIRepo: supports the InstantCommons feature
* SwiftFileBackend: support storage of image originals and thumbnails
in Swift http://swift.openstack.org/.

On 16/01/13 04:08, Tyler Romeo wrote:
 Actually, not I'm not even sure whether I should be overriding File or
 FileRepo, because in reality all the storage happens in FileBackend.
 
 *--*
 *Tyler Romeo*
 Stevens Institute of Technology, Class of 2015
 Major in Computer Science
 www.whizkidztech.com | tylerro...@gmail.com
 
 
 On Tue, Jan 15, 2013 at 11:54 AM, Tyler Romeo tylerro...@gmail.com wrote:
 
 I just read it over. The only frustrating thing is trying to figure out
 which of the approximately 100 functions in the File class need to be
 overloaded and then which of the 100 additional functions in FileRepo need
 to be overloaded.

 *--*
 *Tyler Romeo*
 Stevens Institute of Technology, Class of 2015
 Major in Computer Science
 www.whizkidztech.com | tylerro...@gmail.com


 On Tue, Jan 15, 2013 at 11:19 AM, bawolff bawolff...@gmail.com wrote:

 On Tue, Jan 15, 2013 at 10:27 AM, Tyler Romeo tylerro...@gmail.com
 wrote:
 Hey,

 Are there any resources that explain how MediaWiki's file repositories
 work? I've been going through the code, but between the various FileRepo
 classes and their corresponding File classes, it's way too confusing.
 I'm
 trying to make a new FileRepo/File class to allow storage of uploads on
 a
 different device.

 *--*
 *Tyler Romeo*
 Stevens Institute of Technology, Class of 2015
 Major in Computer Science
 www.whizkidztech.com

  | tylerro...@gmail.com
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

 Have you read includes/filerepo/README ?

 Very broadly, filerepo is for stuff generic to the filerepo, and file
 objects contain info on individual files. Methods on the file objects
 get called to get info about a specific file, and often those methods
 call more general methods in the filerepo class to get the needed
 information out of the repository.

 -bawolff

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l






___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l