rwar
argparse
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rwar
-
2022 Highlights: Open Source Development! ✨
rwar - My static site generator
-
🧪🐍✨Unit Testing Python Code With The unittest Framework
My static site generator - rwar is evolving and getting better over time, which means I need to ensure that the code is professional and of high quality! Also, being able to work with testing frameworks and learning them well can help you stand out during interviews. 😃
-
✨Write clean Python code using pylint and black ✨🐍
The very first time I encountered linters and style formatters for Python was during this year's Hacktoberfest. My CI/CD runs kept failing for one particular pull request on GitHub due to errors on black, isort, gitlint. Multiple times. The code was working, but why were my CI/CD runs failing so many times? You can read all about the CI/CD nightmare in this blog. I was frustrated and questioned the need for such checks. Now, I have studied all about pylint to integrate it into my static site generator - rwar. I understand how important it is for code to go through such checks to help spot silly errors that programmers often make and keep the code bug free in the long run, especially when many programmers are working on one big project. Imagine it this way, while typing things on a word document we almost always use a spellchecker to catch typos. Similarly, linters help us catch those silly errors that might snowball into a bigger problem if not addressed on time. They put quality control checks in place. Plus, linters are customizable, allowing us to set rules for the checks we want for our code.
-
Copying a Feature from Docusaurus 🦖 For My Static Site Generator - rwar 🦁
There is so much to learn from Docusaurus. It is a powerful static site generator, packed with amazing features. I envision my own static site generator – rwar - to be as powerful as Docusaurus someday. But then again – I am a one-person team, the sole author of my static site generator getting occasional little help from other teammates in the class, and taking small steps to one day become as feature packed as Docusaurus. But for now, I am taking it slow, learning python as I improve rwar.
-
Refactoring My Code
Until now I had worked on Rwar – my static site generator written in Python, without paying much attention to ways I could make the code cleaner and easier to read. This week was all about cleaning up my code. I refactored my code by reducing code duplication, extracting functions, removing global variables, and giving better names to my variables. Previously, I had already worked on splitting my code up into multiple files. To do the refactoring of my code, I first created a branch called refactoring and made all my changes on this branch.
-
Implementing Difficult Features While Learning New Things in C++
To add a new feature to palpatine which is an awesome static site generator written in C++ by Batuhan, I started by filing an issue. While I worked on his repo for adding this new feature, he worked on mine to add the same feature. Here are the detailed instructions for this week's lab. Batuhan also worked on my repo for adding the –config feature for my static site generator, rwar, written in Python. These are awesome repos to check out!
-
palpatine supports config file in JSON format
I worked on my partner’s static site generator, rwar, to implement this feature and she worked on my static site generator – palpatine. I was easily able to do this in rwar which is written in Python. However, I realized that this feature was much harder to implement on palpatine which is written in C++. Samina reached out multiple times seeking help for the broken Cmake configurations and for helping in integrating the nlohmann/json library.
-
My Experience With GitHub Topic Branches
This week I learned something new about GitHub – using topic branches! And not just that – I also added two new features to my static site generator, rwar. Rwar is a simple static site generator written in Python and I keep improving it every week by implementing one or two new features, along with updating all its documentation and debugging anything that might have broken in the process. If you are interested in Python, I encourage you to check out rwar. Fork it, clone it and test it out! Building this project paved a path for me to learn Python and trust me I have learned so much in such a short time! The best way to learn something is to start building a project with it. Yes, it requires a greater learning curve, and there is a greater chance of breaking stuff in the process, but through getting hands-on, the learning happens so much faster.
-
My First GitHub Pull Request
It was great working with Batuhan for this lab again! He was prompt at working on my static site generator Rwar and added markdown support to it as well. He asked me questions whenever he had any through Slack and the entire process went smoothly. Batuhan had previous experience with pull requests and I was able to ask him questions regarding creating branches and PRs.
-
palpatine received its first Pull Request
During PR, we talked over Slack(like almost every developer) and I enjoyed the process. Slack is a great tool for communication and I highly recommend it. It was not something I used to use often, but I noticed it feels much more convenient than any other tool, it supports large files, and screen recordings to be shared, unlike the other tools with limitations on certain sizes. With Samina, we have shared our screens and discussed the implementation. I am confident that we learned a lot from each other. I also implemented similar markdown support into her tool rwar that supports markdown headings. You can see her demo here. The PR I raised was to address issue#6.
argparse
-
Command line interface library
The most feature-rich C++ CLI library is CLI11. Other popular choices include Boost.ProgramOptions, argparse, cxxopts and others.
-
arg_router v1.2.0 - Thanks for all your feedback!
It was noted by u/k1lk1 that it wasn't entirely obvious what the benefits of this library are, so I'll compare arg_router to argparse, with a simple but common example.
-
What do you need to do to build a Linux terminal app for distribution?
You're looking for an argument parsing library. There are tons of these. My favorite is the excelent Rust crate called clap. For C++, the argparse library is a decent option.
- argparse v2.9 released - now with support for subcommands, nargs, prefix_chars, metavar, parse_known_args, improved help messages and more
-
palpatine Release1.0
p-ranav/argparse - A single-file header-only C++11 library for parsing command line arguments.
-
palpatine and rwar
I tried to make the code modular as much as possible. However, in main.cpp I have used the argparse and termcolor along with the main function. As Sam, pointed out, it would be a good idea to move them to a separate file and import them in main.cpp.
-
Looking for some small rust projects with an elegant code base that I can study.
argparse is another good one. Templated (delicious), tested, AND has conan and debian package deployment.
-
How I Create - Github Token Manager
argparse ➜ repository
What are some alternatives?
rahat-agency - Agency management system for Rahat
command-line-rust - Code for Command-Line Rust (O'Reilly, 2022, ISBN 9781098109417) https://learning.oreilly.com/library/view/command-line-rust/9781098109424/
palpatine - ⚡Darth sidious does static site generator with unlimited power!
flag - Flag is a simple but powerful command line option parsing library for Go support infinite level subcommand
cve-bin-tool - The CVE Binary Tool helps you determine if your system includes known vulnerabilities. You can scan binaries for over 200 common, vulnerable components (openssl, libpng, libxml2, expat and others), or if you know the components used, you can get a list of known vulnerabilities associated with an SBOM or a list of components and versions.
go-arg - Struct-based argument parsing in Go
Docusaurus - Easy to maintain open source documentation websites.
CLI11 - CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
termcolor - Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force.
linuxdeployqt - Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
json - JSON for Modern C++
clip - Cross-platform C++ library to copy/paste clipboard content