summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md98
-rwxr-xr-xget_sd_image.sh10
-rw-r--r--index.html48
-rw-r--r--nessi_generated.jpgbin348863 -> 364929 bytes
-rwxr-xr-xreplace_phrase.sh2
-rw-r--r--todays_audio.opusbin67235 -> 63762 bytes
-rw-r--r--todays_audio.opus.json2
-rw-r--r--todays_audio.opus.srt8
-rw-r--r--todays_audio.opus.tsv3
-rw-r--r--todays_audio.opus.txt3
-rw-r--r--todays_audio.opus.vtt7
-rwxr-xr-xupdate_index.sh15
12 files changed, 37 insertions, 159 deletions
diff --git a/README.md b/README.md
index 2a0b7b7..66997fe 100644
--- a/README.md
+++ b/README.md
@@ -1,92 +1,10 @@
# dynamic-web-page
-
-
-## Getting started
-
-To make it easy for you to get started with GitLab, here's a list of recommended next steps.
-
-Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
-
-## Add your files
-
-- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
-- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
-
-```
-cd existing_repo
-git remote add origin https://gitlab.com/wohilas/dynamic-web-page.git
-git branch -M main
-git push -uf origin main
-```
-
-## Integrate with your tools
-
-- [ ] [Set up project integrations](https://gitlab.com/wohilas/dynamic-web-page/-/settings/integrations)
-
-## Collaborate with your team
-
-- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
-- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
-- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
-- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
-
-## Test and Deploy
-
-Use the built-in continuous integration in GitLab.
-
-- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
-- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
-- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
-- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
-- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
-
-***
-
-# Editing this README
-
-When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
-
-## Suggestions for a good README
-Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
-
-## Name
-Choose a self-explaining name for your project.
-
-## Description
-Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
-
-## Badges
-On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
-
-## Visuals
-Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
-
-## Installation
-Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
-
-## Usage
-Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
-
-## Support
-Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
-
-## Roadmap
-If you have ideas for releases in the future, it is a good idea to list them in the README.
-
-## Contributing
-State if you are open to contributions and what your requirements are for accepting them.
-
-For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
-
-You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
-
-## Authors and acknowledgment
-Show your appreciation to those who have contributed to the project.
-
-## License
-For open source projects, say how it is licensed.
-
-## Project status
-If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
+Automates content creation for main page of my blog
+
+The cronjob runs scripts:
+- get random audio file with phrase;
+- extract text;
+- generate image based on avatar related to text;
+- replace in html;
+- rsync to server;
diff --git a/get_sd_image.sh b/get_sd_image.sh
index 4d9d875..e11de9f 100755
--- a/get_sd_image.sh
+++ b/get_sd_image.sh
@@ -7,21 +7,15 @@ steps=${2:-25}
commonNegative="(((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, authors signature, writing, emoji"
-# model="DPM++ 2M Karras"
model="DPM++ 2M Karras"
imgPath=./nessi_avatar.jpg
sourceIMG=$(base64 -w 0 "$imgPath")
sourceIMG=$"\"$sourceIMG\""
-resp=$(curl --data "{\"init_images\": ["$sourceIMG"], \"steps\":\"$steps\", \"prompt\":\"$prompt\", \"sampler_index\":\"$model\", \"sampler_name\":\"$model\", \"negative_prompt\": \"$commonNegative\", \"denoising_strength\": 0.55, \"cfg_scale\": 23}" --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/img2img)
-
-# curl --data '{"steps":25, "prompt":"confused chess player", "sampler_index":"DPM++ 2M Karras", "sampler_name":"DPM++ 2M Karras"}' --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/txt2img > temp.json
-# echo $resp > temp.json
+resp=$(curl --data "{\"init_images\": ["$sourceIMG"], \"steps\":\"$steps\", \"prompt\":\"$prompt\", \"sampler_index\":\"$model\", \"sampler_name\":\"$model\", \"negative_prompt\": \"$commonNegative\", \"denoising_strength\": 0.58, \"cfg_scale\": 23}" --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/img2img)
# outname=$(printf "$prompt$steps" | xxhsum | cut -d " " -f 1)
-outname="nessi_generated"
-outname="$outname.jpg"
+outname="/home/grail/projects/web/grailblog/src/nessi_generated.jpg"
echo $resp | jq -r '.images[]' | base64 -d > $outname
-# jq -r '.images[]' temp.json | base64 -d > $outname
diff --git a/index.html b/index.html
deleted file mode 100644
index 1c09e88..0000000
--- a/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!doctype html>
-
-<head>
- <title>Index page</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="style.css">
- <script async src="https://ackee.grailfinder.net/tracker.js" data-ackee-server="https://ackee.grailfinder.net" data-ackee-domain-id="49bb31db-aeb0-47b0-9964-4c9650306394"></script>
-</head>
-
-<body>
-<div id="content">
- <h2>Todays phrase</h2>
- <p id=phrase>Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus. </p>
- <img src=nessi_generated.jpg alt="some nessi generated image" width=250 height=250></img>
- <p>
- todays_audio.opus <br />
- <audio controls>
- <source src="./todays_audio.opus" type="audio/ogg">
- Your browser does not support the audio element.
- </audio>
- </p>
-
-
- <h2>Site introduction:</h2>
- <p>stories about encountering problems and solving them</p>
-
- <div>
- <h2>Text manipulation</h2>
- <ul>
- <li><a href="text_manipulation/extraction/reasoning.html">Text extraction (from german videoaudiobook "Overlord")</a></li>
- </ul>
- <h2>Audio manipulation</h2>
- <ul>
- <li><a href="audio_related/voice_cloning/reasoning.html">Voice cloning (of youtuberin NesfateLP)</a></li>
- </ul>
-</div>
-
-<div>
- <h2>
- <a href="./contacts.html">
- Contacts
- </a>
- </h2>
-</div>
-
-
-</div>
-</body>
diff --git a/nessi_generated.jpg b/nessi_generated.jpg
index d7bec3d..96fb7b4 100644
--- a/nessi_generated.jpg
+++ b/nessi_generated.jpg
Binary files differ
diff --git a/replace_phrase.sh b/replace_phrase.sh
index 1b61476..7ab4da8 100755
--- a/replace_phrase.sh
+++ b/replace_phrase.sh
@@ -14,4 +14,4 @@ echo "$phrase"
# just do oneline
phrase=$(echo $phrase | tr "\n" " ")
-sed -i -e "s|\(<p id=phrase>\)\(.*\)\(</p>\)|\1${phrase}\3|" index.html
+sed -i -e "s|\(<p id=phrase>\)\(.*\)\(</p>\)|\1${phrase}\3|" /home/grail/projects/web/grailblog/src/index.html
diff --git a/todays_audio.opus b/todays_audio.opus
index 1c19722..fa0f0bf 100644
--- a/todays_audio.opus
+++ b/todays_audio.opus
Binary files differ
diff --git a/todays_audio.opus.json b/todays_audio.opus.json
index 9b40607..f34fe34 100644
--- a/todays_audio.opus.json
+++ b/todays_audio.opus.json
@@ -1 +1 @@
-{"text": " Aber jedes einzelne Brett ist dick und sie haben keine L\u00fccken dazwischen, also sieht es gut aus.", "segments": [{"id": 0, "seek": 0, "start": 0.0, "end": 5.5200000000000005, "text": " Aber jedes einzelne Brett ist dick und sie haben keine L\u00fccken dazwischen, also sieht es gut aus.", "tokens": [50364, 5992, 36119, 36731, 716, 29447, 1418, 18659, 674, 2804, 3084, 9252, 441, 26037, 274, 921, 86, 6282, 11, 611, 14289, 785, 5228, 3437, 13, 50640], "temperature": 0.0, "avg_logprob": -0.22456582387288412, "compression_ratio": 1.0543478260869565, "no_speech_prob": 0.011318010278046131}], "language": "de"} \ No newline at end of file
+{"text": " Oh, ihr seid also die Helden, die unsere Quelle versegeln werden? Ha, viel Gl\u00fcck!", "segments": [{"id": 0, "seek": 0, "start": 0.0, "end": 4.8, "text": " Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?", "tokens": [876, 11, 5553, 38041, 611, 978, 6128, 1556, 11, 978, 14339, 4493, 2447, 7996, 70, 9878, 4604, 30], "temperature": 0.0, "avg_logprob": -0.2906264236995152, "compression_ratio": 1.0, "no_speech_prob": 0.007941224612295628}, {"id": 1, "seek": 480, "start": 4.8, "end": 30.8, "text": " Ha, viel Gl\u00fcck!", "tokens": [50364, 4064, 11, 5891, 33508, 0, 51664], "temperature": 0.0, "avg_logprob": -0.6473857164382935, "compression_ratio": 0.6666666666666666, "no_speech_prob": 0.0021506426855921745}], "language": "de"} \ No newline at end of file
diff --git a/todays_audio.opus.srt b/todays_audio.opus.srt
index e3f0449..7b3404f 100644
--- a/todays_audio.opus.srt
+++ b/todays_audio.opus.srt
@@ -1,4 +1,8 @@
1
-00:00:00,000 --> 00:00:05,520
-Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus.
+00:00:00,000 --> 00:00:04,800
+Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
+
+2
+00:00:04,800 --> 00:00:30,800
+Ha, viel Glück!
diff --git a/todays_audio.opus.tsv b/todays_audio.opus.tsv
index bb197e2..db93545 100644
--- a/todays_audio.opus.tsv
+++ b/todays_audio.opus.tsv
@@ -1,2 +1,3 @@
start end text
-0 5520 Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus.
+0 4800 Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
+4800 30800 Ha, viel Glück!
diff --git a/todays_audio.opus.txt b/todays_audio.opus.txt
index d61204e..c7f4537 100644
--- a/todays_audio.opus.txt
+++ b/todays_audio.opus.txt
@@ -1 +1,2 @@
-Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus.
+Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
+Ha, viel Glück!
diff --git a/todays_audio.opus.vtt b/todays_audio.opus.vtt
index 5ec228d..321b075 100644
--- a/todays_audio.opus.vtt
+++ b/todays_audio.opus.vtt
@@ -1,5 +1,8 @@
WEBVTT
-00:00.000 --> 00:05.520
-Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus.
+00:00.000 --> 00:04.800
+Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
+
+00:04.800 --> 00:30.800
+Ha, viel Glück!
diff --git a/update_index.sh b/update_index.sh
index f675188..61a0e03 100755
--- a/update_index.sh
+++ b/update_index.sh
@@ -6,13 +6,18 @@ dir=${1:-}
filepath=$(du -a $dir | awk '($1 > 50) {print $2}' | shuf -n 1)
echo "$filepath"
-mpv "$filepath"
-cp "$filepath" todays_audio.opus
+cp "$filepath" /home/grail/projects/web/dynamic-web-page/todays_audio.opus
-whisper --model medium --language de --device cpu todays_audio.opus
+whisper --model medium --language de --device cpu /home/grail/projects/web/dynamic-web-page/todays_audio.opus
phrase=$(cat todays_audio.opus.txt)
-./replace_phrase.sh "$phrase"
+phrase=$(echo $phrase | tr "\n" " ")
+/home/grail/projects/web/dynamic-web-page/get_sd_image.sh "$phrase"
+/home/grail/projects/web/dynamic-web-page/replace_phrase.sh "$phrase"
-./get_sd_image.sh "$phrase"
+# in case of error go back
+# cp audio.bak todays_audio.opus
+
+cp "$filepath" /home/grail/projects/web/grailblog/src/todays_audio.opus
+rsync -rPha /home/grail/projects/web/grailblog/src hostiko:/var/www