commit message from python script
This commit is contained in:
26
build_package/main.py
Normal file
26
build_package/main.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#! /usr/bin/env python3.10
|
||||
|
||||
import yaml, os
|
||||
|
||||
def read_yaml_file(yaml_file = str):
|
||||
with open (yaml_file, "r") as yaml_file_read:
|
||||
prime_service = yaml.safe_load(yaml_file_read)
|
||||
return prime_service
|
||||
|
||||
def read_commit_id():
|
||||
pass
|
||||
|
||||
def create_project_in_folder():
|
||||
pass
|
||||
|
||||
def create_tar_file():
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
script_folder = os.path.dirname(os.path.realpath(__file__))
|
||||
root_yaml_datei = script_folder + os.sep + "package_info.yml"
|
||||
yaml_input = read_yaml_file(root_yaml_datei)
|
||||
package_datei = yaml_input["package"]["datei"]
|
||||
package_datei_arg = yaml_input["package"]["arg"]
|
||||
print(package_datei)
|
||||
print(package_datei_arg)
|
||||
7
build_package/package_info.yml
Normal file
7
build_package/package_info.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
package:
|
||||
datei: "ich bin eine datei"
|
||||
type: msi
|
||||
arg: /quiet /qn /norestart
|
||||
|
||||
|
||||
@@ -58,5 +58,5 @@ test:
|
||||
yaml.dump(my_yaml, file)
|
||||
|
||||
#example modify yaml
|
||||
#read_and_modify_one_block_of_yaml_data(filename="test.yml", key="year", value="2020")
|
||||
#read_and_modify_one_block_of_yaml_data(filename="test.yml", key="year", value="2021")
|
||||
#read_modify_save_yaml_data('test.yml', 0, 'test', 'test3', "test2")
|
||||
15
test_skripte/verstehen_map.py
Normal file
15
test_skripte/verstehen_map.py
Normal file
@@ -0,0 +1,15 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
def replace_from(input = str):
|
||||
return input.replace("test", "mammam")
|
||||
|
||||
print(replace_from(input="test dk"))
|
||||
|
||||
|
||||
|
||||
test = ["test 0", "test 2", "test 3" ]
|
||||
#map verfendet eine funktion auf eine Liste an
|
||||
splitting_map = map(len, test)
|
||||
print(list(splitting_map))
|
||||
splitting_test = map(replace_from, test)
|
||||
print(list(splitting_test))
|
||||
Reference in New Issue
Block a user