├── .github └── CONTRIBUTING.md ├── .gitignore ├── LICENSE ├── README.html ├── README.md ├── changelog.txt ├── doc ├── manual.html └── manual.md ├── screenshots ├── ttbp-compose.png ├── ttbp-entries.png └── ttbp-main.png ├── setup.py └── ttbp ├── __init__.py ├── chatter.py ├── config ├── __init__.py ├── banner-beta.txt └── defaults │ ├── footer.txt │ ├── header.txt │ └── style.css ├── core.py ├── gopher.py ├── ttbp.py ├── update.py └── util.py /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING GUIDELINES FOR TTBP 2 | 3 | Hi! Thanks for your interest in working on this project with me! 4 | 5 | Please understand that this may not be a beginner-friendly project to contribute 6 | to; this is because I am not a very experienced developer, and I'm still 7 | learning good practices for facilitating collaborative dev work. I'm open to 8 | receiving feedback and discussion even if you're new to writing Python, 9 | programming, or collaborative work in general, but I'd appreciate some extra 10 | patience and open communication. 11 | 12 | In general, please try to give me a heads up if you're intending to work on this 13 | codebase before either starting on it or submitting a PR. I'm fairly 14 | self-conscious about my code, so I want the best opportunity for respectful 15 | engagement, which lets me learn from my mistakes while still providing good 16 | software for end users. 17 | 18 | If you do not have the skills to contribute to the coding end, I still welcome 19 | your feedback about your experience using ttbp; please feel free to contact me 20 | with anything from vague appreciation to gripes about the interface! I'm 21 | interested in understanding how you feel about this program, and any information 22 | you give me will help me build a smoother tool for everyone! The ["feedback 23 | wanted"](https://github.com/modgethanc/ttbp/issues?q=is%3Aissue+is%3Aopen+label%3A"feedback+wanted") 24 | tag is a great place to start. 25 | 26 | ## Contacting Me 27 | 28 | You can send me tildemail at ~endorphant on tilde.town, or catch me in IRC 29 | (please send me a PM there, since I don't often monitor the main channel). I 30 | might not respond for a few days; this is normal! If you're feeling ignored, 31 | please feel free to open an issue in this repo, since that will ping my personal 32 | email directly, and we can catch up then. 33 | 34 | ## Bugs 35 | 36 | If you find a bug (such as: ttbp crashed while you were running it, an 37 | unexpected behavior happened, some parts of the interface don't line up 38 | correctly, etc.), please feel free to file an issue with this repo. You can also 39 | send me tildemail. Be as descriptive as possible! Describe the last few things 40 | that happened, if you remember them, and attach some representation of the bug 41 | (copy and paste the terminal output, or take a screenshot). 42 | 43 | If you can fix a bug that you found, please document the bug first by opening an 44 | issue, and check in with me before you start working on it. If there's a serious 45 | use-breaking bug in the current live code, and I'm unreachable for more than a 46 | few days, go ahead and fix it and send a PR, and I'll get to it when I can. 47 | 48 | ## Features 49 | 50 | Features that I intend to implement are often documented under ["upcoming 51 | features"](https://github.com/modgethanc/ttbp/issues?q=is%3Aissue+is%3Aopen+label%3A"upcoming+features") 52 | in the issue tracker. Feel free to weigh in on any features listed there! 53 | 54 | If there's a feature you'd like to see, but it isn't listed as upcoming, please 55 | check the list of issues and see if it's been discussed before (including in 56 | [closed 57 | issues](https://github.com/modgethanc/ttbp/issues?q=is%3Aissue+is%3Aclosed)). 58 | You're welcome to open a new issue if it seems like there isn't any history 59 | about your idea, and you can also send me tildemail to ask me about it. 60 | 61 | Please do not start coding new features without discussing your ideas with me 62 | first. I have some fairly strong ideas about how ttbp should work, and I don't 63 | want anyone to waste their time building new features that don't align with my 64 | vision for this project. That said, I'm definitely interested in hearing your 65 | ideas, and I'll do my best to communicate my philosophy regardless of if I 66 | greenlight your feature or not. 67 | 68 | ## Cosmetic Changes 69 | 70 | Please do not open PRs for cosmetic changes to the codebase if we haven't had a 71 | prior discussion about it. Cosmetic changes include things like whitespace, 72 | commenting/documentation, naming conventions, and other aspects of the codebase 73 | that would not affect end users if changed. I am cautiously open to receiving 74 | respectful feedback about my general coding style, but I'm not generally 75 | interested in unsolicited style critiques, or for coding conventions dictated to 76 | me. Thank you in advance for your understanding! 77 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.swp 3 | *.egg-info 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 endorphant@tilde.town 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.html: -------------------------------------------------------------------------------- 1 |
a command-line based blogging platform running on tilde.town
2 | 3 |ttbp
stands for “tilde.town blogging platform”, the original working name for
4 | this project.
ttbp
runs from the command line, providing a hub for writing personal blog
13 | posts and reading posts written by other users of tilde.town. it’s a little bit
14 | like livejournal or dreamwidth or tumblr. you can opt to publish your posts to a
15 | public html file hosted on your tilde page, to tilde.town’s gopher server, or
16 | keep all your entries private to the tilde.town server.
to use, run feels
while logged in to tilde.town
this is a project that runs on tilde.town, so all users of this program are 21 | expected to operate under the tilde.town code of 22 | conduct. content/personal issues should be 23 | worked out according to the CoC, with support from the administrative 24 | team if needed.
25 | 26 |no coding or html experience is necessary to get started. just log in to your 29 | tilde.town account and enter:
30 | 31 |feels
ttbp will ask you a few questions to get you started. after that, writing and 34 | reading entries all happen within the program.
35 | 36 |that’s it!
37 | 38 |if you’re having trouble getting started, or run into program errors or strange 41 | behavior, please send internal tilde.town mail to ~endorphant and i’ll try to 42 | sort things out!
43 | 44 |there’s also a function from the main menu that lets you send feedback/inquiries 45 | to me directly; this uses internal tilde.town mail, which is what i’ll respond 46 | to.
47 | 48 |entries are recorded as plaintext files in your ~/.ttbp/entries
directory.
51 | ttbp
will use your selected editor to open and write files; each day is its
52 | own entry, like a diary page. at midnight for whatever timezone you’ve set for
53 | your user account on tilde.town, you’ll get a fresh entry. if you don’t write
54 | any feels on a particular day, no entries will show up there.
when you save and quit the text editor, your entry will automatically propagate
57 | to the global feels list; if you’ve opted to publish your feels to html/gopher,
58 | those files will update immediately. you can always go back to the current day’s
59 | entry and edit/add as you’d like, but older entries will not be available for
60 | editing from ttbp
.
(since files are just stored as plaintext in your directory, it’s possible to 63 | edit and move old entries directly from the command line. however, changing old 64 | entries might cause strange things to happen with timestamps. the main program 65 | looks at the filename first for setting the date, then the last modified time to 66 | sort recent posts. it expects YYYMMDD.txt as the filename; anything else won’t 67 | show up as a valid entry. yes, this means you can post things out of date order 68 | by creating files with any date you want.)
69 | 70 |<!-- comments -->
to have them show up
76 | in the feed but not render in a browser (but people can still read
77 | them with view-source)the browse global feels
feature shows the ten most recent entries that anyone
84 | has written on ttbp. this list is only accessible from within tilde.town,
85 | although individual entries may be posted to html or gopher.
you can also pull up a list of a single user’s feels through check out your
88 | neighbors
, which displays all users who are writing on ttbp
based on their
89 | most recently updated entry, and a link to their public html blog if they’ve
90 | opted to publish their posts.
please note! entries written on ttbp
should be considered sensitive,
93 | private information, even if a particular user is publishing entries in a
94 | world-viewable way! please be respectful about having access to other people’s
95 | feels, and do not copy/repeat any information without getting their explicit
96 | permission. tilde.town operates on a high level of mutual trust, and ttbp
is
97 | designed to give individuals control over their content.
the visit your subscriptions
feature lets you view recent entries from a list
102 | of users you’ve subscribed to, as well as manage your subscription list. your
103 | list is saved to ~/.ttbp/config/subs
, which gets automatically updated when
104 | you add or remove subscriptions from ttbp.
your subscription list is private; this means no one other than you can see who 107 | you’re following. subscription view only shows the 50 most recent entries from 108 | your subscribe list; if you want to see more entries from an individual, you 109 | can navigate to their entries in `check out your neighbors from the main 110 | menu.
111 | 112 |when you start your ttbp, you have the option of publishing or not publishing 115 | your blog.
116 | 117 |if you opt to not publish, your entires will never be accessible from outside of
118 | the tilde.town network; other tilde.town users will still be able to read your
119 | entries through the ttbp interface, or by directly accessing your
120 | ~/.ttbp/entries
directory.
if you want to further protect your entries, you can chmod 700
your entries
123 | directory.
if you opt to publish, the program creates a directory ~/.ttbp/www
where it
126 | stores all html files it generates, and symlinks this from your ~/public_html
127 | with your chosen blog directory. your blog will also be listed on the main ttbp
128 | page.
you can also opt to publish to gopher, and the program will automatically 131 | generate a gophermap of your feels.
132 | 133 |you can set publishing status on individual entries, or bury individual feels; 134 | see “data management” below for details.
135 | 136 |the manage your feels
menu provides several tools for organizing your feels.
139 | these are all actions you can perform manually from the command line, but doing
140 | them from within the program can help keep your files properly linked up.
(nopub)
will not get written to html or gopher,
147 | and toggling them from this menu will immediately publish or unpublish
148 | that entry (if you’re not publishing your posts at all, these settings
149 | won’t matter, since your feels will never show up outside of tilde.town)~/.ttbp/backups/
with the current date, and a second copy to
152 | your home directory for safekeeping.~/.ttbp/backups
directory for archives, and
155 | expects a file created by the above backup utility. if it detects any file
156 | collisions, it will preserve your current live copy and leave the backup
157 | verison in a temp directory, and notify you that this happened. also, any
158 | entries that were previously marked as (nopub)
will retain their nopub
159 | status.~/.ttbp/buried
(and marked with a unique timestamp to prevent
162 | file collision) with permissions set to 600, meaning no one except you
163 | will be able to open that file. these entries are also hidden from your
164 | own view from read over feels
, and you’ll have to open the files from
165 | the command line if you want to see them. this is intended to be a
166 | permament action, so you’ll be asked to type the entry date once to load
167 | the feel, then shown a preview of that feel, and then type the date again
168 | to confirm burying.~/.ttbp
directory. any backups that you have in ~/.ttbp/backups
181 | will also be deleted with this action (which is why the backup function
182 | makes a second copy for safekeeping in your home directory). you will no
183 | longer show up in any lists as a user.the settings menu lets you change specific options for handling your feels and 190 | using the interface.
191 | 192 |public_html
where feels will be
198 | published (if you’re not publishing your feels, this defaults to None
)you can modify how your blog looks by editing the stylesheet or header and 208 | footer files. the program sets you up with basic default. if you break your page 209 | somehow, you can force the program to regenerate your configuration by deleting 210 | your ~/.ttbp directory entirely. you might want to back up your 211 | ~/.ttbp/entries directory before you do this.
212 | 213 |these are a few ideas being kicked around, or under active development:
241 | 242 |less
)other ideas are listed on github as 250 | upcoming features or feature requests!
251 | 252 |(this section is only relevant if you plan on forking the repo and running an 255 | instance of this yourself)
256 | 257 | 262 | 263 | 264 |please check out my contributor 267 | guidelines 268 | on github if you’d like to get involved with development!
269 | 270 |if you find any bugs or strange behavior, please message me locally on tildemail 271 | or open a github issue and i’ll get back to you as soon as i can.
272 | 273 |if you’re interested in helping with the code, please drop me some tildemail!
274 | 275 |i accept tips for development work on 276 | liberapay
277 | 278 |thanks to:
281 | 282 |ttbp
stands for "tilde.town blogging platform", the original working name for
3 | this project. the complete codebase is available on
4 | github.
ttbp
runs from the command line, providing a hub for writing personal blog
6 | posts and reading posts written by other users of tilde.town. it's a little bit
7 | like livejournal or dreamwidth or tumblr. you can opt to publish your posts to a
8 | public html file hosted on your tilde page, to tilde.town's gopher server, or
9 | keep all your entries private to the tilde.town server.
this is a project that runs on tilde.town, so all users of this program are 11 | expected to operate under the tilde.town code of 12 | conduct. content/personal issues should be 13 | worked out according to the CoC, with support from the administrative 14 | team if needed.
15 |if you're having trouble getting started, or run into program errors or strange 17 | behavior, please send internal tilde.town mail to ~endorphant and i'll try to 18 | sort things out!
19 |there's also a function from the main menu that lets you send feedback/inquiries 20 | to me directly; this uses internal tilde.town mail, which is what i'll respond 21 | to.
22 |entries are recorded as plaintext files in your ~/.ttbp/entries
directory.
24 | ttbp
will use your selected editor to open and write files; each day is its
25 | own entry, like a diary page. at midnight for whatever timezone you've set for
26 | your user account on tilde.town, you'll get a fresh entry. if you don't write
27 | any feels on a particular day, no entries will show up there.
when you save and quit the text editor, your entry will automatically propagate
29 | to the global feels list; if you've opted to publish your feels to html/gopher,
30 | those files will update immediately. you can always go back to the current day's
31 | entry and edit/add as you'd like, but older entries will not be available for
32 | editing from ttbp
.
(since files are just stored as plaintext in your directory, it's possible to 34 | edit and move old entries directly from the command line. however, changing old 35 | entries might cause strange things to happen with timestamps. the main program 36 | looks at the filename first for setting the date, then the last modified time to 37 | sort recent posts. it expects YYYMMDD.txt as the filename; anything else won't 38 | show up as a valid entry. yes, this means you can post things out of date order 39 | by creating files with any date you want.)
40 |<!-- comments -->
to have them show up
45 | in the feed but not render in a browser (but people can still read them with
46 | view-source)the browse global feels
feature shows the ten most recent entries that anyone
50 | has written on ttbp. this list is only accessible from within tilde.town,
51 | although individual entries may be posted to html or gopher.
you can also pull up a list of a single user's feels through check out your
53 | neighbors
, which displays all users who are writing on ttbp
based on their
54 | most recently updated entry, and a link to their public html blog if they've
55 | opted to publish their posts.
please note! entries written on ttbp
should be considered sensitive,
57 | private information, even if a particular user is publishing entries in a
58 | world-viewable way! please be respectful about having access to other people's
59 | feels, and do not copy/repeat any information without getting their explicit
60 | permission. tilde.town operates on a high level of mutual trust, and ttbp
is
61 | designed to give individuals control over their content.
when you start your ttbp, you have the option of publishing or not publishing 64 | your blog.
65 |if you opt to not publish, your entires will never be accessible from outside of
66 | the tilde.town network; other tilde.town users will still be able to read your
67 | entries through the ttbp interface, or by directly accessing your
68 | ~/.ttbp/entries
directory.
if you want to further protect your entries, you can chmod 700
your entries
70 | directory.
if you opt to publish, the program creates a directory ~/.ttbp/www
where it
72 | stores all html files it generates, and symlinks this from your ~/public_html
73 | with your chosen blog directory. your blog will also be listed on the main ttbp
74 | page.
you can also opt to publish to gopher, and the program will automatically 76 | generate a gophermap of your feels.
77 |you can set publishing status on individual entries, or bury individual feels; 78 | see "data management" below for details.
79 |the manage your feels
menu provides several tools for organizing your feels.
81 | these are all actions you can perform manually from the command line, but doing
82 | them from within the program can help keep your files properly linked up.
(nopub)
will not get written to html or gopher,
88 | and toggling them from this menu will immediately publish or unpublish
89 | that entry (if you're not publishing your posts at all, these settings
90 | won't matter, since your feels will never show up outside of tilde.town)~/.ttbp/backups/
with the current date, and a second copy to
93 | your home directory for safekeeping.~/.ttbp/backups
directory for archives, and
96 | expects a file created by the above backup utility. if it detects any file
97 | collisions, it will preserve your current live copy and leave the backup
98 | verison in a temp directory, and notify you that this happened. also, any
99 | entries that were previously marked as (nopub)
will retain their nopub
100 | status.~/.ttbp/buried
(and marked with a unique timestamp to prevent
103 | file collision) with permissions set to 600, meaning no one except you
104 | will be able to open that file. these entries are also hidden from your
105 | own view from read over feels
, and you'll have to open the files from
106 | the command line if you want to see them. this is intended to be a
107 | permament action, so you'll be asked to type the entry date once to load
108 | the feel, then shown a preview of that feel, and then type the date again
109 | to confirm burying.~/.ttbp
directory. any backups that you have in ~/.ttbp/backups
122 | will also be deleted with this action (which is why the backup function
123 | makes a second copy for safekeeping in your home directory). you will no
124 | longer show up in any lists as a user.the settings menu lets you change specific options for handling your feels and 128 | using the interface.
129 |public_html
where feels will be
135 | published (if you're not publishing your feels, this defaults to None
)you can modify how your blog looks by editing the stylesheet or header and 142 | footer files. the program sets you up with basic default. if you break your page 143 | somehow, you can force the program to regenerate your configuration by deleting 144 | your ~/.ttbp directory entirely. you might want to back up your 145 | ~/.ttbp/entries directory before you do this.
146 |these are a few ideas being kicked around, or under active development:
164 |less
)other ideas are listed on github as 170 | upcoming features or feature requests!
-------------------------------------------------------------------------------- /doc/manual.md: -------------------------------------------------------------------------------- 1 | # FEELS MANUAL # 2 | 3 | `ttbp` stands for "tilde.town blogging platform", the original working name for 4 | this project. the complete codebase is available on 5 | [github](https://github.com/modgethanc/ttbp). 6 | 7 | `ttbp` runs from the command line, providing a hub for writing personal blog 8 | posts and reading posts written by other users of tilde.town. it's a little bit 9 | like livejournal or dreamwidth or tumblr. you can opt to publish your posts to a 10 | public html file hosted on your tilde page, to tilde.town's gopher server, or 11 | keep all your entries private to the tilde.town server. 12 | 13 | this is a project that runs on tilde.town, so all users of this program are 14 | expected to operate under the tilde.town [code of 15 | conduct](http://tilde.town/wiki/conduct.html). content/personal issues should be 16 | worked out according to the CoC, with support from the [administrative 17 | team](http://tilde.town/wiki/administration/index.html) if needed. 18 | 19 | ### support 20 | 21 | if you're having trouble getting started, or run into program errors or strange 22 | behavior, please send internal tilde.town mail to ~endorphant and i'll try to 23 | sort things out! 24 | 25 | there's also a function from the main menu that lets you send feedback/inquiries 26 | to me directly; this uses internal tilde.town mail, which is what i'll respond 27 | to. 28 | 29 | ### writing entries 30 | 31 | entries are recorded as plaintext files in your `~/.ttbp/entries` directory. 32 | `ttbp` will use your selected editor to open and write files; each day is its 33 | own entry, like a diary page. at midnight for whatever timezone you've set for 34 | your user account on tilde.town, you'll get a fresh entry. if you don't write 35 | any feels on a particular day, no entries will show up there. 36 | 37 | when you save and quit the text editor, your entry will automatically propagate 38 | to the global feels list; if you've opted to publish your feels to html/gopher, 39 | those files will update immediately. you can always go back to the current day's 40 | entry and edit/add as you'd like, but older entries will not be available for 41 | editing from `ttbp`. 42 | 43 | *(since files are just stored as plaintext in your directory, it's possible to 44 | edit and move old entries directly from the command line. however, changing old 45 | entries might cause strange things to happen with timestamps. the main program 46 | looks at the filename first for setting the date, then the last modified time to 47 | sort recent posts. it expects YYYMMDD.txt as the filename; anything else won't 48 | show up as a valid entry. yes, this means you can post things out of date order 49 | by creating files with any date you want.)* 50 | 51 | #### general entry-writing notes 52 | 53 | * you can use [markdown](https://daringfireball.net/projects/markdown/syntax) 54 | * you can use html 55 | * you can also put things between `` to have them show up 56 | in the feed but not render in a browser (but people can still read them with 57 | view-source) 58 | 59 | ### reading other feels 60 | 61 | the `browse global feels` feature shows the ten most recent entries that anyone 62 | has written on ttbp. this list is only accessible from within tilde.town, 63 | although individual entries may be posted to html or gopher. 64 | 65 | you can also pull up a list of a single user's feels through `check out your 66 | neighbors`, which displays all users who are writing on `ttbp` based on their 67 | most recently updated entry, and a link to their public html blog if they've 68 | opted to publish their posts. 69 | 70 | **please note!** entries written on `ttbp` should be considered sensitive, 71 | private information, even if a particular user is publishing entries in a 72 | world-viewable way! please be respectful about having access to other people's 73 | feels, and do not copy/repeat any information without getting their explicit 74 | permission. tilde.town operates on a high level of mutual trust, and `ttbp` is 75 | designed to give individuals control over their content. 76 | 77 | ### privacy 78 | 79 | when you start your ttbp, you have the option of publishing or not publishing 80 | your blog. 81 | 82 | if you opt to not publish, your entires will never be accessible from outside of 83 | the tilde.town network; other tilde.town users will still be able to read your 84 | entries through the ttbp interface, or by directly accessing your 85 | `~/.ttbp/entries` directory. 86 | 87 | if you want to further protect your entries, you can `chmod 700` your entries 88 | directory. 89 | 90 | if you opt to publish, the program creates a directory `~/.ttbp/www` where it 91 | stores all html files it generates, and symlinks this from your `~/public_html` 92 | with your chosen blog directory. your blog will also be listed on the [main ttbp 93 | page](https://tilde.town/~endorphant/ttbp). 94 | 95 | you can also opt to publish to gopher, and the program will automatically 96 | generate a gophermap of your feels. 97 | 98 | you can set publishing status on individual entries, or bury individual feels; 99 | see "data management" below for details. 100 | 101 | ### data management 102 | 103 | the `manage your feels` menu provides several tools for organizing your feels. 104 | these are all actions you can perform manually from the command line, but doing 105 | them from within the program can help keep your files properly linked up. 106 | 107 | * **read over feels**--a list of all your entries, which you can open and 108 | read like any other feel 109 | * **modify feels publishing**--this lets you toggle privacy on individual 110 | posts. entries marked `(nopub)` will not get written to html or gopher, 111 | and toggling them from this menu will immediately publish or unpublish 112 | that entry (if you're not publishing your posts at all, these settings 113 | won't matter, since your feels will never show up outside of tilde.town) 114 | * **backup your feels**--makes a .tar.gz of all your entries, saving one 115 | copy to `~/.ttbp/backups/` with the current date, and a second copy to 116 | your home directory for safekeeping. 117 | * **import a feels backup**--unpacks a backup file into your current feels 118 | list. this tool checks the `~/.ttbp/backups` directory for archives, and 119 | expects a file created by the above backup utility. if it detects any file 120 | collisions, it will preserve your current live copy and leave the backup 121 | verison in a temp directory, and notify you that this happened. also, any 122 | entries that were previously marked as `(nopub)` will retain their nopub 123 | status. 124 | * **bury some feels**--hides individual feels from viewing; entries are 125 | moved to `~/.ttbp/buried` (and marked with a unique timestamp to prevent 126 | file collision) with permissions set to 600, meaning no one except you 127 | will be able to open that file. these entries are also hidden from your 128 | own view from `read over feels`, and you'll have to open the files from 129 | the command line if you want to see them. this is intended to be a 130 | permament action, so you'll be asked to type the entry date once to load 131 | the feel, then shown a preview of that feel, and then type the date again 132 | to confirm burying. 133 | * **delete feels by day**--*permanently removes individual entries*, 134 | including deleting published html/gopher files if needed. this action is 135 | not recoverable, unless you have a backup to restore; you'll be asked to 136 | type the entry date once to load the feel, then shown a preview of that 137 | feel, and then type the date again to confirm deletion. 138 | * **purge all feels**--*permanently removes all feels*, including deleting 139 | all published html/gopher files if needed. this action is not recoverable, 140 | unless you have a backup to restore. you'll be asked to type a 141 | one-time-use purge code to confirm this action. 142 | * **wipe feels account**--*permanently removes all data associated with 143 | feels*, including deleting any published hmtl/gopher files and removing 144 | your `~/.ttbp` directory. any backups that you have in `~/.ttbp/backups` 145 | will also be deleted with this action (which is why the backup function 146 | makes a second copy for safekeeping in your home directory). you will no 147 | longer show up in any lists as a user. 148 | 149 | ### settings 150 | 151 | the settings menu lets you change specific options for handling your feels and 152 | using the interface. 153 | 154 | * **editor**--set your text editor 155 | * **gopher**--opt in or out of automatically posting to gopher 156 | * **post as nopub**--set whether posts default to being published or not 157 | published (if you're not publishing your feels, this doesn't matter) 158 | * **publish dir**--set the directory under you `public_html` where feels will be 159 | published (if you're not publishing your feels, this defaults to `None`) 160 | * **publishing**--opt in or out of automatically publishing entries to a 161 | world-readable html page 162 | * **rainbows**--opt in or out of having multicolored menu text 163 | 164 | ### changing your page layout 165 | 166 | you can modify how your blog looks by editing the stylesheet or header and 167 | footer files. the program sets you up with basic default. if you break your page 168 | somehow, you can force the program to regenerate your configuration by deleting 169 | your ~/.ttbp directory entirely. **you might want to back up your 170 | ~/.ttbp/entries directory before you do this.** 171 | 172 | * to modify your stylesheet, edit your ~/.ttbp/config/style.css 173 | * to modify the page header, edit your ~/.ttbp/config/header.txt 174 | * there's a place marked off in the default header where you can safely put 175 | custom HTML elements! 176 | * to modify the page footer, edit your ~/.ttbp/config/footer.txt 177 | 178 | ### general tips/troubleshooting 179 | 180 | * if the date looks like it's ahead or behind, it's because you haven't set 181 | your local timezone yet. here are some 182 | [timezone setting instructions](http://www.cyberciti.biz/faq/linux-unix-set-tz-environment-variable/) 183 | * the feels burying tool will effectively clear your post for the day; you can 184 | use this feature to start a fresh entry on a particular day by burying the 185 | current day's feels and then editing a new file 186 | 187 | ### future features 188 | 189 | these are a few ideas being kicked around, or under active development: 190 | 191 | * stylesheet/theme selector 192 | * better entry display within ttbp (currently just offloads to `less`) 193 | * buried feels browser 194 | 195 | other ideas are listed on github as 196 | [upcoming features](https://github.com/modgethanc/ttbp/issues?q=is%3Aissue+is%3Aopen+label%3A"upcoming+features") or [feature requests](https://github.com/modgethanc/ttbp/issues?q=is%3Aissue+is%3Aopen+label%3A"feature+request")! 197 | -------------------------------------------------------------------------------- /screenshots/ttbp-compose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modgethanc/ttbp/0aaedaff5a2738c11cfdaa29329533b9f4efaf28/screenshots/ttbp-compose.png -------------------------------------------------------------------------------- /screenshots/ttbp-entries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modgethanc/ttbp/0aaedaff5a2738c11cfdaa29329533b9f4efaf28/screenshots/ttbp-entries.png -------------------------------------------------------------------------------- /screenshots/ttbp-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modgethanc/ttbp/0aaedaff5a2738c11cfdaa29329533b9f4efaf28/screenshots/ttbp-main.png -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | 5 | setup( 6 | name='ttbp', 7 | version='0.12.2', 8 | description='command line social blogging tool used on tilde.town', 9 | url='https://github.com/modgethanc/ttbp', 10 | author='~endorphant', 11 | author_email='endorphant@tilde.town', 12 | license='MIT', 13 | classifiers=[ 14 | 'Topic :: Artistic Software', 15 | 'License :: OSI Approved :: MIT License', 16 | ], 17 | keywords='blog', 18 | packages=['ttbp'], 19 | install_requires = [ 20 | 'inflect==0.2.5', 21 | 'mistune==0.8.1', 22 | 'colorama==0.3.9', 23 | 'six' 24 | ], 25 | include_package_data = True, 26 | entry_points = { 27 | 'console_scripts': [ 28 | 'feels = ttbp.ttbp:main', 29 | 'ttbp = ttbp.ttbp:main', 30 | ] 31 | }, 32 | ) 33 | -------------------------------------------------------------------------------- /ttbp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modgethanc/ttbp/0aaedaff5a2738c11cfdaa29329533b9f4efaf28/ttbp/__init__.py -------------------------------------------------------------------------------- /ttbp/chatter.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import random 4 | 5 | DEFAULT_LANG = { 6 | "greet":[ 7 | "hi", 8 | "hey", 9 | "howdy", 10 | "good morning", 11 | "good afternoon", 12 | "good day", 13 | "good evening", 14 | "welcome back", 15 | "nice to see you" 16 | ], 17 | "bye":[ 18 | "see you later, space cowboy", 19 | "bye, townie", 20 | "until next time, friend", 21 | "come back whenever" 22 | ], 23 | "friend":[ 24 | "friend", 25 | "pal", 26 | "buddy", 27 | "townie" 28 | ], 29 | "months":{ 30 | "01":"january", 31 | "02":"february", 32 | "03":"march", 33 | "04":"april", 34 | "05":"may", 35 | "06":"june", 36 | "07":"july", 37 | "08":"august", 38 | "09":"september", 39 | "10":"october", 40 | "11":"november", 41 | "12":"december" 42 | } 43 | } 44 | 45 | if os.path.exists("/home/endorphant/lib/python/chatterlib.json"): 46 | with open("/home/endorphant/lib/python/chatterlib.json", 'r') as f: 47 | LANG = json.load(f) 48 | else: 49 | LANG = DEFAULT_LANG 50 | 51 | def say(keyword): 52 | ''' 53 | takes a keyword and randomly returns from language dictionary to match that keyword 54 | 55 | returns None if keyword doesn't exist 56 | 57 | TODO: validate keyword? 58 | ''' 59 | 60 | return random.choice(LANG.get(keyword)) 61 | 62 | def month(num): 63 | ''' 64 | takes a MM and returns lovercase full name of that month 65 | 66 | TODO: validate num? 67 | ''' 68 | 69 | return LANG["months"].get(num) 70 | -------------------------------------------------------------------------------- /ttbp/config/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import os 3 | import sys 4 | import time 5 | 6 | from .. import util 7 | 8 | ## System config 9 | 10 | # We refer to some package files (ie .css stuff), so we save a reference to the 11 | # path. 12 | INSTALL_PATH = os.path.dirname(sys.modules['ttbp'].__file__) 13 | 14 | # We use this to store any persisted, global state. 15 | VAR = '/var/global/ttbp' 16 | VAR_WWW = os.path.join(VAR, 'www') 17 | 18 | if not os.path.isdir('/var/global'): 19 | raise Exception('bad system state: /var/global does not exist.') 20 | 21 | if not os.path.isdir(VAR): 22 | os.mkdir(VAR) 23 | 24 | if not os.path.isdir(VAR_WWW): 25 | os.mkdir(VAR_WWW) 26 | 27 | LIVE = 'https://tilde.town/~' 28 | FEEDBOX = "endorphant@tilde.town" 29 | USERFILE = os.path.join(VAR, "users.txt") 30 | GRAFF_DIR = os.path.join(VAR, "graffiti") 31 | WALL = os.path.join(GRAFF_DIR, "wall.txt") 32 | WALL_LOCK = os.path.join(GRAFF_DIR, ".lock") 33 | 34 | if not os.path.isdir(GRAFF_DIR): 35 | os.mkdir(GRAFF_DIR) 36 | 37 | ## Defaults 38 | 39 | DEFAULT_HEADER = ''' 40 | 41 | 42 | 43 |