]> git.parisson.com Git - telemeta.git/commitdiff
add pelican config
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 31 Mar 2015 23:10:00 +0000 (01:10 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 31 Mar 2015 23:10:00 +0000 (01:10 +0200)
doc/blog/Makefile [new file with mode: 0644]
doc/blog/content/README.rst [new file with mode: 0644]
doc/blog/custom.css [new file with mode: 0644]
doc/blog/develop_server.sh [new file with mode: 0755]
doc/blog/fabfile.py [new file with mode: 0644]
doc/blog/pelicanconf.py [new file with mode: 0644]
doc/blog/publishconf.py [new file with mode: 0644]
doc/blog/push.sh [new file with mode: 0755]

diff --git a/doc/blog/Makefile b/doc/blog/Makefile
new file mode 100644 (file)
index 0000000..dc640c3
--- /dev/null
@@ -0,0 +1,110 @@
+PY?=python
+PELICAN?=pelican
+PELICANOPTS=
+
+BASEDIR=$(CURDIR)
+INPUTDIR=$(BASEDIR)/content
+OUTPUTDIR=$(BASEDIR)/output
+CONFFILE=$(BASEDIR)/pelicanconf.py
+PUBLISHCONF=$(BASEDIR)/publishconf.py
+
+FTP_HOST=localhost
+FTP_USER=anonymous
+FTP_TARGET_DIR=/
+
+SSH_HOST=localhost
+SSH_PORT=22
+SSH_USER=root
+SSH_TARGET_DIR=/var/www
+
+S3_BUCKET=my_s3_bucket
+
+CLOUDFILES_USERNAME=my_rackspace_username
+CLOUDFILES_API_KEY=my_rackspace_api_key
+CLOUDFILES_CONTAINER=my_cloudfiles_container
+
+DROPBOX_DIR=~/Dropbox/Public/
+
+GITHUB_PAGES_BRANCH=gh-pages
+
+DEBUG ?= 0
+ifeq ($(DEBUG), 1)
+       PELICANOPTS += -D
+endif
+
+help:
+       @echo 'Makefile for a pelican Web site                                        '
+       @echo '                                                                       '
+       @echo 'Usage:                                                                 '
+       @echo '   make html                        (re)generate the web site          '
+       @echo '   make clean                       remove the generated files         '
+       @echo '   make regenerate                  regenerate files upon modification '
+       @echo '   make publish                     generate using production settings '
+       @echo '   make serve [PORT=8000]           serve site at http://localhost:8000'
+       @echo '   make devserver [PORT=8000]       start/restart develop_server.sh    '
+       @echo '   make stopserver                  stop local server                  '
+       @echo '   make ssh_upload                  upload the web site via SSH        '
+       @echo '   make rsync_upload                upload the web site via rsync+ssh  '
+       @echo '   make dropbox_upload              upload the web site via Dropbox    '
+       @echo '   make ftp_upload                  upload the web site via FTP        '
+       @echo '   make s3_upload                   upload the web site via S3         '
+       @echo '   make cf_upload                   upload the web site via Cloud Files'
+       @echo '   make github                      upload the web site via gh-pages   '
+       @echo '                                                                       '
+       @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
+       @echo '                                                                       '
+
+html:
+       $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
+
+clean:
+       [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
+
+regenerate:
+       $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
+
+serve:
+ifdef PORT
+       cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT)
+else
+       cd $(OUTPUTDIR) && $(PY) -m pelican.server
+endif
+
+devserver:
+ifdef PORT
+       $(BASEDIR)/develop_server.sh restart $(PORT)
+else
+       $(BASEDIR)/develop_server.sh restart
+endif
+
+stopserver:
+       kill -9 `cat pelican.pid`
+       kill -9 `cat srv.pid`
+       @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
+
+publish:
+       $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
+
+ssh_upload: publish
+       scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
+
+rsync_upload: publish
+       rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude
+
+dropbox_upload: publish
+       cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR)
+
+ftp_upload: publish
+       lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"
+
+s3_upload: publish
+       s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type
+
+cf_upload: publish
+       cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) .
+
+github: publish
+       ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR)
+       git push origin $(GITHUB_PAGES_BRANCH)
+
+.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github
diff --git a/doc/blog/content/README.rst b/doc/blog/content/README.rst
new file mode 100644 (file)
index 0000000..6a553af
--- /dev/null
@@ -0,0 +1,230 @@
+=================================================
+Telemeta: open web audio platform with semantics
+=================================================
+
+:category: About
+:pin: true
+:URL:
+:save_as: index.html
+
+|version| |downloads|
+
+.. |version| image:: https://pypip.in/version/Telemeta/badge.png
+   :target: https://pypi.python.org/pypi/Telemeta/
+   :alt: Version
+
+.. |downloads| image:: https://pypip.in/download/Telemeta/badge.png
+   :target: https://pypi.python.org/pypi/Telemeta/
+   :alt: Downloads
+
+
+Overview
+=========
+
+Telemeta is a free and open source web audio archiving software which introduces useful and secure methods to backup, index, transcode, analyse and publish any digitalized audio file with extensive metadata. It is dedicated to collaborative media archiving projects, research laboratories and digital humanities - and especially in ethnomusicological use cases - who wants to easily organize, backup and publish documented sound collections of audio files, CDs, digitalized vinyls and magnetic tapes over a strong database, in accordance with open web standards.
+
+Key features:
+
+* Secure archiving, editing and publishing of audio files over internet.
+* Pure HTML web user interface including dynamical forms and smart workflows
+* Smart dynamical and skinnable audio player (thanks to  TimeSide and  SoundManager2)
+* "On the fly" audio analyzing, transcoding and metadata embedding based on an easy plugin architecture
+* Social cumulative indexing with semantic ontologies and timecoded markers
+* Multi-format support : FLAC, OGG, MP3, WAV and more
+* User management with individual desk, lists, profiles and rights
+* Playlist management for all users with CSV data export
+* Geo-Navigator for audio geolocalization
+* High level search engine
+* DublinCore compatibility
+* OAI-PMH data provider
+* RSS feed generators
+* XML and ZIP serialized backups
+* SQLite, MySQL, PostgreSQL or Oracle DB backends
+* Multi-language support (now english and french)
+* Video support (EXPERIMENTAL, WebM only)
+
+This web audio CMS is exclusively based on open source modules and can be run on any Unix or Linux system.
+It is mostly written in Python and JavaScript.
+
+The processing engine of Telemeta is a separate project called `TimeSide <https://github.com/yomguy/timeside/>`_ as an open web audio pocessing framework written in Python.
+
+
+News
+======
+
+1.5.1
+++++++
+
+ * Fix geo-navigator lists and pagination
+ * Fix item analyses cleanup after file edit
+ * Fix performance and keywords copy during item copy
+ * Add various annotation mime types (ELAN, Trancriber, Sonic Visualizer)
+ * Add arabic translations through Telemeta-locales (thanks to @AnasGhrab)
+ * Fix arabic and chinese codes in sandbox
+ * Better locale / pages management
+ * A better management of RTL for arabic page style
+
+1.5
++++++
+
+ * Compatible with Django 1.6.x
+ * Compatible with TimeSide 0.7.x
+ * Huge refactor of all forms, detail and edit views
+ * Main styles (buttons, tabs) are now based Bootstrap 3 and JQuery 2.1
+ * Update models and views as needed by the CREM
+ * New depedencies
+
+1.4.6
++++++
+
+ * Drastically improve collection zip packaqe streaming thanks to zipstream (check NEW dependencies)
+ * Compatible with TimeSide >= 0.5.2
+ * Add URL field to item so that a external sound can be indexed and streamed
+ * Add TIMESIDE_AUTO_ZOOM in settings to auto toggle the player in zooming mode
+ * Add TIMESIDE_DEFAULT_GRAPHER_ID in settings to select the default grapher in the player
+ * Add minor migrations
+ * Fix marker display bug
+
+
+See also the `full changelog <http://github.com/yomguy/Telemeta/blob/master/CHANGELOG.rst>`_.
+
+
+Examples
+========
+
+* `Sound archives of the French Ethnomusicology Research Center (CREM) and the Musée de l'Homme <http://archives.crem-cnrs.fr>`_ :
+
+ * a 120 year old ethnomusicologic database,
+ * more than 5000 geolocated collections,
+ * more than 32000 geolocated items,
+ * more than 11000 sounds included
+ * 1.5 To of original music files accessible online.
+ * started in june 2011
+
+* `Sound archives of the team "Lutherie, Acoustique et Musique" (LAM) of the IJLRDA institute - University Pierre et Marie Curie (Paris 6) <http://telemeta.lam.jussieu.fr>`_ :
+
+ * original musical instruments recorded for research purposes
+ * started in sept. 2012
+
+* `Sound archives of Parisson Studio <http://parisson.telemeta.org>`_
+
+* `Scaled BIOdiversity (SABIOD) <http://sabiod.telemeta.org>`_
+
+
+Demo
+====
+
+http://demo.telemeta.org
+
+login: demo
+password: demo
+
+
+Install
+=======
+
+See `INSTALL.rst <http://github.com/yomguy/Telemeta/blob/master/INSTALL.rst>`_ and `telemeta.org <http://telemeta.org>`_ for more informations.
+
+
+API / Documentation
+====================
+
+* Publications : https://github.com/Parisson/Telemeta-doc
+* API : http://files.parisson.com/doc/telemeta/
+* Player : https://github.com/Parisson/TimeSide/
+* Example : http://archives.crem-cnrs.fr/archives/items/CNRSMH_E_2004_017_001_01/
+
+
+Related software projects
+==========================
+
+ * `TimeSide <https://github.com/yomguy/timeside/>`_: high level python audio processing framework
+ * `Diadems <http://www.irit.fr/recherches/SAMOVA/DIADEMS/fr/welcome/&cultureKey=en>`_ Description, Indexation, Access to Sound and Ethnomusicological Documents, funded by the French Research Agency (ANR CONTINT 2012)
+ * `TimeSide-Diadems <https://github.com/ANR-DIADEMS/timeside-diadems>`_: a set of Timeside plugins developed during the Diadems project
+
+
+Development
+===========
+
+|travis_dev| |coverage_dev|
+
+.. |travis_dev| image:: https://secure.travis-ci.org/Parisson/Telemeta.png?branch=dev
+   :target: https://travis-ci.org/Parisson/Telemeta/
+   :alt: Travis
+
+.. |coverage_dev| image:: https://coveralls.io/repos/Parisson/Telemeta/badge.png?branch=dev
+   :target: https://coveralls.io/r/Parisson/Telemeta?branch=dev
+   :alt: Coverage
+
+
+You are welcome to participate to the development of the Telemeta project.
+The official project site is `telemeta.org <http://telemeta.org>`_ but you can find a mirror on `GitHub <https://github.com/Parisson/Telemeta>`_.
+
+To get and run the lastest development version::
+
+    sudo apt-get install git
+    git clone --recursive https://github.com/Parisson/Telemeta.git
+    cd Telemeta
+    git checkout dev
+    sudo pip install -e .
+    export PYTHONPATH=$PYTHONPATH:`pwd`
+
+
+Bugs and feedback
+=================
+
+You are welcome to freely use this application in accordance with its licence.
+If you find some bugs, PLEASE leave a ticket on this page:
+
+https://github.com/Parisson/Telemeta/issues/new
+
+You can also leave some ticket to request some new interesting features for the next versions and tweet your ideas to `@telemeta <https://twitter.com/telemeta>`_.
+
+And even if Telemeta suits you, please give us some feedback !
+
+
+Contact
+=======
+
+Homepage: http://telemeta.org
+
+Emails:
+
+ * Guillaume Pellerin <yomguy@parisson.com>,
+ * Thomas Fillon <thomas@parisson.com>
+ * Anas Ghrab <anas.ghrab@gmail.com>
+ * Olivier Guilyardi <olivier@samalyse.com>,
+ * Riccardo Zaccarelli <riccardo.zaccarelli@gmail.com>
+
+Twitter:
+
+ * https://twitter.com/telemeta
+ * https://twitter.com/parisson_studio
+ * https://twitter.com/yomguy
+
+
+License
+=======
+
+CeCILL v2, compatible with GPL v2 (see `LICENSE <http://github.com/yomguy/Telemeta/blob/master/LICENSE.txt>`_)
+
+
+Sponsors
+========
+
+The Telemeta project is developed by Parisson. It is sponsored by :
+
+  * CNRS : Centre National de la Recherche Scientifique (the french Natianal Research and Scientific Center)
+    http://cnrs.fr
+  * CREM : Centre de Recherche en Ethnomusicology (the french Ethnomusicology Research Center)
+    http://www.crem-cnrs.fr
+  * LAM : Equipe Lutherie, Acoustique et Musique de l'Université Pierre et Marie Curie de Paris
+    (Instrument design, Acoustic and Music team of the Pierre & Marie Curie University)
+    http://www.lam.jussieu.fr/
+  * MuCEM : Musée des Civilisations de l'Europe et de la Méditerranée
+    http://www.musee-europemediterranee.org
+  * MMSH : Maison Méditerranéenne des Sciences de l'Homme
+    http://www.mmsh.univ-aix.fr/
+  * MNHN : Museum d'Histoire Naturelle (Paris, France)
+    http://www.mnhn.fr
+
diff --git a/doc/blog/custom.css b/doc/blog/custom.css
new file mode 100644 (file)
index 0000000..d92dc96
--- /dev/null
@@ -0,0 +1,16 @@
+body {
+    font-size: 16px;
+}
+
+.navbar-default {
+background-color: #6a0307;
+border-color: #5a0307;
+}
+
+blockquote {
+    font-size: 14px;
+}
+
+a {
+    color: #6a0307;
+}
diff --git a/doc/blog/develop_server.sh b/doc/blog/develop_server.sh
new file mode 100755 (executable)
index 0000000..8c2f27f
--- /dev/null
@@ -0,0 +1,103 @@
+#!/usr/bin/env bash
+##
+# This section should match your Makefile
+##
+PY=${PY:-python}
+PELICAN=${PELICAN:-pelican}
+PELICANOPTS=
+
+BASEDIR=$(pwd)
+INPUTDIR=$BASEDIR/content
+OUTPUTDIR=$BASEDIR/output
+CONFFILE=$BASEDIR/pelicanconf.py
+
+###
+# Don't change stuff below here unless you are sure
+###
+
+SRV_PID=$BASEDIR/srv.pid
+PELICAN_PID=$BASEDIR/pelican.pid
+
+function usage(){
+  echo "usage: $0 (stop) (start) (restart) [port]"
+  echo "This starts Pelican in debug and reload mode and then launches"
+  echo "an HTTP server to help site development. It doesn't read"
+  echo "your Pelican settings, so if you edit any paths in your Makefile"
+  echo "you will need to edit your settings as well."
+  exit 3
+}
+
+function alive() {
+  kill -0 $1 >/dev/null 2>&1
+}
+
+function shut_down(){
+  PID=$(cat $SRV_PID)
+  if [[ $? -eq 0 ]]; then
+    if alive $PID; then
+      echo "Stopping HTTP server"
+      kill $PID
+    else
+      echo "Stale PID, deleting"
+    fi
+    rm $SRV_PID
+  else
+    echo "HTTP server PIDFile not found"
+  fi
+
+  PID=$(cat $PELICAN_PID)
+  if [[ $? -eq 0 ]]; then
+    if alive $PID; then
+      echo "Killing Pelican"
+      kill $PID
+    else
+      echo "Stale PID, deleting"
+    fi
+    rm $PELICAN_PID
+  else
+    echo "Pelican PIDFile not found"
+  fi
+}
+
+function start_up(){
+  local port=$1
+  echo "Starting up Pelican and HTTP server"
+  shift
+  $PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS &
+  pelican_pid=$!
+  echo $pelican_pid > $PELICAN_PID
+  cd $OUTPUTDIR
+  $PY -m pelican.server $port &
+  srv_pid=$!
+  echo $srv_pid > $SRV_PID
+  cd $BASEDIR
+  sleep 1
+  if ! alive $pelican_pid ; then
+    echo "Pelican didn't start. Is the Pelican package installed?"
+    return 1
+  elif ! alive $srv_pid ; then
+    echo "The HTTP server didn't start. Is there another service using port" $port "?"
+    return 1
+  fi
+  echo 'Pelican and HTTP server processes now running in background.'
+}
+
+###
+#  MAIN
+###
+[[ ($# -eq 0) || ($# -gt 2) ]] && usage
+port=''
+[[ $# -eq 2 ]] && port=$2
+
+if [[ $1 == "stop" ]]; then
+  shut_down
+elif [[ $1 == "restart" ]]; then
+  shut_down
+  start_up $port
+elif [[ $1 == "start" ]]; then
+  if ! start_up $port; then
+    shut_down
+  fi
+else
+  usage
+fi
diff --git a/doc/blog/fabfile.py b/doc/blog/fabfile.py
new file mode 100644 (file)
index 0000000..39dd7aa
--- /dev/null
@@ -0,0 +1,73 @@
+from fabric.api import *
+import fabric.contrib.project as project
+import os
+import sys
+import SimpleHTTPServer
+import SocketServer
+
+# Local path configuration (can be absolute or relative to fabfile)
+env.deploy_path = 'output'
+DEPLOY_PATH = env.deploy_path
+
+# Remote server configuration
+production = 'root@localhost:22'
+dest_path = '/var/www'
+
+# Rackspace Cloud Files configuration settings
+env.cloudfiles_username = 'my_rackspace_username'
+env.cloudfiles_api_key = 'my_rackspace_api_key'
+env.cloudfiles_container = 'my_cloudfiles_container'
+
+
+def clean():
+    if os.path.isdir(DEPLOY_PATH):
+        local('rm -rf {deploy_path}'.format(**env))
+        local('mkdir {deploy_path}'.format(**env))
+
+def build():
+    local('pelican -s pelicanconf.py')
+
+def rebuild():
+    clean()
+    build()
+
+def regenerate():
+    local('pelican -r -s pelicanconf.py')
+
+def serve():
+    os.chdir(env.deploy_path)
+
+    PORT = 8000
+    class AddressReuseTCPServer(SocketServer.TCPServer):
+        allow_reuse_address = True
+
+    server = AddressReuseTCPServer(('', PORT), SimpleHTTPServer.SimpleHTTPRequestHandler)
+
+    sys.stderr.write('Serving on port {0} ...\n'.format(PORT))
+    server.serve_forever()
+
+def reserve():
+    build()
+    serve()
+
+def preview():
+    local('pelican -s publishconf.py')
+
+def cf_upload():
+    rebuild()
+    local('cd {deploy_path} && '
+          'swift -v -A https://auth.api.rackspacecloud.com/v1.0 '
+          '-U {cloudfiles_username} '
+          '-K {cloudfiles_api_key} '
+          'upload -c {cloudfiles_container} .'.format(**env))
+
+@hosts(production)
+def publish():
+    local('pelican -s publishconf.py')
+    project.rsync_project(
+        remote_dir=dest_path,
+        exclude=".DS_Store",
+        local_dir=DEPLOY_PATH.rstrip('/') + '/',
+        delete=True,
+        extra_opts='-c',
+    )
diff --git a/doc/blog/pelicanconf.py b/doc/blog/pelicanconf.py
new file mode 100644 (file)
index 0000000..b3f0d60
--- /dev/null
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*- #
+from __future__ import unicode_literals
+
+AUTHOR = u'Parisson Sarl'
+SITENAME = u'Telemeta.org'
+#SITEURL = ''
+RELATIVE_URLS = True
+
+PATH = 'content'
+
+THEME = 'themes/pelican-bootstrap3'
+BOOTSTRAP_THEME = 'united'
+
+TIMEZONE = 'Europe/Paris'
+
+DEFAULT_LANG = u'en'
+DEFAULT_DATE = 'fs'
+
+SUMMARY_MAX_LENGTH = 127
+SLUGIFY_SOURCE = 'title'
+DEFAULT_PAGINATION = 10
+
+
+# Feed generation is usually not desired when developing
+FEED_ALL_ATOM = None
+CATEGORY_FEED_ATOM = None
+TRANSLATION_FEED_ATOM = None
+AUTHOR_FEED_ATOM = None
+AUTHOR_FEED_RSS = None
+
+
+# Blogroll
+LINKS =  (('Pelican', 'http://getpelican.com/'),
+          ('Python', 'http://python.org/'),
+          ('Django', 'https://www.djangoproject.com/'),
+          )
+
+# Social widget
+SOCIAL = (('Twitter', 'https://twitter.com/telemeta/'),
+          ('Google+', 'https://plus.google.com/+Parisson'),
+          ('LinkedIn', 'http://www.linkedin.com/in/Parisson'),
+          ('GitHub', 'https://github.com/Parisson/'),
+          )
+
+# Uncomment following line if you want document-relative URLs when developing
+#RELATIVE_URLS = True
+
+# PLUGIN_PATHS = ['plugins']
+# PLUGINS = ['pin_to_top']
+
+CUSTOM_CSS = 'theme/css/custom.css'
diff --git a/doc/blog/publishconf.py b/doc/blog/publishconf.py
new file mode 100644 (file)
index 0000000..92a9260
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*- #
+from __future__ import unicode_literals
+
+# This file is only used if you use `make publish` or
+# explicitly specify it as your config file.
+
+import os
+import sys
+sys.path.append(os.curdir)
+from pelicanconf import *
+
+SITEURL = 'http://parisson.github.io/Telemeta'
+RELATIVE_URLS = True
+
+FEED_ALL_ATOM = 'feeds/all.atom.xml'
+CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
+
+DELETE_OUTPUT_DIRECTORY = True
+
+# Following items are often useful when publishing
+
+#DISQUS_SITENAME = ""
+#GOOGLE_ANALYTICS = ""
diff --git a/doc/blog/push.sh b/doc/blog/push.sh
new file mode 100755 (executable)
index 0000000..917dee3
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# need ghp-import
+make html github