minor changes.

This commit is contained in:
= 2022-06-08 19:09:09 +05:30
parent 56263ba0e0
commit faa11bd054
2 changed files with 6 additions and 11 deletions

View File

@ -1,5 +1,5 @@
# gempost
An **experimental** gemlog manager for tilde.team
Gemlog manager for tilde.team
# Quick Start
Basically, gempost manages a `posts.gmi` file and maintains it in a clean format
@ -29,11 +29,11 @@ To do that, just add the following line to your *index.gmi* file:
You are ready to use gempost. Please just use `gempost help` from now on to only get a list of commands.
# Notes
This software is experimental and in its early stages. **I am not responsible if you mess up your gemlog using this program.** It works rather fine, and if you are comfortable, I invite you to try it out. To make it perfect, I will have to use it for a long term and work out the long-term posts storage solution.
This software is in its early stages. **I am not responsible if you mess up your gemlog using this program.** It works rather fine, and if you are comfortable, I invite you to try it out. To make it perfect, I will have to use it for a long term and work out the long-term posts storage solution.
Personally, I am happy with the set of features I currently have and will work out the bugs as I find them.
*This software is provided without any guarantees. Things may break any moment, your posts might get messed up. Keeping backups of your blog directories is always advised.*
*This software is provided without any guarantees. I may abandon it any time, things may break any moment, your posts might get messed up. Keeping backups of your blog directories is always advised.*
# Reporting Bugs/Sending Feedback
I (try to) log in daily on the tildeverse IRC. You can send a private message to me at `desertmouse` there.

11
gempost
View File

@ -480,7 +480,7 @@ elif (arg == "post"):
exiting_content = [] # stores content of the file
try:
with open(filePath, 'r') as f: # populating file content and title variables
with open(filePath, 'r') as f: # populating file content list
existing_content = f.readlines()
newpost(title, existing_content, fname)
@ -515,18 +515,13 @@ elif (arg == "search"):
allposts = i.readlines()
tempList = []
for i in allposts: # creating a list having titles corresponding to filenames for posts that have the search term in their titles
for i in allposts: # creating a temporary list having titles corresponding to filenames
tempList.append(i[11:].split(".gmi ", 1))
postsList = []
postsList = [] # adding items that contain the search term from the temporary list to postsList
for i in tempList:
if t in i[1]:
postsList.append(i)
"""
for i in postsList: # removing the \n characters
if i[1][-1] == '\n':
i[1] == i[1][:-1]
"""
menuItems = []
for i in postsList: # formatting it into a string list for the ncurses menu function