UPD README.md and README.ARCH.md
This commit is contained in:
		
							
								
								
									
										105
									
								
								afu/README.md
									
									
									
									
									
								
							
							
						
						
									
										105
									
								
								afu/README.md
									
									
									
									
									
								
							@@ -66,7 +66,7 @@ If it is not already installed, then:
 | 
			
		||||
Afterwards, selenium is installed:
 | 
			
		||||
 | 
			
		||||
	$ sudo apt install python3-selenium
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
#### SSH key generation
 | 
			
		||||
 | 
			
		||||
The program `openssh` is preinstalled on Debian systems. But there is no private/public key installed yet. Best practices generating the key pair:
 | 
			
		||||
@@ -103,29 +103,24 @@ Clone the repository `script` to your site with:
 | 
			
		||||
 | 
			
		||||
	~/gitea$ git clone ssh://git@kuschel.at:21861/public/scripts.git
 | 
			
		||||
 | 
			
		||||
### Check and Test a Website
 | 
			
		||||
 | 
			
		||||
Either go to the directory `~/gitea/scripts/afu/` and run the file `test.py` or create a similar one:
 | 
			
		||||
 | 
			
		||||
	#!/usr/bin/python3
 | 
			
		||||
	from selenium import webdriver
 | 
			
		||||
	from selenium.webdriver.chrome.service import Service as ChromiumService
 | 
			
		||||
	print('We try to connect to https://kuschel.at and get an answer "Family Kuschel and friends"')
 | 
			
		||||
	options = webdriver.ChromeOptions()
 | 
			
		||||
	options.add_argument('--headless')
 | 
			
		||||
	options.add_argument('--no-sandbox')
 | 
			
		||||
	options.add_argument('--disable-dev-shm-usage')
 | 
			
		||||
	driver = webdriver.Chrome(options=options)
 | 
			
		||||
	driver.get("https://kuschel.at")
 | 
			
		||||
	print(driver.title)
 | 
			
		||||
	driver.close()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Ensure you can run `pip` from command line
 | 
			
		||||
 | 
			
		||||
	$ python3 -m pip --version
 | 
			
		||||
 | 
			
		||||
If pip isn’t already installed ("No module named pip"), then first try to bootstrap it from the standard library
 | 
			
		||||
 | 
			
		||||
	$ python3 -m ensurepip --default-pip
 | 
			
		||||
 | 
			
		||||
If this does not work, install the package
 | 
			
		||||
 | 
			
		||||
	$ sudo apt install python3-pip
 | 
			
		||||
 | 
			
		||||
Also `sudo apt install pip` should work.
 | 
			
		||||
 | 
			
		||||
	$ pip install webdriver-manager
 | 
			
		||||
 | 
			
		||||
--
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -156,10 +151,72 @@ Because Arch linux is a rolling distribution, simply update the version to the l
 | 
			
		||||
	
 | 
			
		||||
	$ sudo pacman -Syuv
 | 
			
		||||
 | 
			
		||||
#### Installing of yay (package manager yet another yogurt)
 | 
			
		||||
 | 
			
		||||
	$ sudo pacman -Sy --needed git base-devel
 | 
			
		||||
	$ cd
 | 
			
		||||
	$ git clone https://aur.archlinux.org/yay.git
 | 
			
		||||
	$ cd yay
 | 
			
		||||
	$ makepkg -si
 | 
			
		||||
 | 
			
		||||
	sudo pacman -S python
 | 
			
		||||
#### Python3
 | 
			
		||||
Check if Python is already installed in Arch Linux:
 | 
			
		||||
 | 
			
		||||
Alternative when `yay` is installed:
 | 
			
		||||
	$ python --version
 | 
			
		||||
	Python 3.12.3
 | 
			
		||||
 | 
			
		||||
If it is not already installed, then:
 | 
			
		||||
 | 
			
		||||
	$ yay -S python
 | 
			
		||||
 | 
			
		||||
#### Chromium Browser
 | 
			
		||||
 | 
			
		||||
	$ yay -S chromium
 | 
			
		||||
 | 
			
		||||
#### Manager (selenium)
 | 
			
		||||
Afterwards, selenium is installed:
 | 
			
		||||
 | 
			
		||||
	$ yay -S python-selenium 
 | 
			
		||||
 | 
			
		||||
	$ yay -S selenium-manager
 | 
			
		||||
 | 
			
		||||
#### SSH key generation
 | 
			
		||||
 | 
			
		||||
The program `openssh` is not preinstalled on Arch Linux. Also, there is no private/public key installed yet.
 | 
			
		||||
 | 
			
		||||
	$ yay -S openssh
 | 
			
		||||
 | 
			
		||||
 Best practices generating the key pair:
 | 
			
		||||
 | 
			
		||||
	$ ssh-keygen -t ed25519 -C "your_email@example.com"
 | 
			
		||||
 | 
			
		||||
Personally, I don't use a different name for the keys, I just click through the process.
 | 
			
		||||
The same applies to the passphrase.
 | 
			
		||||
Now go to the website https://git.kuschel.at and copy the content of the public key from ~/.ssh/id__ed25519.pub to the "Manage SSH keys" -- via "Add Key".
 | 
			
		||||
 | 
			
		||||
	$ cat .ssh/id_ed25519.pub
 | 
			
		||||
 | 
			
		||||
#### Git installation and clone the scripts from git.kuschel.at
 | 
			
		||||
 | 
			
		||||
	$ yay -S git less
 | 
			
		||||
 | 
			
		||||
You have to globally configure your `git` with:
 | 
			
		||||
 | 
			
		||||
	$ git config --global user.name "John Doe"
 | 
			
		||||
	$ git config --global user.email your_email@example.com
 | 
			
		||||
Checking the git configuration with:
 | 
			
		||||
 | 
			
		||||
	$ git config -l
 | 
			
		||||
	user.name=<your name>
 | 
			
		||||
	user.email=<your e-mail>
 | 
			
		||||
	 etc.
 | 
			
		||||
 | 
			
		||||
Now create a folder and cd into it
 | 
			
		||||
 | 
			
		||||
	$ mkdir gitea
 | 
			
		||||
	$ cd gitea
 | 
			
		||||
 | 
			
		||||
Clone the repository `script` to your site with:
 | 
			
		||||
 | 
			
		||||
	~/gitea$ git clone ssh://git@kuschel.at:21861/public/scripts.git
 | 
			
		||||
 | 
			
		||||
	yay -S python
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user