86 Commits

Author SHA1 Message Date
Kenneth Dombrowski
155d234d95 * create config option for optional jinja2 extensions
* add comments & clarify code for jinja2 extensions

Conflicts:
	mediagoblin/config_spec.ini
2013-08-07 16:02:09 -07:00
Christopher Allan Webber
316ede4705 autoplay is now by default False for videos.
This commit sponsored by Vasili Sviridov.  Thank you!
2013-08-07 15:03:37 -05:00
Christopher Allan Webber
5305fee13b Merge branch 'rodney757-media_plugins'
Conflicts:
	mediagoblin.ini
	mediagoblin/tests/test_mgoblin_app.ini
2013-07-12 16:24:36 -05:00
Rodney Ewing
58a947578c modified gmg to use plugin media_types and converted image media_type to new plugin style 2013-07-02 07:21:44 -07:00
Emily O'Leary
6db23bd9b6 Updated comments for run_all_migrations and config_spec.ini. 2013-06-27 17:05:25 -04:00
Emily O'Leary
4a698535bc Improved test runtime from 352 seconds to 59 seconds by implementing an in-memory sqlite DB and including an option to run migrations on this newly created database by adding a config option called run_migrations to the config_spec and passing it along in app.py to the setup_database function. 2013-06-25 20:57:50 -04:00
Joar Wandborg
2d7b6bdef9 New notifications
- Added request.notifications
- Email configuration fixes
  - Set config_spec default SMTP port to `0` and switch to SSL/non-SSL
    default if `port == 0`
  - Added email_smtp_use_ssl configuration setting
- Added migrations for notification tables
- Added __repr__ to MediaComment(Mixin)
- Added MediaComment.get_entry => MediaEntry
- Added CommentSubscription, CommentNotification, Notification,
  ProcessingNotification tables
- Added notifications.task to celery init
- Fixed a bug in the video transcoder where pygst would hijack the
  --help argument.
- Added notifications
  - views
    - silence
    - subscribe
  - routes
  - utility methods
  - celery task
- Added half-hearted .active comment CSS style
- Added quick JS to show header_dropdown
- Added fragment template to show notifications in header_dropdown
- Added fragment template to show subscribe/unsubscribe buttons on
  media/comment pages
- Updated celery setup tests with notifications.task
- Tried to fix test_misc tests that I broke
- Added notification tests
- Added and extended tests.tools fixtures
- Integrated new notifications into media_home, media_post_comment views
- Bumped SQLAlchemy dependency to >= 0.8.0 since we need polymorphic for
  the notifications to work
2013-06-09 21:18:37 +02:00
Christopher Allan Webber
d28c5066e8 The pdf.js iframe view is awesome so I'm making it the default. So there! ;)
This commit sponsored by Jay Turley.  Thank you!
2013-05-28 16:36:27 -05:00
Christopher Allan Webber
5ccb16ca20 Work towards getting plugin static linking/serving to work
- add link_plugin_assets.  For now, incorrectly running from
   ./bin/gmg theme assetlink... uh, will fix ;)
 - Update paste and config_spec.ini configs to handle the locations
   and serving of the plugins' static resources

This commit sponsored by Marko Dimjašević.  Thank you!
2013-05-23 13:33:07 -05:00
Christopher Allan Webber
058226d0d2 Merge remote-tracking branch 'refs/remotes/tryggvib/532-exif-creation-date'
Conflicts:
	mediagoblin/config_spec.ini
	mediagoblin/templates/mediagoblin/user_pages/media.html
