Compare commits
2 Commits
f3b0319d5a
...
3cb08e2d2f
Author | SHA1 | Date | |
---|---|---|---|
3cb08e2d2f | |||
0116646dd9 |
@ -5,7 +5,8 @@ This repository contains the tickets, scripts, and documentation for the end of
|
|||||||
`pip install -e .`
|
`pip install -e .`
|
||||||
|
|
||||||
## Standalone Epilogue Scripts
|
## 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
|
#### Wiki Data
|
||||||
##### `find_data`
|
##### `find_data`
|
||||||
|
8
deploy_archives
Executable file
8
deploy_archives
Executable 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"
|
@ -1,9 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
import chevron
|
|
||||||
import logging
|
import logging
|
||||||
import shutil
|
import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
import chevron
|
||||||
|
import bbcode
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger("ArchiveGenerator")
|
logger = logging.getLogger("ArchiveGenerator")
|
||||||
|
|
||||||
@ -16,7 +18,11 @@ def prepare_thread (thread):
|
|||||||
return thread
|
return thread
|
||||||
|
|
||||||
def prepare_post (post):
|
def prepare_post (post):
|
||||||
return prepare_thread(post)
|
post = prepare_thread(post)
|
||||||
|
|
||||||
|
parser = bbcode.Parser()
|
||||||
|
post['body'] = parser.format(post['body']).replace("<br />", "<br />")
|
||||||
|
return post
|
||||||
|
|
||||||
class ArchiveGenerator():
|
class ArchiveGenerator():
|
||||||
def __init__ (self, template_dir, static_dir):
|
def __init__ (self, template_dir, static_dir):
|
||||||
|
2
setup.py
2
setup.py
@ -8,7 +8,7 @@ setup(
|
|||||||
description='Tools for exporting and creating archives of Glitch City Labs data',
|
description='Tools for exporting and creating archives of Glitch City Labs data',
|
||||||
author='Adrian Kuschelyagi Malacoda',
|
author='Adrian Kuschelyagi Malacoda',
|
||||||
packages=['epilogue'],
|
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={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'epilogue = epilogue:main'
|
'epilogue = epilogue:main'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user