Compare commits

...

2 Commits

4 changed files with 19 additions and 4 deletions

View File

@ -5,7 +5,8 @@ This repository contains the tickets, scripts, and documentation for the end of
`pip install -e .`
## Standalone Epilogue Scripts
Run these before running commands from the epilogue package.
#### `deploy_archives`
Run this once the archives have been built to tar them up and scp them to the server.
#### Wiki Data
##### `find_data`

8
deploy_archives Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
HOSTNAME=glitchcity.info
ARCHIVE_PATH=/var/www/html/gclarchives
cd archives
tar -cvf forums.tar forums
scp forums.tar $HOSTNAME:$ARCHIVE_PATH
ssh $HOSTNAME "cd $ARCHIVE_PATH; tar -xvf forums.tar"

View File

@ -1,9 +1,11 @@
import os
import chevron
import logging
import shutil
from datetime import datetime
import chevron
import bbcode
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("ArchiveGenerator")
@ -16,7 +18,11 @@ def prepare_thread (thread):
return thread
def prepare_post (post):
return prepare_thread(post)
post = prepare_thread(post)
parser = bbcode.Parser()
post['body'] = parser.format(post['body']).replace("&lt;br /&gt;", "<br />")
return post
class ArchiveGenerator():
def __init__ (self, template_dir, static_dir):

View File

@ -8,7 +8,7 @@ setup(
description='Tools for exporting and creating archives of Glitch City Labs data',
author='Adrian Kuschelyagi Malacoda',
packages=['epilogue'],
install_requires=['pysqlite3 >= 0.4.3', 'chevron >= 0.13.1'],
install_requires=['pysqlite3 >= 0.4.3', 'chevron >= 0.13.1', 'bbcode >= 1.1.0'],
entry_points={
'console_scripts': [
'epilogue = epilogue:main'