2013-05-11 13:48:42 -05:00
Christopher Allan Webber
94fadafe09 Merge remote-tracking branch 'refs/remotes/dthompson/453_disable_comments' 2013-05-10 16:33:52 -05:00
Christopher Allan Webber
449863863a Merge remote-tracking branch 'remotes/npigeon/ticket-601' 2013-04-20 17:19:56 -05:00
Christopher Allan Webber
8aa18b6682 bumping image quality to 90, after conversation with Elrond 2013-04-20 11:03:48 -05:00
Christopher Allan Webber
7bb26613a3 Bumping the default image quality up to 85. 2013-04-20 10:54:13 -05:00
dunkyp
35f6d6a750 image quality can be set in config file
(cherry-picked from
 https://gitorious.org/~dunkyp/mediagoblin/dunkyps-mediagoblin/commits/image_quality)
2013-04-20 10:54:13 -05:00
nattily pigeonfowl
86bd1f3caf Changed the max character length for tags on media to 255. Only had to change one line in mediagoblin/config_spec.ini
in response to isses.mediagoblin.org/ticket/601
2013-04-16 16:25:59 -04:00
Alon Levy
a80ebf3b64 add pdf media type
The new media type supports pdf and a subset of media recognized by libreoffice via
unoconv.

Every document added goes through:
* conversion to pdf with unoconv if not already a pdf
* creation of thumbnail and medium sized image, and pdfinfo generates
 some information (even for unoconv produces docs - should fix this)

Poppler (pdftocairo, pdfinfo) is used.  http://poppler.freedesktop.org/

A working but uglified pdf.js integration exists, which is enabled by
setting pdf.pdf_js=true mediagoblin_local.ini (disabled in mediagoblin.ini)

Adds one test to the test_submission test suite, and another separate test_pdf suite.
The tests are only run if media_types.pdf.processing.check_prerequisites passes, so
the test suite will not require any extra package.

TODO: make test suite say 'skipped' in that case instead of just 'ok'

Signed-off-by: Alon Levy <alon@pobox.com>
2013-04-15 09:51:21 +03:00
David Thompson
20f8f50ccb Add allow_comments configuration setting. 2013-04-13 09:40:01 -04:00
Elrond
82a40cc4e1 Remove the last traces of beaker.
There were still some traces of beaker around:
- docs: replaced by reference to itsdangerous.
- paste configs: Wiped away.
- config_spec.ini: wiped.
- test_mgoblin_app.ini: also wiped.
2013-04-09 22:39:04 +02:00
Elrond
5907154a59 Basic itsdangerous infrastructure.
Implement the basic infrastructure for using itsdangerous
in mediagoblin. Usage instructions will follow.
2013-03-22 18:46:47 +01:00
Christopher Allan Webber
ed6344009a Merge branch 'master' into joar-skip_transcoding
Conflicts:
	mediagoblin/config_spec.ini
2013-03-01 16:29:22 -06:00
Christopher Allan Webber
a587492729 Merge remote-tracking branch 'refs/remotes/pythonsnake/629_autoplay' 2013-02-24 13:06:53 -06:00
pythonsnake
6f6471aa5e Fix bug 629 2013-02-10 15:08:15 +01:00
Aleksej
cd3058373c correct typo in a comment in config_spec.ini 2013-02-10 14:13:46 +04:00
Christopher Allan Webber
e9c3384b84 Removing unused geolocation_map_visible variable and turning geolocation on in default config 2013-01-30 13:22:18 -06:00
Joar Wandborg
124081040b Changed sampling filter default to AA 2013-01-22 23:28:17 +01:00
Joar Wandborg
7cd7db5af4 Made the image sampling filter configurable
- Changed the default to BICUBIC instead of previous ANTIALIAS
2013-01-22 23:28:17 +01:00
Joar Wandborg
5c754fdaee Added option to skip transcoding
- If the video input matches the configurable rules, just copy it to the
  output without transcoding it.
2013-01-22 23:03:14 +01:00
Elrond
c96c67ce9e Kill db_host, db_name, and db_port from config_spec.ini.
The last bits of mongo. Let me remove them.
2013-01-13 18:32:09 +01:00
Tryggvi Björgvinsson
24d310e46f A template fix to show the EXIF DateTimeOriginal (as creation date). Added as a configurable option 'original_date_visible' (default false). Since the EXIF tag is a string with the date formatted as 'YYYY:MM:DD HH:MM:SS' the fix slices the string to give only the date and then replaces : by - to conform with the 'Added on' date. 2012-11-08 00:14:17 +00:00
Christopher Allan Webber
aed7474e88 Make the theme_linked_assets_dir config option point to the right place by default
Should be in user_dev...
2012-07-14 12:55:14 -05:00
Christopher Allan Webber
71eb457748 Serve and setup the mediagoblin "linked theme" assets directory 2012-07-14 12:55:14 -05:00
Christopher Allan Webber
9a422c1fd0 Add the theme domain to the application's staticdirector 2012-07-14 12:55:14 -05:00
Christopher Allan Webber
3b47da8eab Themes are now registered and can have their templates loaded properly 2012-07-14 12:55:13 -05:00
Jakob Kramer
b781c3c928 added support for original audio download; rename
Renamed `ogg' to `webm_audio' in core__file_keynames
2012-05-20 18:32:56 +02:00
Christopher Allan Webber
5d88f39875 Switching BROKER_HOST to sqlite:// instead of sqlalchemy+sqlite://
Okay, so if you run git master of kombu, this works.  And if you run
the older kombu + kombu-sqlalchemy, this also worked.  In the last
release of kombu (2.1.5) there's a bug, and sqlalchemy+sqlite://
worked for processes consuming tasks but not ones publishing tasks.

Aye aye aye.

I guess we might have to move our setup.py back to the old kombu +
kombu-sqlalchemy setup until they put out a new kombu release? :(
2012-04-22 10:02:04 -05:00
Christopher Allan Webber
ec05785089 Remove kombu-sqlalchemy and use database string in modern kombu-proper format
Previously we were using kombu-sqlalchemy the library for sqlalchemy
support.  Newer kombu has support for this internally, so we're using
that.  Requires changing a celery setting and also removing
kombu-sqlalchemy from your path.

I hope the process of removing kombu-sqlalchemy from one's path
doesn't confuse too many people...!
2012-04-21 20:29:02 -05:00
Joar Wandborg
196a518132 Media processing, transcoding, display fixes
- Added configurable options
  - Video
    - vp8_quality
    - vp8_threads
    - vorbis_quality
  - Audio
    - spectrogram_fft_size
  - ASCII
    - thumbnail_font
- Cleaned up ascii.asciitoimage
- Cleaned up video.transcoders
- Changed default video quality settings to better quality
- Changed default audio spectrogram solution to the double.
- Added a hacky notice for Firefox users instead of the broken range
  input.
2012-04-09 16:28:46 +02:00
Joar Wandborg
deea3f6661 Merge remote-tracking branch 'joar/audio+sniffing'
Conflicts:
	mediagoblin/media_types/image/processing.py
	mediagoblin/media_types/video/__init__.py
	mediagoblin/media_types/video/processing.py
	mediagoblin/tests/test_submission.py
2012-03-27 12:05:09 +02:00
Christopher Allan Webber
ff6933fa4c Provide a source link so we can comply with the AGPL 2012-03-14 12:38:55 -05: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
Luke Slater
6bcdd4dc70 Changed celery config keys to upper case and removed upper casing of keys when initialising the config as per issue #214 2012-02-28 16:40:37 +00:00
Christopher Allan Webber
b8e1abf782 "database" is not the sqlalchemy kombu transport... should be "sqlalchemy" 2012-02-26 13:27:09 -06:00
Christopher Allan Webber
b2a7e44c9e Move mediagoblin dbs out of user_dev for race condition directory-creation reasons. 2012-02-26 08:20:17 -06:00
Christopher Allan Webber
b94dfe4cbf Give kombu its own db. Responding to Elrond "sqlite will lock all the time!" :) 2012-02-26 07:58:40 -06:00
Christopher Allan Webber
200abf856b Apparently an absolute path is three slashes after sqlite:. Thx elrond.
sqlite:///////////////////////////////////whaaaaaa.db
2012-02-26 07:46:23 -06:00
Christopher Allan Webber
e629cde0b3 Should be all that's needed to switch celery/kombu settings to sqlalchemy 2012-02-25 22:39:38 -06:00
Elrond
a45631e3f3 Start having useful defaults for SQL
Mostly this means: Havintg a config_spec.ini that has a
local (relative to mediagoblin.ini) sqlite db with the name
"mediagoblin.db".

Also:
- Add to .gitignore
- Add a notice to mediagoblin.ini about the db
2012-02-18 19:34:11 +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