Compare commits

..

5 Commits
master ... sdf

Author SHA1 Message Date
7df9de2b62 updated 'powered by SDF' png file location 2024-07-16 18:34:44 +00:00
28e3cdeb15 Fixed mav perl path for app AND for libraries (no longer using /pkg/) 2024-03-19 20:57:39 +00:00
9aca50dbce Updated to about-page format closer to what mojo branch has, moved most
about content to about page. Removed the "view" template because it's
not used.

 Changes to be committed:
	modified:   wordle-life.cgi
2022-05-09 19:19:51 +00:00
bc43519cf9 Forgot to update file name from -x 2022-04-20 06:23:07 +00:00
15313e924f Making sdf branch out of current wordle-life-x.cgi, contains regexes for
Duppy's wordum guessum

 On branch sdf
 Changes to be committed:
	modified:   wordle-life.cgi
2022-04-20 06:16:27 +00:00
2 changed files with 35 additions and 24 deletions

View File

@ -2,12 +2,6 @@
one-page app that turns wordle shares into standard file format used in the Conway's Game of Life community and sets it up for running in embedded Lifeviewer on the same page one-page app that turns wordle shares into standard file format used in the Conway's Game of Life community and sets it up for running in embedded Lifeviewer on the same page
## Project Branches
There are 3 branches to this project. There is just one CGI file and a version of the README.md in each one. Use the one that works for you. If at SDF, use the sdf branch. Otherwise master or mojo branches will work:
* *sdf* is the original branch, a CGI set up to run on SDF.org. I had to abandon using Mojolicious Lite, but found a nice way to do it using CGI:Tiny and the Mojo Templates. This version also uses a path_info URL parameter to manage routing, and mocks path_info, since is doesn't work on SDF's nginx web server setup.
* *master* is a branch made to be mostly the same as the SDF branch, using CGI::Tiny, but with more normal paths and not trying to pick out a separate user-level perl library. It still uses the path_info parameter, which actuall works pretty well for the simple case, I put it to, at least.
* *mojo* is a rewrite of the CGI part of the script using Mojolicious Lite and expecting that path_info is honored for CGI scripts. It uses routing based off the path_info (it's like *magic*) instead of a url parameter. I got this to run very nice with a handmade Mojolicous Daemon web server script, using the Mojolicous CGI plugin. It would have been so much less sweat to do this from the get-go, but I learned a lot banging my head against the wall, I guess.
## Dependencies ## Dependencies
This app is not at all packaged. You'll have to make sure all the perl modules you need are installed. If you are on a community unix server with just user rights (like, say SDF), you may need to ask an admin to install for you, or alternately, you can make a personal perl library in your user space. This app is not at all packaged. You'll have to make sure all the perl modules you need are installed. If you are on a community unix server with just user rights (like, say SDF), you may need to ask an admin to install for you, or alternately, you can make a personal perl library in your user space.

View File

@ -1,9 +1,10 @@
#!/usr/bin/perl #!/usr/bin/perl
#Above is the particular location for system binaries in SDF's metaarray, not the usual spot
use strict; use strict;
use warnings; use warnings;
use utf8; use utf8;
#add my user perl library path, this is particular to each person's setup #add my user perl library path, this is particular to each person's setup
#use lib qw( /usr/pkg/lib/perl5/5.24.0 /meta/p/peteyboy/perl5/lib/perl5 ); use lib qw( /usr/lib/x86_64-linux-gnu/perl/5.36.0 /meta/p/peteyboy/perl5/lib/perl5 );
#make request for all of the following #make request for all of the following
use CGI::Tiny; use CGI::Tiny;
use Mojo::Template; use Mojo::Template;
@ -17,7 +18,7 @@ use experimental 'smartmatch';
# MAKE SURE ORIGIN PAGE MATCHES FILENAME (especially if you are testing changes)! # MAKE SURE ORIGIN PAGE MATCHES FILENAME (especially if you are testing changes)!
# #
#=== #===
my $ORIGIN_PAGE = "/cgi-bin/wordle-life.cgi"; my $ORIGIN_PAGE = "/wordle-life.cgi";
my $defaulttext = "Paste your wordle share here (replace this text)"; my $defaulttext = "Paste your wordle share here (replace this text)";
my $PATH_PARAM = "path_info"; my $PATH_PARAM = "path_info";
my $WORDLE_INPUT_PARAM = "wordle-result"; my $WORDLE_INPUT_PARAM = "wordle-result";
@ -226,7 +227,9 @@ __DATA__
} }
</style> </style>
<meta name="LifeViewer" content="viewer textarea"> <!--required tag--> <meta name="LifeViewer" content="viewer textarea"> <!--required tag-->
<script src="/lv-plugin.js"></script> <script src="lv-plugin.js"></script>
<p align= left> <a href="/"><-site Home</a>
</head> </head>
@ -361,11 +364,23 @@ GRID
</ol> </ol>
<p> <p>
<p>
<p>
<hr 100%>
<p> Made in February 2022</p>
<p><em>Disclaimer: <a href="https://git.sdf.org/peteyboy/wordle-life">I made this!</a> People and/or corporations may own their marks or copyrights, etc, on words mentioned on this site's pages I don't claim to</em></p>
<p>
<center>
Hosted by SDF.org
<p><a href="https://sdf.org"><img src=https://sdf.org/sdfbanner.png alt="SDF.org"></a>
</center>
</body></html>
@@ about.html.ep @@ about.html.ep
<html> <html>
<head> <head>
<title>About Wordle-Life</title> <title>About Wordle-Life</title>
<link rel="stylesheet" href="https://unpkg.com/some-nice-basic-css/global.css" /> <link rel="stylesheet" href="https://unpkg.com/some-nice-basic-css/global.css" />
@ -373,30 +388,32 @@ GRID
</head> </head>
<body><h1>Wordle->Life</h1> <body><h1>About</h1>
% my $home_path= "$ORIGIN_PAGE"; % my $home_path= "$ORIGIN_PAGE";
% my $current_path = "$home_path?path_info=/about"; % my $current_path = "$home_path?path_info=/about";
<p> <p>
<p> This is an about page. </p> <h2>Wordle->Life</h2>
<p>
<p> Click <a href=<%== $home_path %> >here</a> to go Home </p> <a href="https://git.sdf.org/peteyboy/wordle-life">I made this!</a> People and/or corporations may own their marks or copyrights, etc, on words mentioned on this site's pages I don't claim to.
<p> Click <a href=<%== $current_path %> >here</a> to stay put </p>
<p> <p>
Questions, kudos or comments, mail me @sdf.org
<hr 100%> <p>
<em>Disclaimer: I made this! People and/or corporations may own their marks or copyrights, etc, on words mentioned on this page I don't claim to</em> Thanks to the community at <a href="https://conwaylife.com">conwaylife.com</a>, and the friendly folks in the forums there,
and for their <a href="https://conwaylife.com/wiki/Tutorials/LifeViewer_JavaScript_plug-in">Javascript Life Viewer</a>, which I use here.
</p>
<p> <p>
Thanks to <a href="https://github.com/hankchizljaw/some-nice-basic-css"> hankchizljaw</a> for making his basic css publicly available Thanks to <a href="https://github.com/hankchizljaw/some-nice-basic-css"> hankchizljaw</a> for making his basic css publicly available
</p>
<p> Made in February 2022</p>
<p> Made in February 2022 <p> Click <a href=<%== $home_path %> >here</a> to return to application Home </p>
<p> <p>
<center> <center>
Hosted by Bisect Hosting Hosted by SDF.org
<p><a href="https://www.bisecthosting.com"><img src=https://www.bisecthosting.com/images/logos/logo.svg alt="bisecthosting.com" height= 10% width=auto></a> <p><a href="https://sdf.org"><img src=https://sdf.org/sdfbanner.png alt="SDF.org"></a>
</center> </center>
</body></html> </body></html>