Create markdown document with instructions on how to adapt the script to other languages #2

Open
opened 2023-03-15 07:19:48 +00:00 by nu · 1 comment
Owner

I kinda wrote the script with the idea that it should hopefully be easy to adapt to other languages in mind, like with relatively easy to read syntax and whatnot as well as having certain bits of code and text be in clear view (i.e. the time-related stuff being in the config section), but just in case someone who's not a programmer ever wants to use this (which I doubt, but just in case...) I'm thinking it might be nice to offer a handholdy tutorial on how to do that, for people who might find looking at the code to be pretty overwhelming anyways.

Maybe I should also look into some mild restructuring? Like moving these out of the config section, if it wouldn't break the other datetime stuff to rearrange them:

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;

...and maybe also moving the text put directly in $webhook->execute into some vars that are up in the config section as well for more easy access. Frankly those changes might not even really make a tutorial necessary? Then you wouldn't have to point someone to specific lines to change.

I kinda wrote the script with the idea that it should hopefully be easy to adapt to other languages in mind, like with relatively easy to read syntax and whatnot as well as having certain bits of code and text be in clear view (i.e. the time-related stuff being in the config section), but just in case someone who's not a programmer ever wants to use this (which I doubt, but just in case...) I'm thinking it might be nice to offer a handholdy tutorial on how to do that, for people who might find looking at the code to be pretty overwhelming anyways. Maybe I should also look into some mild restructuring? Like moving these out of the config section, if it wouldn't break the other datetime stuff to rearrange them: ```Perl my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year += 1900; ``` ...and maybe also moving the text put directly in `$webhook->execute` into some vars that are up in the config section as well for more easy access. Frankly those changes might not even really make a tutorial necessary? Then you wouldn't have to point someone to specific lines to change.
nu added the
enhancement
label 2023-03-15 07:19:48 +00:00
Author
Owner

Going to add as well that this should probably only be done once the project is in a pretty stable state where I won't need to add much to it anymore, since it'd probably have to reference specific line numbers

Going to add as well that this should probably only be done once the project is in a pretty stable state where I won't need to add much to it anymore, since it'd probably have to reference specific line numbers
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: nu/PDQoTD#2
No description provided.