diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2024-02-12 15:35:42 +0000 | 
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2024-02-12 15:35:42 +0000 | 
| commit | 95a34e9de9eef195c0b31e513b688a0c3c85e631 (patch) | |
| tree | 4576c66cd857c8c870c5aa032174146012b47129 /klaus | |
| parent | cd055d0580b5ef704a05815183a0444370d58aa0 (diff) | |
| download | git-scripts-95a34e9de9eef195c0b31e513b688a0c3c85e631.tar.gz git-scripts-95a34e9de9eef195c0b31e513b688a0c3c85e631.zip | |
Updated script, switched to cgit
Diffstat (limited to 'klaus')
| -rwxr-xr-x | klaus/Dockerfile | 12 | ||||
| -rwxr-xr-x | klaus/app.py | 24 | ||||
| -rwxr-xr-x | klaus/docker-compose.yml | 18 | ||||
| -rwxr-xr-x | klaus/klaus.css | 288 | ||||
| -rwxr-xr-x | klaus/requirements.txt | 2 | 
5 files changed, 0 insertions, 344 deletions
| diff --git a/klaus/Dockerfile b/klaus/Dockerfile deleted file mode 100755 index c5a901f..0000000 --- a/klaus/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM jonashaag/klaus:latest -MAINTAINER Eden Attenborough "eda@e.email" -ENV TZ=Europe/London -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -COPY ./klaus.css /usr/lib/python3.10/site-packages/klaus/static -COPY . /app -WORKDIR /app -RUN pip3 install -r requirements.txt -ENTRYPOINT ["python3"] -CMD ["app.py"] - diff --git a/klaus/app.py b/klaus/app.py deleted file mode 100755 index 6b2205e..0000000 --- a/klaus/app.py +++ /dev/null @@ -1,24 +0,0 @@ -import configparser -import waitress -import klaus -import os - -def get_repo_paths(metadata_path): -    repo_paths = [] -    for filename in os.listdir(metadata_path): -        if filename.endswith(".git.conf"): -            meta = configparser.ConfigParser() -            meta.read(os.path.join(metadata_path, filename)) -            repo_name = filename[:-5] - -            if meta.getboolean(repo_name, "visible"): -                repo_paths.append(meta.get(repo_name, "path")) - -    return repo_paths - -if __name__ == "__main__": -    repositories = get_repo_paths("/srv/repos") -    print("Using repository paths: %s" % " ".join(repositories)) -    app = klaus.make_app(repositories, "Eden's git server - Repositories") -    waitress.serve(app, host = "0.0.0.0", port = 80, threads = int(os.environ["APP_THREADS"])) - diff --git a/klaus/docker-compose.yml b/klaus/docker-compose.yml deleted file mode 100755 index 4068b33..0000000 --- a/klaus/docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: '3' - -services: -    klaus: -        container_name: klaus -        build: -            context: . -            dockerfile: Dockerfile -        image: jwansek/klaus -        user: "1002:1000" -        environment: -            - APP_THREADS=4 -        volumes: -            - '/media/git:/srv/git:ro' -            - '/media/gitwww/repositories:/srv/repos:ro' -        ports: -            - '81:80' -        restart: always diff --git a/klaus/klaus.css b/klaus/klaus.css deleted file mode 100755 index b73ea2a..0000000 --- a/klaus/klaus.css +++ /dev/null @@ -1,288 +0,0 @@ -@charset "utf-8"; - -body, header, #content { overflow: auto; } - -/* Reset */ -body { margin: 0; padding: 0; font-family: sans-serif; } -a, a:visited { color: #003278; text-decoration: none; } -a:hover { text-decoration: underline; } -table { border-spacing: 0; border-collapse: collapse; } - -h2 > span:last-of-type { font-size: 60%; } -h2 > code:last-of-type { -  font-size: 60%; -  margin-left: 2%; -} - -.clearfloat { clear: both; } - -.hastooltip { cursor: help; } -.separated-by-dots > span:not(:first-child):before { content: '·'; margin: 0 3px 0 5px; } - -.slash { color: #666; margin: 0 -0.2em; } - -.history ul, .repolist, .tree ul, .branch-selector ul { -  list-style-type: none; -  padding-left: 0; -} - -/* Header */ -header { font-size: 90%; padding: 0.5%; border-bottom: 3px solid #e0e0e0; } -header a { padding: 0.5% 0; } -header .breadcrumbs > span:before { content: ' » '; color: #666; } -header .slash { margin: 0 -2px; } - - -/* Branch/tag selector */ -.branch-selector { -  position: absolute; -  top: 2px; -  right: 2px; -  font-size: 90%; -  background-color: #fefefe; -} -.branch-selector > * { -  background-color: #fcfcfc; -  position: relative; -} -.branch-selector > span { -  border: 1px solid #f1f1f1; -  padding: 4px 5px; -  float: right; -} -.branch-selector > span:after { content: "☟"; margin-left: 5px; } -.branch-selector > span:hover { background-color: #fefefe; cursor: pointer; } -.branch-selector div { -  z-index: 1; -  clear: both; -  display: none; -} -.branch-selector ul { -  margin: 0; -} -.branch-selector ul + ul { -  border-top: 1px solid #e0e0e0; -} -.branch-selector li a { -  display: block; -  padding: 4px 5px; -  border-bottom: 1px solid #f1f1f1; -} -.branch-selector li:first-child a { border-top: 1px solid #f1f1f1; } -.branch-selector li a:hover { background-color: #fefefe; } -.branch-selector li:last-child a { border: 0; } -.branch-selector:hover { border: 1px solid #ccc; } -.branch-selector:hover > span { border: 0; background-color: inherit; } -.branch-selector:hover div { display: block; } - -/* Footer */ -footer { -  clear: both; -  font-size: 80%; -  float: right; -  color: #666; -  padding: 50px 5px 5px 0; -} -footer a { color: inherit; border-bottom: 1px dotted #666; } -footer a:hover { text-decoration: none; } - - -/* Container */ -#content {  -  padding: 10px 15% 0 15%; -} -#content > div:nth-of-type(1), -#content > div:nth-of-type(2) { float: left; } -#content > div:nth-of-type(1) { width: 24%; } -#content > div:nth-of-type(2) { width: 72%; margin-left: 1.5%; } - - -/* Pagination */ -.pagination { float: right; margin: 0; font-size: 90%; } -.pagination > * { -  border: 1px solid; -  padding: 2px 10px; -  text-align: center; -} -.pagination .n { font-size: 90%; padding: 1px 5px; position: relative; top: 1px; } -.pagination > a { opacity: 0.6; border-color: #6491bf; } -.pagination > a:hover { opacity: 1; text-decoration: none; border-color: #4D6FA0; } -.pagination span { color: #999; border-color: #ccc; } - - -/* Repo List */ -.repolist { margin-left: 2em; font-size: 120%; } -.repolist li { margin-bottom: 10px; } -.repolist li a .last-updated { -  color: #737373; -  font-size: 60%; -  margin-left: 1px; -} -.repolist li a .description { -  color: black; -  font-size: 75%; -  margin-left: 1px; -} -.repolist li a:hover { text-decoration: none; } -.repolist li a:hover .name { text-decoration: underline; } - -.invalid { color: red; } -.invalid .reason { -  color: #737373; -  font-size: 60%; -  margin-left: 1px; -} - -/* Base styles for history and commit views */ -.commit { -  display: block; -  margin-bottom: 2px; -  padding: 8px 10px; -  background-color: #f9f9f9; -  border: 1px solid #e0e0e0; -} -.commit:hover { text-decoration: none; } - -.commit > span { display: block; } - -.commit .line1 { font-family: monospace; padding-bottom: 2px; line-height: 1.3; } -.commit .line1 span { white-space: pre-wrap; text-overflow: hidden; } -.commit:hover .line1 { text-decoration: underline; color: #aaa; } -.commit:hover .line1 span { color: black; } - -.commit .line2 { position: relative; top: 5px; left: 1px; } -.commit .line2 > span:first-child { float: left; } -.commit .line2 > span:nth-child(2) { float: right; } -.commit .line2 { color: #737373; font-size: 80%; } - - -/* History View */ -.history .pagination { margin-top: -2em; } -a.commit { color: black !important; } - -.tree ul { font-family: monospace; border-top: 1px solid #e0e0e0; } -.tree li { background-color: #f9f9f9; border: 1px solid #e0e0e0; border-top: 0; } -.tree li a { -  padding: 5px 7px 6px 7px; -  display: block; -  color: #001533; -  overflow: hidden; -  white-space: nowrap; -  text-overflow: ellipsis; -} -.tree li a:before { -  margin-right: 5px; -  position: relative; -  top: 2px; -  opacity: 0.7; -  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGBhMmAbS/QqsAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAANBJREFUKM+Vkj2OgzAQhb8HSLupkKiQD8DPWbZMkSMgLsF9IlLmMpiKA9CncraIQGbXIPGqsec9faOx1TTNwxhz5YT6vr8lxphr13Wc1D1Zqnmecc4BIGl1LLUk4jgmTVMA1qBzDmvtxuhLEnVdr+fEb5ZleUj0lfgGn/hXh8SiKAKEF+/3F1EUhYkA4zhumlVVARfgBXzvjxoiSkK6/Bt9Q7TWHi7lM8HOVsNE7RMlMQxDkLRs078LEkPh3XfMsuzUZ1Xbts88z3/OhKZpuv8CNeMsq6Yg8OoAAAAASUVORK5CYII=); -} -.tree li a.dir:before { -  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGBhMiMxgE1i8AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAYxJREFUKM+l0r1KXEEYxvH/bNS4K2RNCjsRBAlqITESI0QCuqBdWLwACSJaiZILiDcQkDRql8oUIqkkkRTRwiKVyvoRV5HFEFEX/DjomePsmfNauB4xrLAmD1PNML95eBnV0Fj/vjPRMcpfMcYAMP9jYXDzV3qSO1LSmegYfdvbV/DQ8zS+709oVzu7u78/FwQAHOeU9Y31gsjz5hYcx5lqbXsxdb23ld4eW15aGQmBaDRGZfzxXS1JvukBQCmFUoqZL9PDIWCMQWuX76tnpLIxisqjJC39SXmoM5thg1Q2xsd3XXjGFmWUlz1g6MPc0xIArV0A9o89dg7PiwJqqyoAiHieRzRaZPUCibiuGzb4J+B6Bv8F3LeBtQFeznLrH5RGAgQQEZRSiAgiEIhgrZCzAcYXLnxLzgrxirIbQGuXmvgFR2eGP0caRBEg5BciIAgieRjwrdwAB9lDnrW9Yjlzkr909boIBAiCApGwVWvdE+a+fkOvzX5STd0D86XV7a/vOzy7t/hzaXb85SVDycBfkNNgmgAAAABJRU5ErkJggg==); -} - - -/* Blob, Blame, Diff, Markup View */ -.line { display: block; } -.linenos { background-color: #f9f9f9; text-align: right; } -.linenos a { color: #888; } -.linenos a:hover { text-decoration: none; } -.highlight-line, .highlight-line .line { background-color: #fefed0; } -.linenos a { padding: 0 6px 0 6px; } -.markup table, .markup img, .markup pre { border: 1px solid #e0e0e0; } -.markup table { min-width: 100%; } -.markup img { max-width: 100%; padding: 1px; } -.markup pre { -  padding: 10px 12px; -  background-color: #f9f9f9; -} - - -/* Blob, Blame View */ -.blobview table, .blameview table { min-width: 100%; } -.blobview table, .blameview table { border: 1px solid #e0e0e0; } -.blobview .code, .blameview .code { padding: 0; width: 100%; } -.blobview .code .line, .blameview .code .line { padding: 0 5px 0 10px; } -.blobview .code a, .blameview .code a { color: inherit; } -.blobview .linenos, .blameview .linenos { border: 1px solid #e0e0e0; padding: 0; } - - -/* Blob View */ -.blobview .markup { border: 1px solid #e0e0e0; } -.blobview .markup h1:first-child { margin-top: 8px; } -.blobview .markup { padding: 0 10px; } - - -/* Blame View */ -.blameview .highlighttable { border-top: 0; border-bottom: 0; border-left: 0; } -.blameview .linenos { border-top: 0; border-bottom: 0; border-left: 0; } -.blameview .line-info a { padding: 0 6px 0 6px; } -.blameview .line-info { background-color: #f9f9f9; } - - -/* Commit View */ -.full-commit { width: 100% !important; margin-top: 10px; } - -.full-commit .commit { padding: 15px 20px; } -.full-commit .commit .line1 { padding-bottom: 5px; } -.full-commit .commit:hover .line1 { text-decoration: none; } -.full-commit .commit .line2 > span { float: left; } - -.full-commit .summary { color: #737373; font-size: 80%; margin-top: 25px; } -.full-commit .summary .additions { color: #008800; } -.full-commit .summary .deletions { color: #ee4444; } - -.full-commit .file.collapsed > table { display: none; } - -.diff { font-family: monospace; } -.diff .filename { -  padding: 8px 10px; -  background-color: #f9f9f9; -  border: 1px solid #e0e0e0; -  margin-top: 25px; -} -.diff .filename del { color: #999; } -.diff .filename .summary { float: left; margin: -4px 15px 0 -5px; font-size: 80%; } -.diff .filename .summary .additions { color: green; } -.diff .filename .summary .deletions{ color: red; } - -.diff .togglers { float: right; } -.diff .togglers a { opacity: 0.5; } -.diff .file:not(.collapsed) .togglers .expand   { display: none; } -.diff .file.collapsed       .togglers .collapse { display: none; } - -.diff table, .diff .emptydiff { -  border: 1px solid #e0e0e0; -  border-top: 0; -  background-color: #fdfdfd; -  display: block; -} -.diff .emptydiff { -  padding: 7px 10px; -} -.diff td { -  padding: 0; -  border-left: 1px solid #e0e0e0; -} -.diff td .line { padding: 1px 10px; display: block; min-height: 1.2em; white-space: pre-wrap; } -.diff .linenos { font-size: 85%; padding: 0; vertical-align: top; } -.diff .linenos a { display: block; padding-top: 1px; padding-bottom: 1px; } -.diff td + td + td { width: 100%; } -.diff tr:first-of-type td { padding-top: 7px; } -.diff tr:last-of-type td { padding-bottom: 7px; } -.diff table .del { background-color: #ffdddd; } -.diff table .add { background-color: #ddffdd; } -.diff table .no-newline-marker { font-size: 50%; margin-left: 5px; color: red; } -.diff table del { background-color: #ee9999; text-decoration: none; } -.diff table ins { background-color: #99ee99; text-decoration: none; } -.diff .sep > td { -  height: 1.2em; -  text-align: center; -  background-color: #f9f9f9; -  border: 1px solid #e0e0e0; -} -.diff .sep:hover > td { background-color: #f9f9f9; } - -@media (max-width: 1023px) { -  #content { padding: 5px 1.5%; } -} diff --git a/klaus/requirements.txt b/klaus/requirements.txt deleted file mode 100755 index dbdd421..0000000 --- a/klaus/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -waitress - | 
