Ethan Dalool
1c30ef5785
New frontends folder will hold all front-end interfaces for etiquette. Existing flask site moved here and refers to itself as a package with external launcher. etiquette_site renamed to etiquette_flask
27 lines
573 B
Python
27 lines
573 B
Python
# Use with
|
|
# py -i etiquette_easy.py
|
|
|
|
import etiquette.photodb
|
|
import os
|
|
import sys
|
|
P = etiquette.photodb.PhotoDB()
|
|
import traceback
|
|
|
|
def easytagger():
|
|
while True:
|
|
i = input('> ')
|
|
if i.startswith('?'):
|
|
i = i.split('?')[1] or None
|
|
try:
|
|
P.export_tags(specific_tag=i)
|
|
except:
|
|
traceback.print_exc()
|
|
else:
|
|
P.easybake(i)
|
|
|
|
def photag(photoid):
|
|
photo = P.get_photo_by_id(photoid)
|
|
print(photo.tags())
|
|
while True:
|
|
photo.add_tag(input('> '))
|
|
get=P.get_tag
|