minor changes.

This commit is contained in:
= 2022-06-04 00:41:10 +05:30
parent 4304672487
commit 43dfae3f02
2 changed files with 9 additions and 6 deletions

View File

@ -2,7 +2,7 @@
An **experimental** gemlog manager for tilde.team An **experimental** gemlog manager for tilde.team
# Quick Start # Quick Start
Basically, gempost manages a *posts.gmi* file and maintains it in a clean format Basically, gempost manages a `posts.gmi` file and maintains it in a clean format
such that it shows your latest post, your five most recent posts, along with such that it shows your latest post, your five most recent posts, along with
an archive of all your posts, arranged from newest to oldest. an archive of all your posts, arranged from newest to oldest.
@ -12,15 +12,15 @@ If you are an existing user, please back up your **public_gemini/** directory an
proceed with the given steps. proceed with the given steps.
**STEP 1** **STEP 1**
Wih only your *index.gmi* file in **public_gemini/** directory, run the following to set everyting up: Wih only your `index.gmi` file in **public_gemini/** directory, run the following to set everyting up:
`gempost init` `gempost init`
Note that `gempost init` won't work if you don't have gempost added to your path. For tildeverse members, you can just copy the executable to your **~/bin/** directory. Otherwise, you can just do `./gempost <args>` instead of `gempost <args>`. Note that `gempost init` won't work if you don't have gempost added to your path. For tildeverse members, you can just copy the executable to your **~/bin/** directory. Otherwise, you can just do `./gempost <args>` instead of `gempost <args>`.
**STEP 2** **STEP 2**
Skip this if you chose to initialize an *index.gmi* during `gempost init`. Skip this if you chose to initialize an `index.gmi` during `gempost init`.
gempost doesn't touch your *index.gmi* file, so you will have to manually add a link to *posts.gmi*. gempost doesn't touch your `index.gmi` file, so you will have to manually add a link to *posts.gmi*.
To do that, just add the following line to your *index.gmi* file: To do that, just add the following line to your *index.gmi* file:
`=> ./posts.gmi Posts` `=> ./posts.gmi Posts`

View File

@ -307,7 +307,7 @@ def manage():
try: try:
mode = int(input("\nSELECT MODE:\n1 - EDIT\n2 - DELETE\n3 - CANCEL\n-> ")) # what does the user want to do with the selection? mode = int(input("\nSELECT MODE:\n1 - EDIT\n2 - DELETE\n3 - CANCEL\n-> ")) # what does the user want to do with the selection?
except ValueError: except ValueError:
print("\nCancelling...") print("\nCancelled.")
return 0 return 0
if (mode == 1): # if mode is EDIT, open editor with the post file if (mode == 1): # if mode is EDIT, open editor with the post file
@ -406,6 +406,9 @@ Directory Structure:
- a link to "archive.gmi" that contains a list of all your posts - a link to "archive.gmi" that contains a list of all your posts
- "trash/" is the directory where gempost keeps your deleted posts. use "gempost purge" to delete its contents. - "trash/" is the directory where gempost keeps your deleted posts. use "gempost purge" to delete its contents.
Source at:
https://tildegit.org/desertmouse/gempost
""" """
# Process command-line arguments # Process command-line arguments
@ -493,7 +496,7 @@ elif (arg == "reset"): # delete all posts and re-initialize public_gemini/ for u
i.writelines(index_init) i.writelines(index_init)
prYellow("public_gemini/ has been re-initialized successfully.") prYellow("public_gemini/ has been re-initialized successfully.")
else: else:
print("Cancelled.") print("\nCancelled.")
else: else:
print(f"Unknown argument '{arg}'") print(f"Unknown argument '{arg}'")