Git Product home page Git Product logo

site's Introduction

Lady_Aleena

The files behind my website.

page-scripts

Collections: My collections of books, music, movies, and more.

Fandom: Pages about things I am a fan of such as crossovers, fictional family trees, Xanth, and more.

Miscellany: My random thoughts and other stuff.

Movies: Lists of movies by series and genre along with some opinions.

Role_playing: Role playing information I made up or collated over the years. It is all based on AD&D 2nd Ed.

Writing: Stories and poems I have written. Please don't take any of them and claim they are yours. I am trusting you.

admin: Scripts I wrote to display various bits of data that I wanted a better visualization for that can not be achieved on the command line.

Code

The code in most of the index.pl page-scripts in the above directories looks like the following (without the comments after line 3):

#!/usr/bin/perl
# This is the index for <directory>.
use strict;
use warnings FATAL => qw( all );

use CGI::Carp qw(fatalsToBrowser);
use CGI::Simple;
use HTML::Entities qw(encode_entities);

# path to lib
use lib '../files/lib';
use Page::Base qw(page);
use Page::File qw(file_directory file_list print_file_menu);
use Page::Story qw(story);

my $cgi       = CGI::Simple->new;
my $page      = $cgi->param('page') ? encode_entities($cgi->param('page'),'/<>"') : undef;
my $pages_dir = file_directory('Writing', 'text');
my @pages     = file_list($pages_dir, { 'type' => 'f', 'uppercase' => 1, 'sort' => 'article', 'text' => 1 });
my $heading   = q(Some heading for when there is no "page");
my $page_file = "$pages_dir/index.txt";
if ( $page && grep { $_ eq $page } @pages ) {
# There are times when the headings of various pages might not follow this format.
# Tenaries are used in those where the $heading is diffent.
  $heading    = $page;
  $page_file  = "$pages_dir/$page.txt";
  $page_file  =~ s/ /_/g;
}
my $magic;
$magic->{'pages'} = sub { print_file_menu('page', \@pages, $page, 2) };

page(
  'heading' => $heading,
  'selected' => $page,
  'code' => sub {
    story('file' => $page_file, 'magic' => { 'doc magic' => $magic, 'line magic' => $magic });
  }
);

Some of the index scripts use various magic modules to include more data into their stories.

These the index.pl page-scripts do not follow the above format:

Also, these scripts that are not indexes do not follow the above format either.

And everything in admin.

These are the files used to create pages on my site.

css: All of the style sheets used on my site.

data: All of the tabular or list data that is used in my modules and sent to my scripts.

images: All of the images that are used on my site. The SVG files for crossovers and fictional family trees have external style sheets, so they will not render properly on GitHub or a Google search.

lib: The modules I have written for my site and for fun. I am considering moving those that are not used for my site to another repository. Please see the readme for more information on the modules.

text: All of the text that is used on my site to generate pages. These files are written in my custom markup.

site's People

Contributors

djzort avatar ladyaleena avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.