It would be nice if this post had shown some examples of how it works, where does it take the info of the project to write it in the README...
I think it's a very cool project!
Aspiring Rustacean. Whatever-Stack developer who fell in love with React and GraphQL. Addicted to CTRL + ⎵. Building tools to improve developers experience.
It's actually really really simple, It's just a template Readme with placeholders like $PROJECT_NAME ..etc and he reads that template locally from the filesystem or from a string literal stored directly in the program's binary. The CLI prompts you to a few questions and every time you answer a question he go and replace the placeholder with what you have typed. And Voila! you now have a string containing all of the customized Readme information, just dumb it to the terminal.
Basic information that the code can't figure out is asked in the terminal, all variables are stored and then it goes through a function called file_factory. the file factory has a very basic job.
It creates the README file, and puts in the variable (as Yassin pointed out)
But, the special part is, it looks for the files in the current directory. According the files, it creates installation and usage instructions
It also takes the git url by executing a command
It's honestly pretty basic stuff, one of my first rust project lol
Aspiring Rustacean. Whatever-Stack developer who fell in love with React and GraphQL. Addicted to CTRL + ⎵. Building tools to improve developers experience.
It would be nice if this post had shown some examples of how it works, where does it take the info of the project to write it in the README...
I think it's a very cool project!
It's actually really really simple, It's just a template Readme with placeholders like
$PROJECT_NAME
..etc and he reads that template locally from the filesystem or from a string literal stored directly in the program's binary. The CLI prompts you to a few questions and every time you answer a question he go and replace the placeholder with what you have typed. And Voila! you now have a string containing all of the customized Readme information, just dumb it to the terminal.not exactly like that
Alright, so here's how it goes:
Basic information that the code can't figure out is asked in the terminal, all variables are stored and then it goes through a function called
file_factory
. the file factory has a very basic job.It creates the README file, and puts in the variable (as Yassin pointed out)
But, the special part is, it looks for the files in the current directory. According the files, it creates installation and usage instructions
It also takes the git url by executing a command
It's honestly pretty basic stuff, one of my first rust project lol
Nice! Keep it up.
Another thing to consider is to put #rust as a tag to this blog, that's the most advanced marketing technique, trust me people love Rust 😂😂.