Yassgy, release 0.1!
Tags: osd600
Published: 2021-09-18 05:31:58

I am proud to announce the release of [`Yassgy`](https://github.com/JerryHue/yassgy), version 0.1!

I was working on this project for a week now, and after reading back and forth between the Rust official documentation, and community posts regarding Rust, I have finally developed a program that does more than print `"Hello World!"` on the screen!

`Yassgy` stands for "Yet Another Static Site Generator". This project was announced by my OSD600 professor, David Humphrey ([@humphd](https://github.com/humphd) on GitHub).

Right now, `yassgy` is deprived of features. It can do the least necessary to generate static files for a website, but it is much simpler than a Markdown parser.

## Usage

`Yassgy` accepts as input a text file, and will output an HTML file, where it contains the text found in the original file. You may run it like this:

```
yassgy --input test.txt
```

Each group of lines found in the text file that are right after each other is considered a paragraph, and `yassgy` will consider them as such, thus, generating paragraph elements placed in the HTML file.

Also, `yassgy` accepts a path to a directory, which will be read for several other text files. See the following example command:

```
yassgy --input files/
```

Any other file type is ignored. `Yassgy` can also deep dive into a nested directory if there is any found inside, and keep the original directory hierarchy when outputting the generated files.

`Yassgy` will output all generated files and directories into a `dist` directory in the current directory. If there is already a `dist` directory, `yassgy` will delete it without warning, so beware!

## Future Releases

`Yassgy` will still be receiving features. There are several other features that I could not implement due to time constraints or because I am not **that** knowledgeable in Rust.

Some features that I would like to implement are:

* Markdown parser. Adding more formatting options with Markdown would be perfect to make the static site pages more interesting than simple paragraphs.
* Default stylesheet. While the site is functional, it might be considered boring or even ugly using the agent stylesheet from your browser, so I would like to improve the look even for default sites by offering an opt-out default stylesheet.
* Accepting stylesheets. Another interesting feature would be to let the user enter stylesheet link, whether they may be remotely linked or locally linked.

## Enhancements

Even though `yassgy` is written Rust, performance is not given by default. While `yassgy` is moderately fast, I believe that it can be enhanced to be more efficient both processing and memory wise.

I will research more on this aspect, especially the memory usage aspect (imagine if the input file was around the GBs!), to improve `yassgy`'s performance. I may rewrite some of its implementation, but as long as the behaviour is the same, it shall be fine.

## Conclusion

That's pretty much `yassgy`'s introduction to the real world! While it is not the best program in various aspects, I believe this is a big step for a first-timer like me, both in the Open Source world and in the Rust Language world.