Compare commits

..

5 Commits

Author SHA1 Message Date
1520b78f01 Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-12 12:14:11 +00:00
adf285d723 forgot all lines of unordered lists
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-01-28 16:15:05 +01:00
61a0348e38 adding replaceInline to unordered lists
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-01-28 16:09:58 +01:00
a4d03c8e8d Completing readme.md
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-09 14:13:55 +00:00
8aeeba1032 wip readme
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-09 14:07:35 +00:00
2 changed files with 20 additions and 11 deletions

View File

@ -9,36 +9,45 @@ It only is designed in bash script, and should work perfectly fine on any Unix
like machine. like machine.
``` ```
git clone https://git.simonpetit.top git clone https://git.simonpetit.top/simonpetit/bob
cd bob cd bob
make test (optional) make test
sudo make install sudo make install
``` ```
or using Docker :
```
docker pull git.simonpetit.top/simonpetit/bob:0.1.2
```
## Usage ## Usage
### Publish : to convert a drafts in markdown into a html article ### Publish : to convert a drafts in markdown into a html article
To write a post, create a markdown file in the `drafts` folder whose name will To write a post, create a markdown file in the `drafts` folder whose name will
also be its title, and convert it to an html file, type the following command also be its title, and convert it to an html file, type the following command
from the root : from the root.
Once your draft is ready to be published, move it into `drafts/published` and call `bob`
``` ```
bob publish ./drafts/<article_file> bob publish
``` ```
Note that the article does not have to have a particular extension, however Bob will convert all markdown files within `drafts/published` in html and put them into `posts`
it will be placed in the `draft/published` folder with the `.md` extension.
It will also update the `index.html` to add this newly article into its list. It will also update the `index.html` to add this newly article into its list.
### Unpublish : to remove a published article ### Unpublish : to remove a published article
To remove a specific `post`, remove its counterpart from `draft/published` and rerun :
``` ```
bob unpublish ./posts/<article_file> bob publish
``` ```
This will remove the html file from the `posts` folder, and put back the draft from This will remove the html files from the `posts` folder, and republish accordingly to the `drafts/published` list of files.
`./draft/published` into the `./draft` folder. The file `index.html` will be rewritten to match the actually published posts.
### Help ### Help

View File

@ -96,11 +96,11 @@ function closeOne() {
env = last() env = last()
if (env == "ul" ) { if (env == "ul" ) {
# In a unordered list block, print a new item # In a unordered list block, print a new item
print "<li>" substr($0, 3) "</li>" print "<li>" replaceInline(substr($0, 3)) "</li>"
} else { } else {
# Otherwise, init the unordered list block # Otherwise, init the unordered list block
push("ul") push("ul")
print "<ul>\n<li>" substr($0, 3) "</li>" print "<ul>\n<li>" replaceInline(substr($0, 3)) "</li>"
} }
} }