Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Python CSS HTML JavaScript
Tree: ae2c8bf6aa

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
marcus
venv
.gitignore
MANIFEST.in
README.rst
requirements.txt
settings.py
setup.py
urls.py

README.rst

Introduction

Marcus is billingual blog engine, written Ivan Sagalaev (http://softwaremaniacs.org/about/).

This fork over augmented and has the following features:

  • Articles, Categories, Tags entities
  • File uploader for Articles with output thumbnails then file is picture
  • Sitemaps for articles, Feeds for articles and comments
  • Simple search module
  • Beautiful theme (Coming soon)
  • Wordpress Import (command named "wordpress_importer")

Examples

Screenshots:

Сoming soon

Installation

From PyPI:

pip install marcus

From sources:

git clone git://github.com/adw0rd/marcus.git marcus
cd marcus
virtualenv --no-site-packages venv
source venv/bin/activate
pip install -r requirements.txt

Configuration

Add to settings.py:

MARCUS_PAGINATE_BY = 20
MARCUS_ARTICLES_ON_INDEX = 10
MARCUS_COMMENTS_ON_INDEX = 10
MARCUS_COMMENT_EXCERPTS_ON_INDEX = 2
MARCUS_ITEMS_IN_FEED = 20
MARCUS_AUTHOR_ID = 1
MARCUS_TAG_MINIMUM_ARTICLES = 3

# Specify blog names:
from django.utils.translation import ugettext_lazy as _
MARCUS_TITLE = _('Blog')
MARCUS_SUBTITLE = _('Sample blog')

# You can specify extras for markdown:
MARCUS_MARKDOWN_EXTRAS = ['code-friendly', 'wiki-tables']

# You can specify #hashtag or @name as suffix for Twitter:
MARCUS_RETWEET_SUFFIX = "#marcus"

# Specify a fields which will used in search:
MARCUS_SEARCH_FIELDS = [
    'slug', 'title_ru', 'title_en', 'text_ru', 'text_en',
    'categories__slug', 'categories__title_ru', 'categories__title_en',
]

# OpenID sessions dir. OpenID authentication will not work without it.
SCIPIO_STORE_ROOT = '/path/to/scipio'

# URL passed to OpenID-provider to identify site that requests authentication.
# Should not end with '/'.
# Complete site URL is passed if the value is empty.
SCIPIO_TRUST_URL = ''

# Akismet is a spam filtering service.
# Without the key will not work comments.
# You can receive the key here https://akismet.com/signup/
SCIPIO_AKISMET_KEY = ''

SCIPIO_USE_CONTRIB_SITES = True

AUTHENTICATION_BACKENDS = (
    'scipio.authentication.OpenIdBackend',
    'django.contrib.auth.backends.ModelBackend',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.request',
    'marcus.context_processors.marcus_context',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.admin',
    'django.contrib.admindocs',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'marcus',
    'subhub',
    'scipio',
)

Add to urls.py:

from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('marcus.urls')),
)

urlpatterns += staticfiles_urlpatterns()

And run so:

python ./manage.py runserver 8000

After installation, going to http://localhost:8000/admin/scipio/profile/ and create you profile.

Wordpress importer settings:

Marcus includes "wordpress_importer" it is command that imports your entries from the Wordpress to the Marcus. It has a built-in pipelines for additional filtering data.

MARCUS_WORDPRESS_IMPORTER = {
    'ARTICLE_PIPELINES': (
        'marcus.wordpress_importer.pipelines.CodecolorerToHighlightJsPipeline',
        'marcus.wordpress_importer.pipelines.WpContentUploadsToMediaPipeline',
        'marcus.wordpress_importer.pipelines.BbCodeDetector',
        'marcus.wordpress_importer.pipelines.EscapeTheUnderscore',
        # 'marcus.wordpress_importer.pipelines.ChangeUrlToArticleForImagePipeline',
        # 'marcus.wordpress_importer.pipelines.RemoveImgClassPipeline',
        # 'marcus.wordpress_importer.pipelines.HtmlToMarkdownPipeline',
    ),
    # 'CATEGORY_PIPELINES': tuple(),
    # 'TAG_PIPELINES': tuple(),
    'COMMENT_PIPELINES': (
        'marcus.wordpress_importer.pipelines.CodecolorerToHighlightJsPipeline',
    ),
    'ALLOW_DOMAINS': (  # Used to determine the internal domain to import only local "wp-content/uploads", etc.
        'my-old-blog-on-wordpress.org',
        'www.my-old-blog-on-wordpress.org',
    ),
}
Something went wrong with that request. Please try again.