From 02b214b7905643cac55c7ae635ec07139feb5f98 Mon Sep 17 00:00:00 2001 From: Sina Mashek Date: Thu, 8 Feb 2018 15:03:09 +0200 Subject: [PATCH 1/4] Removed permalink inline-style, updated to style from style.css --- ttbp/config/defaults/style.css | 6 ++++++ ttbp/core.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ttbp/config/defaults/style.css b/ttbp/config/defaults/style.css index c14edc6..204eec7 100644 --- a/ttbp/config/defaults/style.css +++ b/ttbp/config/defaults/style.css @@ -28,6 +28,12 @@ body { padding: 1em; } +.entry p.permalink { + font-size: .6em; + font-color: #808080; + text-align: right; +} + .entry h5 { text-align: right; margin-top: .2em; diff --git a/ttbp/core.py b/ttbp/core.py index 381d726..6464acc 100644 --- a/ttbp/core.py +++ b/ttbp/core.py @@ -221,7 +221,7 @@ def write_entry(filename): # entry.append("

\n\t\t\t

") #entry.append("

\n") - entry.append("\t\t\t

permalink

\n") + entry.append("\t\t\t

permalink

\n") entry.append("\n\t\t\n") return entry From 782c86d66c861fefbcb507a95de0efdae1694caf Mon Sep 17 00:00:00 2001 From: Vincent Zeng Date: Sun, 11 Mar 2018 19:57:54 -0400 Subject: [PATCH 2/4] updating sinacutie's pr for permalink styling --- ttbp/config/__init__.py | 11 ++++++++++- ttbp/ttbp.py | 20 +++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ttbp/config/__init__.py b/ttbp/config/__init__.py index 495f874..5f0a731 100644 --- a/ttbp/config/__init__.py +++ b/ttbp/config/__init__.py @@ -153,5 +153,14 @@ version 0.9.3 features: non-public on posting; this option only really makes sense if you're already publishing to html/gopher, but is available either way! - you can find this option under 'settings' as 'post as nopub'.""" + you can find this option under 'settings' as 'post as nopub'.""", + "0.11.3": """ +~[version 0.11.3 update]~ + + * thanks to ~sinacutie, you can now set custom css for the permalink text + styling on your html page. the default permalink style has been added to + your current css file, and shouldn't change the appearance of your page. + + if you're not using custom css, don't worry about this!""" + } diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index ebaea39..b819003 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -50,7 +50,7 @@ from . import chatter from . import gopher from . import util -__version__ = "0.11.2" +__version__ = "0.11.3" __author__ = "endorphant ", "X", ""): From f117f6998f7d158f50d7be8a4c745e91510e3ffa Mon Sep 17 00:00:00 2001 From: Vincent Zeng Date: Sun, 11 Mar 2018 20:17:20 -0400 Subject: [PATCH 3/4] breaking out static text --- ttbp/config/__init__.py | 37 +++++++++++++++++++++++++++++++++- ttbp/ttbp.py | 44 ++++++++--------------------------------- 2 files changed, 44 insertions(+), 37 deletions(-) diff --git a/ttbp/config/__init__.py b/ttbp/config/__init__.py index 5f0a731..061ee07 100644 --- a/ttbp/config/__init__.py +++ b/ttbp/config/__init__.py @@ -1,6 +1,7 @@ from __future__ import absolute_import import os import sys +import time from .. import util @@ -82,10 +83,44 @@ ___________________________________________________________ | ____ ____ ____ _ ____ ____ _ _ ____ _ _ _ ____ | | |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ | | | |___ |___ |___ ___] |___ | \| |__] | | \| |___ | -| ver 0.11.2 (rainbows) | +| ver 0.11.3 (rainbows) | |__________________________________________________________| '''.lstrip() +## page texts + +credits = """ +ttbp was written for tilde.town by ~endorphant in python. the codebase is +publicly available on github at https://github.com/modgethanc/ttbp + +other contributors: + ~vilmibm, packaging help and gopher support + ~sanqui, the bug swatter + ~sinacutie, for css updates + +if you have ideas for ttbp, you are welcome to contact me to discuss them; +please send me tildemail or open a github issue. i am not a very experienced +developer, and ttbp is one of my first public-facing projects, so i appreciate +your patience while i learn how to be a better developer! + +i'd love to hear about your ideas and brainstorm about new features! + +thanks to everyone who reads, listens, writes, and feels.""" + +recording = """ +feels will be recorded for today, {today}. + +if you've already started recording feels for this day, you +can pick up where you left off. + +you can write your feels in plaintext, markdown, html, or a mixture of +these. + +press to begin recording your feels in your chosen text +editor. + +""".format(today=time.strftime("%d %B %Y")) + ## update announcements UPDATES = { diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index b819003..9b963f0 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -754,25 +754,7 @@ def show_credits(): prints author acknowledgements and commentary ''' - print(""" -ttbp was written for tilde.town by ~endorphant in python. the codebase is -publicly available on github at https://github.com/modgethanc/ttbp - -other contributors: - ~vilmibm, packaging help and gopher support - ~sanqui, the bug swatter - ~sinacutie, for css updates - -if you have ideas for ttbp, you are welcome to contact me to discuss them; -please send me tildemail or open a github issue. i am not a very experienced -developer, and ttbp is one of my first public-facing projects, so i appreciate -your patience while i learn how to be a better developer! - -i'd love to hear about your ideas and brainstorm about new features! - -thanks to everyone who reads, listens, writes, and feels.\ - """) - + print(config.credits) input("\n\npress to go back home.\n\n") redraw() @@ -785,19 +767,7 @@ def write_entry(entry=os.path.join(config.USER_DATA, "test.txt")): main feels-recording handler ''' - entered = input(""" -feels will be recorded for today, {today}. - -if you've already started recording feels for this day, you -can pick up where you left off. - -you can write your feels in plaintext, markdown, html, or a mixture of -these. - -press to begin recording your feels in your chosen text -editor. - -""".format(today=time.strftime("%d %B %Y"))) + entered = input(config.recording) if entered: entryFile = open(entry, "a") @@ -807,6 +777,8 @@ editor. left = "" + core.load_files() + if SETTINGS.get("post as nopub"): core.toggle_nopub(os.path.basename(entry)) else: @@ -821,7 +793,7 @@ editor. gopher.publish_gopher('feels', core.get_files()) left += " also posted to your ~/public_gopher!\n" - core.load_files() + #core.load_files() redraw(left + " thanks for sharing your feels!") return @@ -1108,14 +1080,14 @@ def select_publish_dir(): publishDir = os.path.join(config.PUBLIC, choice) while os.path.exists(publishDir): - second = input("\n"+publishDir+"""\ - already exists! + second = input(""" +{pDir} already exists! setting this as your publishing directory means this program may delete or overwrite file there! if you're sure you want to use it, hit to confirm. -otherwise, pick another location: """) +otherwise, pick another location: """.format(pDir=publishDir) if second == "": break From 807c077bf88ed33b1c9796824f52bdb29dacc189 Mon Sep 17 00:00:00 2001 From: Vincent Zeng Date: Sun, 11 Mar 2018 20:29:02 -0400 Subject: [PATCH 4/4] lol typo swatting --- ttbp/ttbp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index 9b963f0..79eef4b 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -1087,7 +1087,7 @@ setting this as your publishing directory means this program may delete or overwrite file there! if you're sure you want to use it, hit to confirm. -otherwise, pick another location: """.format(pDir=publishDir) +otherwise, pick another location: """.format(pDir=publishDir)) if second == "": break