2DU 8 years ago
parent
commit
47666022a3
4 changed files with 262 additions and 155 deletions
  1. 224 153
      app.py
  2. 30 0
      func.py
  3. 6 1
      update_mysql.py
  4. 2 1
      version.md

File diff suppressed because it is too large
+ 224 - 153
app.py


+ 30 - 0
func.py

@@ -24,6 +24,36 @@ app = beaker.middleware.SessionMiddleware(app(), session_opts)
 
 
 from mark import *
 from mark import *
 
 
+def wiki_set(num):
+    if(num == 1):
+        curs.execute('select data from other where name = ?', ['name'])
+        data = curs.fetchall()
+        if(data):
+            return(data[0][0])
+        else:
+            return('wiki')
+    elif(num == 2):
+        curs.execute('select data from other where name = "frontpage"')
+        data = curs.fetchall()
+        if(data):
+            return(data[0][0])
+        else:
+            return('위키:대문')
+    elif(num == 3):
+        curs.execute('select data from other where name = "license"')
+        data = curs.fetchall()
+        if(data):
+            return(data[0][0])
+        else:
+            return('CC 0')
+    elif(num == 4):
+        curs.execute('select data from other where name = "upload"')
+        data = curs.fetchall()
+        if(data):
+            return(data[0][0])
+        else:
+            return('2')
+
 def diff(seqm):
 def diff(seqm):
     output= []
     output= []
     for opcode, a0, a1, b0, b1 in seqm.get_opcodes():
     for opcode, a0, a1, b0, b1 in seqm.get_opcodes():

+ 6 - 1
update_mysql.py

@@ -17,7 +17,7 @@ conn = pymysql.connect(
 )
 )
 curs = conn.cursor(pymysql.cursors.DictCursor)   
 curs = conn.cursor(pymysql.cursors.DictCursor)   
 
 
-r_ver = '2.2.1'
+r_ver = '2.2.2'
 
 
 curs2.execute("create table data(title text, data text, acl text)")
 curs2.execute("create table data(title text, data text, acl text)")
 curs2.execute("create table history(id text, title text, data text, date text, ip text, send text, leng text)")
 curs2.execute("create table history(id text, title text, data text, date text, ip text, send text, leng text)")
@@ -38,6 +38,11 @@ curs2.execute("create table alist(name text, acl text)")
 
 
 curs2.execute("insert into other (name, data) values ('version', ?)", [r_ver])
 curs2.execute("insert into other (name, data) values ('version', ?)", [r_ver])
 
 
+curs2.execute('insert into other (name, data) values ("name", ?)', [set_data['name']])
+curs2.execute('insert into other (name, data) values ("frontpage", ?)', [set_data['frontpage']])
+curs2.execute('insert into other (name, data) values ("license", ?)', [set_data['license']])
+curs2.execute('insert into other (name, data) values ("upload", ?)', [set_data['upload']])
+
 conn2.commit()
 conn2.commit()
 
 
 curs.execute("select * from data")
 curs.execute("select * from data")

+ 2 - 1
version.md

@@ -97,6 +97,7 @@
 
 
 ## 2.2 (SQLite) (진행)
 ## 2.2 (SQLite) (진행)
  * SQLite로 DB 변경
  * SQLite로 DB 변경
+ * set.json 대부분 위키 내부로 이전
 
 
 ## 계속
 ## 계속
  * 버그 수정
  * 버그 수정
@@ -121,7 +122,7 @@
 
 
 ----
 ----
 ## 기타
 ## 기타
- * 최신 버전 - v2.2.1
+ * 최신 버전 - v2.2.2
 
 
 ----
 ----
 ## 개발 이념
 ## 개발 이념

Some files were not shown because too many files changed in this diff