Giter Site home page Giter Site logo

satsukita-andon.com's Introduction

行灯職人への道 - satsukita-andon.com

logo

http://satsukita-andon.com

行灯職人への道 (satsukita-andon.com) is a website to record and support andon-gyoretsu (行灯行列), which is one of the most exciting events of Sapporo-Kita High School (札幌北高校).

Requirements

  • play-2.1.5
  • java-1.7
    • if you want to change java's version, use update-java-alternatives
  • ImageMagick (mogrify command)
  • Twitter app
    • cp twitter4j.properties.example twitter4j.properties and edit it
      • consumer key
      • consumer secret
      • access token
      • access token secret
  • h2.jar (http://www.h2database.com/html/download.html)
    • checked with h2-1.3.*.jar
    • put this binary to /db directory with the name h2.jar
  • Elasticsearch-1.5
  • Notifier Setting Up
    • cp conf/notifier.conf.example conf/notifier.conf and edit it

Usage of andon command

andon is a convenient command for (start|stop|restart|backup|restore) this application.

Usage: andon (start|stop|restart|backup|restore)

  • start
    • starts the application
    • to detach, type Ctrl-D
  • stop
    • stops the application
  • restart
    • restarts the application with a little down time (about 10 seconds)
  • backup
    • takes backup of the contents of files directory and the DB contents
    • automatically restarts the application with a little down time (about 30 seconds)
    • h2.jar is needed
    • backup files will be in backup directory
      • e.g., 2014-08-03.tar.gz (files directory) and 2014-08-03.sql (DB records)
      • you should move (or send) these files into backup storage
  • restore
    • restores backup files
    • down time is about 1 minute.
    • current contents will be deleted! be careful!
    • to restore to 2014-08-05, run ./andon restore 2014-08-05
      • backup/2014-08-05.tar.gz, backup/2014-08-05.sql and db/h2.jar are needed

If you want to change port-number, edit andon file and change port variable to another number.

Branches

Development

Use play run instead of ./andon start.

If you want to insert initial data, add the following code.

(app/Global.scala)

...

object Global extends GlobalSettings {

  override def onStart(app: Application) {
    ...
    InitialData.insert
    ...
  }

  ...

}

...

object InitialData {
  ...
  def insert = DB.db.withSession { implicit session: Session =>
    Accounts.create("開発者", "developer", "password", OrdInt(60), Admin)
  }
}

Deployment

% git clone [email protected]:amutake/satsukita-andon.com.git
% cd satsukita-andon.com
% git submodule init
% git submodule update
% ./andon start

Fonts

The font used in the logo is 祥南行書体.

Contributing

  1. Fork it (https://github.com/amutake/satsukita-andon.com/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

satsukita-andon.com's People

Contributors

amutake avatar

Stargazers

Kong TO avatar

Watchers

James Cloos avatar  avatar

Forkers

owlpenguin1023

satsukita-andon.com's Issues

隠しページ

隠しページ作りたい。管理人のぼやきみたいなの。すみずみまで見てくれた人しかみつけられないような。αβγさんのページみたいな。

相談所

いまのところ現役と双方向に関わるものがないのでそういうものを作った方がいいかもしれない

一時期あった相談所とか。

65th当日に向けて

  • ハッシュタグで検索したツイートをInfoTopに埋め込むと面白そう
    • "#kitakousai65th OR #andon65th OR #北高祭65th" とかで検索したものを埋め込み
  • 人気投票

権限の見直し

執筆者も講評とかタグ付けとかしたい

というか執筆者っているのか

ClassId

case class ClassId(times: OrdInt, grade: Int, classn: Int) 

object ClassId {
  def toId(cId: ClassId): Int = {
    ...
  }
  def fromId(id: Int): ClassId = {
    ...
  }
}

とか作ったらいろいろ楽になりそう

権限を細かく

開発者、管理人、執筆者という分け方ではなく、「できること」、例えば記事を投稿できるとか、他人の作った記事を編集できる、とかで分けるようにしたい。

[Gallery]検索機能

色、動物、炎、とかでタグ付けして検索できるようになったら便利

タグ付けが面倒

backup script

/files とDBのバックアップ(スナップショット?)を同時にとって保存したい

update のときに SlickException

SlickException: A query for an UPDATE statement must resolve to a comprehension with a single table -- Unsupported shape: Comprehension(fetch = None, offset = None)]] がでる。

再現条件は不明。

query.filter(_.id === id).update(data)

val q = for { c <- ClassData if c.id === id } yield c
q.update(data)

とかにすれば直る。

Twitter連携

記事の更新・コメントの投稿などが起こったときに、ツイートするbotがあれば便利

Blog風のものを作る

旧行灯職人への道のトップに表示されていた管理人の一言や雑感などをBlog形式で表現してはどうか

人気投票

昔は人気投票とかもやってたみたい

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.