Update index solution
This commit is contained in:
parent
9e07054277
commit
f133e83643
16 changed files with 325 additions and 180 deletions
33
.gitignore
vendored
33
.gitignore
vendored
|
|
@ -1 +1,34 @@
|
||||||
index.html
|
index.html
|
||||||
|
|
||||||
|
# General
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Icon must end with two \r
|
||||||
|
Icon
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
/.firebase/
|
||||||
|
/.firebaserc
|
||||||
|
/.idea/
|
||||||
|
/venv/
|
||||||
|
firebase.json
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ from PIL import Image
|
||||||
|
|
||||||
from distribusi.page_template import html_footer, html_head
|
from distribusi.page_template import html_footer, html_head
|
||||||
from distribusi.mappings import CODE_TYPES, FILE_TYPES, SUB_TYPES
|
from distribusi.mappings import CODE_TYPES, FILE_TYPES, SUB_TYPES
|
||||||
|
|
||||||
from distribusi import fregments
|
from distribusi import fregments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MIME_TYPE = magic.Magic(mime=True)
|
MIME_TYPE = magic.Magic(mime=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -59,8 +59,7 @@ def thumbnail(image, name, args):
|
||||||
return "<figure><a href='{}'><img src='{}'></a><figcaption>{}</figcaption></figure>".format(name, name, name)
|
return "<figure><a href='{}'><img src='{}'></a><figcaption>{}</figcaption></figure>".format(name, name, name)
|
||||||
|
|
||||||
|
|
||||||
def div(args, type_, subtype, tag, name):
|
def div(args, type_, subtype, tag, name, id):
|
||||||
id_name = name.split('.')[0].replace(' ', '_')
|
|
||||||
if args.no_filenames:
|
if args.no_filenames:
|
||||||
filename = ''
|
filename = ''
|
||||||
else:
|
else:
|
||||||
|
|
@ -74,8 +73,7 @@ def div(args, type_, subtype, tag, name):
|
||||||
html = '<div id="{}" class="{}">{}</div>'
|
html = '<div id="{}" class="{}">{}</div>'
|
||||||
else:
|
else:
|
||||||
html = '<div id="{}" class="{}">{}' + filename + '</div>'
|
html = '<div id="{}" class="{}">{}' + filename + '</div>'
|
||||||
|
return html.format(id, subtype, tag)
|
||||||
return html.format(id_name, subtype, tag)
|
|
||||||
|
|
||||||
|
|
||||||
def check_distribusi_index(args, index):
|
def check_distribusi_index(args, index):
|
||||||
|
|
@ -112,11 +110,7 @@ def write_index(args,index, html, html_head, html_footer):
|
||||||
f.write(html_footer)
|
f.write(html_footer)
|
||||||
|
|
||||||
|
|
||||||
def distribusify(args, directory): # noqa
|
def distribusify(args, directory, freg): # noqa
|
||||||
|
|
||||||
freg = fregments.Fregments()
|
|
||||||
freg.preindex(directory)
|
|
||||||
|
|
||||||
for root, dirs, files in os.walk(directory):
|
for root, dirs, files in os.walk(directory):
|
||||||
|
|
||||||
if args.exclude_directory:
|
if args.exclude_directory:
|
||||||
|
|
@ -146,7 +140,6 @@ def distribusify(args, directory): # noqa
|
||||||
print('Generating directory listing for', root)
|
print('Generating directory listing for', root)
|
||||||
|
|
||||||
for name in sorted(files):
|
for name in sorted(files):
|
||||||
|
|
||||||
if 'index.html' not in name:
|
if 'index.html' not in name:
|
||||||
full_path = os.path.join(root, name)
|
full_path = os.path.join(root, name)
|
||||||
mime = MIME_TYPE.from_file(full_path)
|
mime = MIME_TYPE.from_file(full_path)
|
||||||
|
|
@ -198,16 +191,9 @@ def distribusify(args, directory): # noqa
|
||||||
subtype = subtype + ' unkown-file'
|
subtype = subtype + ' unkown-file'
|
||||||
|
|
||||||
a = a.replace('{}', name)
|
a = a.replace('{}', name)
|
||||||
|
if len(path) == 3 and artist:
|
||||||
html.append(div(args, type_, subtype, a, name))
|
id = freg.get_index(artist, name)
|
||||||
|
html.append(div(args, type_, subtype, a, name, id))
|
||||||
#
|
|
||||||
# fregments index
|
|
||||||
# 작가 폴더 내부의 파일인 경우 조각 추가
|
|
||||||
#
|
|
||||||
#if len(path) == 3 and artist:
|
|
||||||
# id_name = name.split('.')[0].replace(' ', '_')
|
|
||||||
# freg.add(artist, id_name)
|
|
||||||
|
|
||||||
|
|
||||||
if root != directory:
|
if root != directory:
|
||||||
|
|
@ -225,13 +211,7 @@ def distribusify(args, directory): # noqa
|
||||||
|
|
||||||
html.insert(0, div(args, 'dir', 'dir', a, 'folder'))
|
html.insert(0, div(args, 'dir', 'dir', a, 'folder'))
|
||||||
'''
|
'''
|
||||||
#
|
|
||||||
# fregments index
|
|
||||||
# 작가 폴더 내부의 폴더인 경우 조각 추가
|
|
||||||
#
|
|
||||||
if len(path) == 3 and artist:
|
|
||||||
id_name = name.split('.')[0].replace(' ', '_')
|
|
||||||
freg.add(artist, id_name)
|
|
||||||
|
|
||||||
index = os.path.join(root, 'index.html')
|
index = os.path.join(root, 'index.html')
|
||||||
if os.path.exists(index):
|
if os.path.exists(index):
|
||||||
|
|
@ -251,21 +231,18 @@ def distribusify(args, directory): # noqa
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
|
def build_index(args, directory, freg):
|
||||||
#
|
#
|
||||||
# fregments index
|
# fregments index
|
||||||
# 임시 데이터 저장
|
# 임시 데이터 저장
|
||||||
#
|
#
|
||||||
print("-----------------------")
|
print("--------- Build main index --------------")
|
||||||
html = []
|
html = []
|
||||||
freg.save()
|
freg_data = freg.get_fregments()
|
||||||
json_data = freg.get_fregments()
|
for f in freg_data:
|
||||||
count = freg.get_count()
|
index = "{}".format(f.index)
|
||||||
for f in json_data:
|
url = "/{}/#{} ".format(f.artist, index.zfill(4))
|
||||||
file = f['file']
|
label = "{} 번째 조각".format(f.index)
|
||||||
url = "/{}/#{} ".format(file['artist'], file['fregment'])
|
|
||||||
label = "{} 번째 조각".format(count)
|
|
||||||
html.append('<a href="{}">{}</a><br/>'.format(url, label))
|
html.append('<a href="{}">{}</a><br/>'.format(url, label))
|
||||||
count = count - 1
|
|
||||||
|
|
||||||
index = os.path.join(directory, 'index.html')
|
index = os.path.join(directory, 'index.html')
|
||||||
write_index(args, index, html, html_head, html_footer)
|
write_index(args, index, html, html_head, html_footer)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import json
|
import json
|
||||||
import time
|
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,7 +21,7 @@ class Fregments:
|
||||||
self.index = {}
|
self.index = {}
|
||||||
self.indextable = []
|
self.indextable = []
|
||||||
self.timetable = []
|
self.timetable = []
|
||||||
self.events_dir = './events/'
|
|
||||||
self.config_file = 'config.json'
|
self.config_file = 'config.json'
|
||||||
self.index_file = 'fregments_index.json'
|
self.index_file = 'fregments_index.json'
|
||||||
|
|
||||||
|
|
@ -30,7 +29,7 @@ class Fregments:
|
||||||
self.json_data = json.load(json_file)
|
self.json_data = json.load(json_file)
|
||||||
|
|
||||||
self.temp_data = {"fregments":[]}
|
self.temp_data = {"fregments":[]}
|
||||||
self.count = len(self.json_data["fregments"])
|
self.count = len(self.json_data)
|
||||||
|
|
||||||
def creation_date(self, path_to_file):
|
def creation_date(self, path_to_file):
|
||||||
"""
|
"""
|
||||||
|
|
@ -56,7 +55,11 @@ class Fregments:
|
||||||
if occupation > -1:
|
if occupation > -1:
|
||||||
origin_path = os.path.join(directory, file)
|
origin_path = os.path.join(directory, file)
|
||||||
date = self.creation_date(origin_path)
|
date = self.creation_date(origin_path)
|
||||||
artist = directory.split("/")[2]
|
arr = directory.split("/")
|
||||||
|
if arr.__len__() == 2:
|
||||||
|
artist = arr[1]
|
||||||
|
else:
|
||||||
|
artist = arr[2]
|
||||||
self.index[occupation] = Fregment(occupation, date, directory, artist, file)
|
self.index[occupation] = Fregment(occupation, date, directory, artist, file)
|
||||||
|
|
||||||
def is_meta(self, file):
|
def is_meta(self, file):
|
||||||
|
|
@ -77,14 +80,14 @@ class Fregments:
|
||||||
|
|
||||||
def preindex(self, directory):
|
def preindex(self, directory):
|
||||||
for root, dirs, files in os.walk(directory):
|
for root, dirs, files in os.walk(directory):
|
||||||
if root == directory:
|
arr = root.split("/")
|
||||||
pass
|
# 2뎁스까지만 인덱스 함.
|
||||||
else:
|
if arr.__len__() < 4:
|
||||||
# files index
|
# files index
|
||||||
for f in files:
|
for f in files:
|
||||||
if self.is_meta(f):
|
if self.is_meta(f):
|
||||||
pass
|
pass
|
||||||
elif f == "index.html":
|
elif f == "index.html" or f == ".DS_Store":
|
||||||
pass
|
pass
|
||||||
elif self.has_meta(root, f):
|
elif self.has_meta(root, f):
|
||||||
self.occupancy(root, f)
|
self.occupancy(root, f)
|
||||||
|
|
@ -97,15 +100,15 @@ class Fregments:
|
||||||
else:
|
else:
|
||||||
self.add_timetable(root, d)
|
self.add_timetable(root, d)
|
||||||
|
|
||||||
|
def postindex(self):
|
||||||
self.timetable = sorted(self.timetable, key=lambda fregment: fregment.update)
|
self.timetable = sorted(self.timetable, key=lambda fregment: fregment.update)
|
||||||
print("----------- INDEXING ------------")
|
print("----------- INDEXING ------------")
|
||||||
# indexing
|
# indexing
|
||||||
for f in self.timetable:
|
for f in self.timetable:
|
||||||
f.index = self.get_lastindex()
|
f.index = self.get_lastindex()
|
||||||
self.index[f.index] = f
|
self.index[f.index] = f
|
||||||
|
|
||||||
self.update_indextable()
|
self.update_indextable()
|
||||||
print(self.indextable)
|
self.save()
|
||||||
|
|
||||||
def update_indextable(self):
|
def update_indextable(self):
|
||||||
self.indextable = []
|
self.indextable = []
|
||||||
|
|
@ -124,9 +127,13 @@ class Fregments:
|
||||||
def add_timetable(self, directory, file):
|
def add_timetable(self, directory, file):
|
||||||
path = os.path.join(directory, file)
|
path = os.path.join(directory, file)
|
||||||
date = self.creation_date(path)
|
date = self.creation_date(path)
|
||||||
artist = directory.split("/")[2]
|
arr = directory.split("/")
|
||||||
|
if arr.__len__() > 2:
|
||||||
|
artist = arr[2]
|
||||||
self.timetable.append(Fregment(-1, date, directory, artist, file))
|
self.timetable.append(Fregment(-1, date, directory, artist, file))
|
||||||
|
|
||||||
|
'''
|
||||||
|
# [deprecated] preindex 하기 전 소소
|
||||||
def add(self, artist, fregment):
|
def add(self, artist, fregment):
|
||||||
temp = {
|
temp = {
|
||||||
"index" : 0,
|
"index" : 0,
|
||||||
|
|
@ -151,28 +158,30 @@ class Fregments:
|
||||||
temp["index"] = self.count
|
temp["index"] = self.count
|
||||||
temp["update"] = int(time.time())
|
temp["update"] = int(time.time())
|
||||||
self.temp_data['fregments'].append(temp)
|
self.temp_data['fregments'].append(temp)
|
||||||
|
'''
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
print(json.dumps(self.temp_data))
|
print(json.dumps(self.indextable, cls=CustomEncoder))
|
||||||
for f in self.temp_data['fregments']:
|
|
||||||
self.json_data['fregments'].append(f)
|
|
||||||
with open(self.index_file, 'w') as outfile:
|
with open(self.index_file, 'w') as outfile:
|
||||||
json.dump(self.json_data, outfile, indent=4)
|
json.dump(self.indextable, outfile, indent=4, cls=CustomEncoder)
|
||||||
self.count = len(self.json_data["fregments"])
|
self.count = len(self.indextable)
|
||||||
|
|
||||||
def get_fregments(self):
|
def get_fregments(self):
|
||||||
fregments = self.json_data['fregments']
|
return self.indextable
|
||||||
# reverse
|
|
||||||
fregments.sort(key = itemgetter('index'), reverse=True)
|
|
||||||
return fregments
|
|
||||||
|
|
||||||
def get_count(self):
|
def get_count(self):
|
||||||
return self.count
|
return self.count
|
||||||
|
|
||||||
def get_index(self):
|
def get_index(self, artist, name):
|
||||||
return 0;
|
for f in self.indextable:
|
||||||
|
if f.artist == artist and f.file == name:
|
||||||
|
return ("{}".format(f.index)).zfill(4)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
|
class CustomEncoder(json.JSONEncoder):
|
||||||
|
def default(self, o):
|
||||||
|
return {'__{}__'.format(o.__class__.__name__): o.__dict__}
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
freg = Fregments()
|
freg = Fregments()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,21 @@
|
||||||
# Added by Hyunchul
|
# Added by Hyunchul
|
||||||
# 2020. 10. 26
|
# 2020. 10. 26
|
||||||
from distribusi.cli import build_argparser, distribusify
|
from distribusi.cli import build_argparser, distribusify
|
||||||
|
from distribusi import fregments
|
||||||
|
from distribusi.distribusi import build_index
|
||||||
|
|
||||||
parser = build_argparser()
|
parser = build_argparser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
distribusify(args, args.directory)
|
|
||||||
|
event_path = './events'
|
||||||
|
data_path = './test_data'
|
||||||
|
|
||||||
|
freg = fregments.Fregments()
|
||||||
|
freg.preindex(event_path)
|
||||||
|
freg.preindex(data_path)
|
||||||
|
freg.postindex()
|
||||||
|
|
||||||
|
distribusify(args, event_path, freg)
|
||||||
|
distribusify(args, data_path, freg)
|
||||||
|
|
||||||
|
build_index(args, data_path, freg)
|
||||||
3
events/event_0000.meta
Normal file
3
events/event_0000.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"occupation": 0
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
3
events/event_0001.meta
Normal file
3
events/event_0001.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"occupation": 1
|
||||||
|
}
|
||||||
3
events/event_0008.meta
Normal file
3
events/event_0008.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"occupation": 8
|
||||||
|
}
|
||||||
|
|
@ -1,116 +1,218 @@
|
||||||
|
[
|
||||||
{
|
{
|
||||||
"fregments": [
|
"__Fregment__": {
|
||||||
|
"index": 0,
|
||||||
|
"update": 1605171358.9636276,
|
||||||
|
"directory": "./events",
|
||||||
|
"artist": "events",
|
||||||
|
"file": "event_0000"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
|
"__Fregment__": {
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"update": 1604054082,
|
"update": 1605171365.1618817,
|
||||||
"file": {
|
"directory": "./events",
|
||||||
"artist": "carrot",
|
"artist": "events",
|
||||||
"fregment": "RTF\ud14c\uc2a4\ud2b8"
|
"file": "event_0001"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"__Fregment__": {
|
||||||
"index": 2,
|
"index": 2,
|
||||||
"update": 1604054082,
|
"update": 1603870906.290785,
|
||||||
"file": {
|
"directory": "./test_data/carrot",
|
||||||
"artist": "carrot",
|
"artist": "carrot",
|
||||||
"fregment": "\uafb8\ubb3c\uafb8\ubb3c"
|
"file": "\uc9c8\uc8fc.mp4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"__Fregment__": {
|
||||||
"index": 3,
|
"index": 3,
|
||||||
"update": 1604054082,
|
"update": 1604043931.1111157,
|
||||||
"file": {
|
"directory": "./test_data/carrot",
|
||||||
"artist": "carrot",
|
"artist": "carrot",
|
||||||
"fregment": "\uc9c8\uc8fc"
|
"file": "RTF\ud14c\uc2a4\ud2b8.rtf"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"__Fregment__": {
|
||||||
"index": 4,
|
"index": 4,
|
||||||
"update": 1604054082,
|
"update": 1604043931.1281314,
|
||||||
"file": {
|
"directory": "./test_data/carrot",
|
||||||
"artist": "fig",
|
|
||||||
"fregment": "test"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 5,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "fig",
|
|
||||||
"fregment": "20201020"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 6,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "fig",
|
|
||||||
"fregment": "20201022"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 7,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "fig",
|
|
||||||
"fregment": "20201029"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 8,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "grape",
|
|
||||||
"fregment": "IMG_1334"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 9,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "grape",
|
|
||||||
"fregment": "IMG_1340"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 10,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "grape",
|
|
||||||
"fregment": "IMG_1690"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 11,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "grape",
|
|
||||||
"fregment": "IMG_1693"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 12,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "grape",
|
|
||||||
"fregment": "fbdbdbf54d766dd86e5964de01ddc16b"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 13,
|
|
||||||
"update": 1604054082,
|
|
||||||
"file": {
|
|
||||||
"artist": "grape",
|
|
||||||
"fregment": "sample"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 14,
|
|
||||||
"update": 1604054149,
|
|
||||||
"file": {
|
|
||||||
"artist": "carrot",
|
"artist": "carrot",
|
||||||
"fregment": "1030"
|
"file": "\uafb8\ubb3c\uafb8\ubb3c.mov"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 5,
|
||||||
|
"update": 1604043931.147918,
|
||||||
|
"directory": "./test_data/fig",
|
||||||
|
"artist": "fig",
|
||||||
|
"file": "20201022"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 6,
|
||||||
|
"update": 1604043931.1488578,
|
||||||
|
"directory": "./test_data/fig",
|
||||||
|
"artist": "fig",
|
||||||
|
"file": "20201029"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 7,
|
||||||
|
"update": 1604043931.238141,
|
||||||
|
"directory": "./test_data/grape",
|
||||||
|
"artist": "grape",
|
||||||
|
"file": "IMG_1334.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 8,
|
||||||
|
"update": 1605171377.7292128,
|
||||||
|
"directory": "./events",
|
||||||
|
"artist": "events",
|
||||||
|
"file": "event_0008"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 9,
|
||||||
|
"update": 1604043931.259867,
|
||||||
|
"directory": "./test_data/grape",
|
||||||
|
"artist": "grape",
|
||||||
|
"file": "IMG_1340.jpg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 10,
|
||||||
|
"update": 1604043931.3548143,
|
||||||
|
"directory": "./test_data/grape",
|
||||||
|
"artist": "grape",
|
||||||
|
"file": "IMG_1690.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 11,
|
||||||
|
"update": 1604043931.4324255,
|
||||||
|
"directory": "./test_data/grape",
|
||||||
|
"artist": "grape",
|
||||||
|
"file": "IMG_1693.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 12,
|
||||||
|
"update": 1604043931.4409137,
|
||||||
|
"directory": "./test_data/grape",
|
||||||
|
"artist": "grape",
|
||||||
|
"file": "sample.pdf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 13,
|
||||||
|
"update": 1604050831.3844233,
|
||||||
|
"directory": "./test_data/fig",
|
||||||
|
"artist": "fig",
|
||||||
|
"file": "test.txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 14,
|
||||||
|
"update": 1604053581.7941525,
|
||||||
|
"directory": "./test_data/grape",
|
||||||
|
"artist": "grape",
|
||||||
|
"file": "fbdbdbf54d766dd86e5964de01ddc16b.jpg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 15,
|
||||||
|
"update": 1604054141.7061436,
|
||||||
|
"directory": "./test_data/carrot",
|
||||||
|
"artist": "carrot",
|
||||||
|
"file": "1030.txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 16,
|
||||||
|
"update": 1604911149.3638797,
|
||||||
|
"directory": "./test_data/fig",
|
||||||
|
"artist": "fig",
|
||||||
|
"file": "test001.txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 17,
|
||||||
|
"update": 1604912196.730964,
|
||||||
|
"directory": "./test_data/carrot",
|
||||||
|
"artist": "carrot",
|
||||||
|
"file": "test002.txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 18,
|
||||||
|
"update": 1604912200.5855331,
|
||||||
|
"directory": "./test_data/carrot",
|
||||||
|
"artist": "carrot",
|
||||||
|
"file": "test_folder"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 19,
|
||||||
|
"update": 1604915491.9132912,
|
||||||
|
"directory": "./test_data/fig",
|
||||||
|
"artist": "fig",
|
||||||
|
"file": "20201020"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 20,
|
||||||
|
"update": 1604915593.2194371,
|
||||||
|
"directory": "./test_data/fig",
|
||||||
|
"artist": "fig",
|
||||||
|
"file": "fig002.txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 21,
|
||||||
|
"update": 1605170712.9904313,
|
||||||
|
"directory": "./events/event_0000",
|
||||||
|
"artist": "event_0000",
|
||||||
|
"file": "124469821_121248626457919_479957910997498417_n.jpg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 22,
|
||||||
|
"update": 1605170736.042438,
|
||||||
|
"directory": "./events/event_0000",
|
||||||
|
"artist": "event_0000",
|
||||||
|
"file": "124157237_121248643124584_872058020963845448_n.jpg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__Fregment__": {
|
||||||
|
"index": 23,
|
||||||
|
"update": 1605170741.7326746,
|
||||||
|
"directory": "./events/event_0000",
|
||||||
|
"artist": "event_0000",
|
||||||
|
"file": "124476076_121248659791249_2342598949363915450_n.jpg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
2
test.sh
Normal file → Executable file
2
test.sh
Normal file → Executable file
|
|
@ -15,5 +15,5 @@
|
||||||
# distribusi, use at own risk!
|
# distribusi, use at own risk!
|
||||||
# --no-hidden Exclude hidden directories
|
# --no-hidden Exclude hidden directories
|
||||||
# --menu-with-index Append index.html to menu items to aid navigation
|
# --menu-with-index Append index.html to menu items to aid navigation
|
||||||
conda activate foh
|
|
||||||
python distribusi/test.py -d ./test_data/
|
python distribusi/test.py -d ./test_data/
|
||||||
0
test_data/carrot/test002.txt
Normal file
0
test_data/carrot/test002.txt
Normal file
|
|
@ -1,2 +1,3 @@
|
||||||
언론·출판에 대한 허가나 검열과 집회·결사에 대한 허가는 인정되지 아니한다. 모든 국민은 헌법과 법률이 정한 법관에 의하여 법률에 의한 재판을 받을 권리를 가진다.
|
언론·출판에 대한 허가나 검열과 집회·결사에 대한 허가는 인정되지 아니한다. 모든 국민은 헌법과 법률이 정한 법관에 의하여 법률에 의한 재판을 받을 권리를 가진다.
|
||||||
대통령은 내우·외환·천재·지변 또는 중대한 재정·경제상의 위기에 있어서 국가의 안전보장 또는 공공의 안녕질서를 유지하기 위하여 긴급한 조치가 필요하고 국회의 집회를 기다릴 여유가 없을 때에 한하여 최소한으로 필요한 재정·경제상의 처분을 하거나 이에 관하여 법률의 효력을 가지는 명령을 발할 수 있다.
|
대통령은 내우·외환·천재·지변 또는 중대한 재정·경제상의 위기에 있어서 국가의 안전보장 또는 공공의 안녕질서를 유지하기 위하여 긴급한 조치가 필요하고 국회의 집회를 기다릴 여유가 없을 때에 한하여 최소한으로 필요한 재정·경제상의 처분을 하거나 이에 관하여 법률의 효력을 가지는 명령을 발할 수 있다.
|
||||||
|
새로운 글 업데이트
|
||||||
0
test_data/fig/fig002.txt
Normal file
0
test_data/fig/fig002.txt
Normal file
0
test_data/fig/test001.txt
Normal file
0
test_data/fig/test001.txt
Normal file
Loading…
Reference in a new issue