I thought it would be a neat idea to inspire myself to do this project by keeping track of how long it actually takes me to accomplish each part of it. I've chosen Ruby because I like the aesthetics of the language and, like the Python motto, it comes with " batteries included." 2023-09-22: Started! Take a repo as a path from input, error if not found or no .git dir: 0854 to 0903 = 9 min cd to repo dir, get repo 'name' as basename via git (proves viability of backticks to shell out to git) 0840 to 0855 = 15 min list files in current repo, "parse" list into array 0900 to 0923 = 23 min hard-code output dir, append repo name as repo output prompt to create dir if it doesn't exist 0923 to 0935 = 12 min write initial index file to repo output dir (include repo name as page title and file list as html bullets) 0942 to 0955 = 13 min make raw dir for copies of the raw repo files and html dir for individual file html pages 0902 to 0903 = 1 min for each file: * link in index to fname.html 0856 to 0857 = 1 min * make a .html page for each file 0904 to 0917 = 13 min * copy source file to output 0858 to 0859 = 1 min * link to raw source file in page 0918 to 0920 = 2 min * if image, display in page 0921 to 1926 = 5 min * detect binary files... * "normal" method attempts 1450 to 1523 = 33 min * new idea: look for control characters and also count newlines to get a feel for the 'shape' of the file, *if* it is readable characters. (Minified .js source won't pass this readability test.) 1637 to 1650 = 13 min * continuing above idea - writing is_readable.rb to test various files quickly... then adapt to become a function in the program 0816 to 0910 = 54 min * if text source, display with line nums 1248 to 1254 = 6 min * make line nums into anchor links 1441 to 1446 = 5 min * correctly display source HTML with pre whitespace and right-justified line numbers 0950 to 1019 = 29 min * Process README with tools pre-installed on Slackware Linux * detect readme file and its type (text or markdown) 0827 to 0911 = 44 min * .txt verbatim in

        0915 to 0921 = 6 min

    * .md/.markdown via "rat-flavored markdown", whatever that ends up being

        1256 to 1305 = 9 min   (markdown_py - python, already installed)
        1611 to 1631 = 20 min  (RDoc and darkfish - ruby, core module)
        0841 to 0847 = 6 min   (discount - c)
        1736 to 1741 = 5 min   continued...

    * asciidoc? (NOPE! I'm gonna convert those to md)

    * index/landing page should contain file list (limit to first 20)
      followed by readme

        1824 to 1832 = 9 min

* Add LICENSE and update README

    0740 to 0809 = 29 min

* Remove hard-coded output path, get it from command line args

    0813 to 0819 = 6 min

* Common page header

    * header function - just return string with html

        1023 to 1035 = 12 min

    * and take css link (optional) from 3rd cli arg

        1410 to 1425 = 15 min

    * get description from .git/description file

        1442 to 1452 = 10 min

    * make relative links to repo pages in header
      (and spent some time making header prettier)

        1520 to 1545 = 25 min

* Make files page (simple list, can hide bullets with css)

    1631 to 1637 = 6 min

* Make commit history page (simple log in 
 tag)

    1638 to 1642 = 4 min

* Draw a cute little ratty logo

    1808 to 1843 = 35 min

* Make .git link for http cloning

    * first, do a proof of concept...

        2105 to 2128 = 23 min

    * create bare repo foo.git upon new repo creation
        (git clone --bare input_foo output/foo/foo.git)

        0750 to 0804 = 14 min

    * pull changes when already exists and update 4 web:
         cd output/foo/foo.git
         git ???? <--- turns out it's fetch to update
         git update-server-info

        0805 to 0839 = 34 min

    * add clone instructions to header, test it

        0841 to 0850 = 9 min

* Make common footer with RepoRat link and date-time generated

        0908 to 0916 = 8 min

* Use a config file (itself ruby source!) instead of CLI args

    1143 to 1221 = 38 min

* run from repo root, don't take repo dir from cli arg

    1937 to 1949 = 12 min

2023-09-29: Well, that does it for now.