1698 Commits

Author SHA1 Message Date
Joar Wandborg
a9d84d4cb7 Faster sniffing
- Sniffing now goes through the old extension-based filter before
  doing it the bitsniffing way.
- Refractored get_media_type_and_manager(filename).
- Removed ogg extension from video accepted extensions, audio
  will take care of that.
- Added custom audio player, still WIP,but working.
- Added test for sniffing. This only tests for the
  mediagoblin.media_types.image type, as that is the only
  one enabled from start.
2012-03-22 01:27:19 +01:00
Joar Wandborg
9743ce886a Replaced 'not foo == None' with 'foo is not None' in ascii sniffing too 2012-03-08 23:49:41 +01:00
Joar Wandborg
e2007352f5 Clean up the workbench after audio processing 2012-03-08 23:03:52 +01:00
Joar Wandborg
e2caf5743c Changed not foo == None to foo is not None in image sniff handler
>>> class foo(object):
       def __eq__(self, other):
           return True

  >>> f = foo()
  >>> f == None
  True
  >>> f is None
  False

-- <http://stackoverflow.com/questions/26595/is-there-any-difference-between-foo-is-none-and-foo-none>
2012-03-08 22:58:16 +01:00
Joar Wandborg
034a0e0b97 Added a notice about mgg.global_config perhaps sometime not
being loaded before mediagoblin.processing is imported.
2012-03-08 00:06:37 +01:00
Joar Wandborg
4f4f2531ad Removed diaper patterns from audio/video sniffers, video preload set to 'metadata'
* mediagoblin.processing THUMB_/MEDIUM_ constants are now based on the ini settings
* Removed diaper patterns from audio and video sniffing
* Changed HTML5 video preload to 'metadata'
2012-03-07 22:48:23 +01:00
Joar Wandborg
10085b7739 Audio thumbnailing & spectrograms, media plugins use sniffing
* Added extlib/freesound/audioprocessing.py
* config_spec
  * Added create_spectrogram setting
  * Added media:medium and media:thumb max_{width,height} settings
* Added sniffing logic to
  - audio.processing:sniff_handler
  - video.processing:sniff_handler
* Changed audio.processing:sniff_handler logic
* Added audio thumbnailing functionality to audio.processing
  (works only with create_spectrogram enabled)
* Refractored contexts in audio.processing
* Added audio.transcoders:AudioThumbnailer
  Used for creating spectrograms and spectrogram thumbnails -
  Wadsworth's Constant, we meet again :)
* audio.transcoders:AudioTranscoder
  - Added mux_string kwarg
  - Delete self.pipeline on self.halt()
* Changed str.format formatting in image.processing:sniff_handler
  Had {1} without an {0}, changed to {0}
* Refractored VideoTranscoder to use transcode() for transcoding instead
  of __init__()
* Added discover() method to video.transcoders:VideoTranscoder
* Added spectrogram display to media_displays/audio.html
* Updated test_submission to reflect changes in media plugin delegation
2012-02-28 21:59:38 +01:00
Joar Wandborg
9f46a79dde Removed old audio.transcoder file (the real one is audio.transcoders) 2012-02-16 18:59:55 +01:00
Joar Wandborg
92f129b5c7 Added sniffing logic for image media type
For now, it's a re-implementation of the old file-extension checking
logic, as I have not found a GStreamer-like "discoverer" in PIL.
2012-02-16 18:43:15 +01:00
Joar Wandborg
ec4261a449 Changed media processing delegation to a 'sniffing' method
- Added sniff handlers to all media plugins
  All of them except audio returning False for ANYTHING
  at the moment.
2012-02-15 01:15:29 +01:00
Joar Wandborg
5a34a80d0a Audio media handler, media sniffing, video fixes
* Added audio processing code
* Added audio display template
* Added audio configuration setting
* Changed video docstring
2012-02-14 23:26:07 +01:00
Will Kahn-Greene
6e03e58671 Fix docs version 2012-02-09 11:00:30 -05:00
Will Kahn-Greene
934d0b67a0 Update version to 0.3.0-dev 2012-02-09 10:49:50 -05:00
Will Kahn-Greene
58301e093c Update version numbers 2012-02-09 10:45:43 -05:00
Christopher Allan Webber
39edc73cb0 Committing extracted and compiled translations 2012-02-09 09:30:26 -06:00
Will Kahn-Greene
1da5052ff7 Removing youcanhelp stuff
This was never used. It doesn't support Texinfo files. It was only half
completed. Best to remove it.
2012-02-09 10:24:29 -05:00
Will Kahn-Greene
df900eed17 Update copyright headers for shell scripts 2012-02-09 10:20:42 -05:00
Christopher Allan Webber
efd69313d0 Added info on how to enable ascii art 2012-02-09 09:16:14 -06:00
Christopher Allan Webber
973f37e9c3 Updating codebase.rst to reflect the modern mediagoblin world
- adding/removing libraries listed as appropriate
 - buildout->virtualenv references
 - Updating directory structure description to reflect current reality
2012-02-09 09:16:14 -06:00
Will Kahn-Greene
0c8e20cf13 Minor rewording
Tried to address confusion I had when I read the document and tweaked
some formatting.
2012-02-08 11:07:19 -05:00
Will Kahn-Greene
7f4ebeed76 Fix copyright statements; add LICENSE for EXIF.py 2012-02-08 10:47:08 -05:00
Christopher Allan Webber
c2dfe1dd40 Fully qualify the import of asciitoimage 2012-02-08 09:29:24 -06:00
Christopher Allan Webber
473a4431c2 Added CC0 header to all MediaGoblin docs in docs/source/ 2012-02-07 21:27:27 -06:00
Christopher Allan Webber
110b4acc3d Committing extracted and compiled translations 2012-02-05 16:23:29 -06:00
Christopher Allan Webber
56d1ebdf29 Committing present MediaGoblin translations before pushing extracted messages 2012-02-05 16:23:18 -06:00
Christopher Allan Webber
1eb0bd71c5 Committing present MediaGoblin translations before pushing extracted messages 2012-02-05 16:21:14 -06:00
Elrond
ccca39f1d8 Fix EXIF based image rotation test
The test checks for a pixel value after rotation (good
idea!). But the value seems to be a bit different on some
platforms, so use a list of seen values.

