From 6dab09e611547e823ee4e06bd87a8ee9123e8978 Mon Sep 17 00:00:00 2001 From: endorphant Date: Sat, 30 Apr 2016 19:47:49 -0400 Subject: [PATCH] moving paths to point to user --- {www => bin/config}/style.css | 0 bin/core.py | 14 ++++++++++---- www/sample.html | 20 -------------------- 3 files changed, 10 insertions(+), 24 deletions(-) rename {www => bin/config}/style.css (100%) delete mode 100644 www/sample.html diff --git a/www/style.css b/bin/config/style.css similarity index 100% rename from www/style.css rename to bin/config/style.css diff --git a/bin/core.py b/bin/core.py index addee2e..8aa982a 100644 --- a/bin/core.py +++ b/bin/core.py @@ -2,10 +2,14 @@ import os -PATH = os.path.join("/home", "endorphant", "projects", "ttbp", "bin") -WWW = os.path.join(PATH, "..","www") +SOURCE = os.path.join("/home", "endorphant", "projects", "ttbp", "bin") +USER = os.path.basename(os.path.expanduser("~")) +PATH = os.path.join("/home", USER, ".ttbp") + +LIVE = "http://tilde.town/~" +WWW = os.path.join(PATH, "www") CONFIG = os.path.join(PATH, "config") -DATA = os.path.join(os.path.expanduser("~"), ".ttbp", "entries") +DATA = os.path.join(PATH, "entries") #DATA = os.path.join("..", "data") MONTHS = { @@ -32,7 +36,9 @@ for file in os.listdir(DATA): filename = os.path.join(DATA, file) if os.path.isfile(filename) and os.path.splitext(filename)[1] == ".txt": FILES.append(file) + print(file) +FILES.sort() FILES.reverse() print("found: "+str(FILES)) @@ -54,7 +60,7 @@ def write(outurl="default.html"): outfile.close() - return os.path.join(WWW, outurl) + return os.path.join(LIVE+USER,os.path.basename(os.path.realpath(WWW)),outurl) def write_entry(file): # dump given file into entry format, return as list of strings diff --git a/www/sample.html b/www/sample.html deleted file mode 100644 index effc1ad..0000000 --- a/www/sample.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - ~endorphant - - - -
-

~endorphant@tilde.town

-
- -
-



-
-
DD month YYYY
-

Feacby waeohaku aywoaeeo fepopo lyhili todepoae, taenga. Ypaogeni, ypnorani geahwaga diioanee aotrilco, aenoail. Oypo, weahipae kucogoyp fyeoim kyreeo? El godineng fengo aheoba himalidi trcoimao imypfe oaeha. In, trratr amlypoga cohitata macoipta? Ta, yeahta ahoyio, feanikre taneypel, bynekuim, enoyha. Adahilre, lylyno, aetaay aoimeo taquam toegeem? Rebyma maquag qunohi, fekyno fyniypdi. Eoaeby ikaeem goenkuao enacli, taliel agerhaza quema nonoimli. Ad amcory, aeypye raanaban lyaekuto coyega, adionige?

-
-
- -