Author SHA1 Message Date
pierre geeraert 8b68d52be0 try
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9m24s
2025-07-31 22:00:56 +01:00
pierre geeraert 8f52aca2b4 try the unbuffered 2025-07-31 21:47:13 +01:00
pierre geeraert 744f920854 wrong copy/paste
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m49s
2025-07-31 21:09:41 +01:00
pierre geeraert fe43d274cb change process
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m56s
2025-07-31 20:56:46 +01:00
pierre geeraert 53f4c17a08 fix ident
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8m14s
2025-07-31 20:13:22 +01:00
pierre geeraert f728cdafb4 try to integrate extra URLs
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m21s
2025-07-31 20:02:46 +01:00
pi-ux-ce 21b4b9b7fb Merge pull request 'use_external_url' (#5) from use_external_url into main
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6m46s
Reviewed-on: #5
2025-07-31 18:27:38 +00:00
4 changed files with 26 additions and 9 deletions
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Scaled up</title> <title>Stash form</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
@@ -277,7 +277,7 @@
<fieldset> <fieldset>
<label for="external_galleries"> <label for="external_galleries">
Any external galleries ? Any external galleries ?
<textarea id="external_galleries" maxlength="194"></textarea> <textarea id="external_galleries" name="external_galleries" ></textarea>
</label> </label>
</fieldset> </fieldset>
<button id="submit" type="submit" class="btn">Submit the form</button> <button id="submit" type="submit" class="btn">Submit the form</button>
+18 -6
View File
@@ -23,25 +23,37 @@ def handle_survey_form(request):
v1 = client.BatchV1Api() v1 = client.BatchV1Api()
name = request.GET.get('name') name = request.GET.get('name')
url = request.GET.get('url') url = request.GET.get('url')
external_galleries = request.GET.get('external_galleries') external_galleries = str(request.GET.get('external_galleries'))
stash_folder = "/stash"
if external_galleries:
print("external_galleries is not null")
performer_external_galleries = stash_folder+"/"+name+"_external_galleries.txt"
with open(performer_external_galleries, "a") as f:
f.write(external_galleries)
skip_searching_gallery = True
else:
print("external_galleries is null")
print("another")
skip_searching_gallery = False
with open('django_code/stash_management/templates/template.stash-pornpics-dowloader.job.yml', 'r') as file: with open('django_code/stash_management/templates/template.stash-pornpics-dowloader.job.yml', 'r') as file:
#get the manifest in a variable template_manifest from the manifest file #get the manifest in a variable template_manifest from the manifest file
template_manifest = yaml.safe_load(file) template_manifest = yaml.safe_load(file)
#edit the container name #edit the container name
template_manifest['metadata']['name'] ="stash-pornpics-dowloader"+name template_manifest['metadata']['name'] ="stash-pornpics-dowloader-"+name
template_manifest['spec']['template']['spec']['containers'][0]['name'] ="stash-pornpics-dowloader-"+name template_manifest['spec']['template']['spec']['containers'][0]['name'] ="stash-pornpics-dowloader-"+name
#edit the command based on the input #edit the command based on the input
command=['bash', '/config/download.sh', '--http_proxy', 'http://gluetun-svc.gluetun.svc:8888', '--BASE_URL', url, '--pornstars', name,'--external_gallery', external_galleries] command=['bash', '/config/download.sh', '--http_proxy', 'http://gluetun-svc.gluetun.svc:8888', '--BASE_URL', url, '--pornstars', name]
template_manifest['spec']['template']['spec']['containers'][0]['command']=command template_manifest['spec']['template']['spec']['containers'][0]['command']=command
#execute based on the value #execute based on the value
api_response = v1.create_namespaced_job(body=template_manifest,namespace='stash') #api_response = v1.create_namespaced_job(body=template_manifest,namespace='stash')
return HttpResponse(template_manifest)
return HttpResponse(api_response)
+4
View File
@@ -1,10 +1,14 @@
FROM python:3 FROM python:3
ENV PYTHONUNBUFFERED 1
WORKDIR /code/ WORKDIR /code/
COPY requirements.txt ./ COPY requirements.txt ./
COPY django_code ./ COPY django_code ./
RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip
RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir -r requirements.txt RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
+1
View File
@@ -8,3 +8,4 @@ ruamel.yaml
pyyaml pyyaml
django-bootstrap-v5 django-bootstrap-v5
jinja2 jinja2
watchdog