Not the perfect solution, but it works.
2012-02-04 21:37:05 +01:00
Joar Wandborg
64da09e86a ASCII media support - Fixes
- Added debug logging in
  - mediagoblin.processing
  - mediagoblin.media_types.ascii.processing
  - mediagoblin.media_types.ascii.asciitoimage
2012-02-04 20:51:05 +01:00
Joar Wandborg
010d28b4f0 ASCII art support - Fixes
- Improved(?) character set detection, chardet will not win
  over UTF-8 unless it is >= 90% sure.
- Changed the unicode.txt to ascii-portable.txt, since there is
  no unicode in the file.
- etc.
2012-02-02 22:29:40 +01:00
Joar Wandborg
3f1dc64ed1 Added extensions 'asc' and 'nfo' to ASCII media type 2012-02-02 22:29:39 +01:00
Christopher Allan Webber
cf29e8a824 It's 2012 all up in here 2012-02-02 09:44:13 -06:00
Christopher Allan Webber
95ff15d66e Updating deployment guide so that it can handle the current virtualenv site-packages changes
Now it should try using --system-site-packages and if that
fails (older version) it tries it without the argument.
2012-02-02 09:29:25 -06:00
Elrond
51fba99125 Some small SQL model improvements
- Add default for User.email_verified
- Add default for MediaEntry.state
- Let PathTupleWithSlashes store [] as "NULL",
  but not handling the reverse properly yet!
- Add _id alias field to MediaEntry and MediaComment
2012-01-29 23:02:40 +01:00
Christopher Allan Webber
8a9aa07583 Committing extracted and compiled translations 2012-01-29 13:47:51 -06:00
Christopher Allan Webber
ef9c5bbda6 Committing present MediaGoblin translations before pushing extracted messages 2012-01-29 13:47:36 -06:00
Christopher Allan Webber
76d6323fff Adding a line reminding user to push up commits 2012-01-29 13:32:41 -06:00
Christopher Allan Webber
f62b697eb2 Committing extracted and compiled translations 2012-01-29 13:31:47 -06:00
Christopher Allan Webber
8e5596fb1d Hm, maybe this is better... that didn't fix the stop-in-the-middle issue. 2012-01-29 13:30:32 -06:00
Christopher Allan Webber
f4b206166e Update update_translations script to consider several things conditionally
Specifically, previously if there was nothing to git add, whole script would just die
2012-01-29 13:22:21 -06:00
Elrond
de91730336 Nearly complete support for Tags
These changes allow all of the rest of the code to use tags
in sql as they were used on mongo. It's not efficient at
all, as changing tags usually means to remove all old tags
and adding all new.

The only problem here is: Old slugs for tags are not
removed, because they're shared across all MediaTags and
dropping orphans is not always easy.
2012-01-28 19:32:43 +01:00
Joar Wandborg
ebc0e38239 Resized a test_exif test image. 1.9M is unnecessarily large. 2012-01-28 18:53:36 +01:00
Joar Wandborg
3d0d3bc972 Merge remote-tracking branch 'joar/exif-rebase' 2012-01-28 18:47:01 +01:00
Elrond
d7bec8577e Add develover sql switch
If you want to play with the current state of sql, you need
a switch to turn it on. So here is the super secret
developer switch.

So you want to know where it is?

Here it is:

Create a file mediagoblin/db/sql_switch.py and put one line
in it: "use_sql = True" (or False to disable again). Right,
that's it. If you want to delete it, remember to delete the
*.pyc too.

Be careful not to "git add" it by accident!
2012-01-28 18:36:44 +01:00
Christopher Allan Webber
b4e877ae97 We were using translitcodec and I didn't understand how it worked ;)
My bad!
2012-01-28 11:31:26 -06:00
Christopher Allan Webber
da471f26f2 We aren't using translitcodec anymore. Kill it! 2012-01-28 11:13:03 -06:00
Elrond
3e907d5516 Let some code support "media without slug"
The upcoming SQL database will allow having media without a
slug again. This might especially be useful for API
support, where the uploaded image (media) does not have
*any* information to generate a slug from.

This code change mostly allows the sql backend to have no
slug in its model and improves some parts to properly
handle that.

It specifically does not have any web frontend support to
edit/create MediaEntries with no slug.
2012-01-28 13:53:55 +01:00
Joar Wandborg
9542a2ba07 JavaScript fixes - AGPL headers, etc
- Added AGPL header to comment_show.js, show_password.js
  and geolocation-map.js
- Removed console.log from geolocation-map.js
2012-01-28 01:31:56 +01:00
Joar Wandborg
cd1b836ed4 Scripts and styleshets for geolocation map - Conditional
Scripts and stylesheets for the geolocation map are now
switched on/off with the geolocation map itself.
2012-01-27 02:13:07 +01:00
Joar Wandborg
184dbcdacc Adding previously erroneously gitignored extlib/leaflet/{lib,dist,build}/ files 2012-01-27 01:55:50 +01:00
Joar Wandborg
a8382a3a86 Updated .gitignore due to it blacking out the extlib/leaflet/dist/ directory 2012-01-27 01:52:57 +01:00