[GSoC Report] Week 6 & 7 - Systemd Unit Translator
I was sick for the majority of week 6 so I couldn't get a lot of work done
during that period, which I'll be making up for by working an extra week (July
27 - August 02).
An index is now being kept in the
README[https://git.kayg.org/gsoc-2020/translator] as instructed by Benda.
Statistics as of July 27:
So, updates! Last week, I finally sat down with a tmux split window open,
ready to fiddle with some regex. At the end of it, there was support for
normalized calendar events. A bit on how it works:
The timer script checks first for special expressions like "Minutely",
"Hourly", "Daily", etc. and if they exist, it performs a simple conversion. If
none of those exist, and instead there's a timestamp, it is first normalized
with: `systemd-analyze calendar "<expression>"`. Then a check is made for the
existence of '..' (range) or ',' (separators for multiple items). Using bash's
regular expressions support for groups, day, month, etc are captured.
Occurrence of '..' is changed to the cron equivalent '-'.
Current limitation is that it won't handle something too complex -- for
example, a calendar event which makes use of both '*' and '-'.
Documentation and creating a manual were a part of August's schedule but
because I wasn't able to open a repository for testing, owing to my health, I
chose to instead open the stage up next month when most of the work has been
completed on the translator. With the time gained, I took it to myself to
start work on documentation and a manual.
The README document is now updated to describe the usage of the translator.
Additional work has been done to explain parts of code with comments, and
simplify and break down the more complicated parts of the code. The document
now contains the following:
A manual is now available
source file is in org-mode which was exported with `pandoc` to the man format.
Primary reference while making the manual was the socket-activate
which is also a tool this project makes use of.
The manual contains the following sections:
- Finish up on documentation and the manual by the end of this week (July 27 - August 02).
- Fix remaining service files where translation fails because of multiple
occurrences of directives or special executable prefixes which are currently
- Make a repository in Debian's salsa to facilitate more testing and bug-fixes
by the end of this week (July 27 - August 02).
K Gopal Krishna