<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DevOps &amp; Automation Archives - Creatronix</title>
	<atom:link href="https://creatronix.de/category/devops/feed/" rel="self" type="application/rss+xml" />
	<link>https://creatronix.de/category/devops/</link>
	<description>My adventures in code &#38; business</description>
	<lastBuildDate>Sun, 28 Sep 2025 08:38:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Convert Excel Sheets to Confluence Tables</title>
		<link>https://creatronix.de/convert-excel-sheets-to-confluence-tables/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Thu, 16 Mar 2023 13:14:20 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Software Engineering & Programming]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=6676</guid>

					<description><![CDATA[<p>Motivation Migrating old documentation from Microsoft Excel into Atlassian Confluence I was bamboozled that I couldn&#8217;t simply copy paste excel data into Confluence Tables. Duh! Googling around for a couple of minutes a provided solution looked like that: Convert Excel to markdown Use the &#8220;Insert markdown&#8221; macro in Confluence Excel to markdown There are several&#8230;</p>
<p>The post <a href="https://creatronix.de/convert-excel-sheets-to-confluence-tables/">Convert Excel Sheets to Confluence Tables</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Migrating old documentation from Microsoft Excel into Atlassian Confluence I was bamboozled that I couldn&#8217;t simply copy paste excel data into Confluence Tables. Duh!</p>
<p>Googling around for a couple of minutes a provided solution looked like that:</p>
<ul>
<li>Convert Excel to markdown</li>
<li>Use the &#8220;Insert markdown&#8221; macro in Confluence</li>
</ul>
<h2>Excel to markdown</h2>
<p>There are several ways to convert Excel to markdown:</p>
<h3>Online Converters</h3>
<p>There are quite a few only converters e.g.<br />
<a href="https://www.tablesgenerator.com/markdown_tables">https://www.tablesgenerator.com/markdown_tables</a><br />
but beware: when dealing with sensitive company data you might want to avoid these!</p>
<h3>IDE integration</h3>
<p>For Visual Studio Code there is a neat extension:<br />
<a href="https://marketplace.visualstudio.com/items?itemName=csholmq.excel-to-markdown-table">https://marketplace.visualstudio.com/items?itemName=csholmq.excel-to-markdown-table</a></p>
<h3>Some Python</h3>
<p>Another way is to use pandas to take care of the conversion:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>import pandas as pd
df = pd.read_excel('test.xlsx')
md_table = df.to_markdown(index=False)
with open("test.md", "w") as f:
    f.write(md_table)
</code></pre>
</div>
<p>When we are dealing with multiple sheets inside our excel document we can do the following:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>sheet_names = pd.ExcelFile('test.xlsx').sheet_names
for sheet in sheet_names:
    df = pd.read_excel('test.xlsx', sheet)
    md_table = df.to_markdown(index=False)
    print(md_table)
    with open(f"test_{sheet}.md", "w") as f:
        f.write(md_table)
</code></pre>
</div>
<p>The post <a href="https://creatronix.de/convert-excel-sheets-to-confluence-tables/">Convert Excel Sheets to Confluence Tables</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Cloud Computing Overview</title>
		<link>https://creatronix.de/cloud-computing-overview/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Sat, 18 Feb 2023 12:52:41 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Software Engineering & Programming]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=6637</guid>

					<description><![CDATA[<p>Motivation Getting the AWS Cloud Practitioner Certificate is one of my goals from my New Year&#8217;s Resolutions and Technology Learning Roadmap 2023 So time to buckle up and learn about cloud concepts first! The Cloud tl;dr; the cloud is someone else&#8217;s computer 🙂 In general cloud computing means that you don&#8217;t pay for computer hardware&#8230;</p>
<p>The post <a href="https://creatronix.de/cloud-computing-overview/">Cloud Computing Overview</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Getting the AWS Cloud Practitioner Certificate is one of my goals from my <a href="https://creatronix.de/new-years-resolutions-and-technology-learning-roadmap-2023/">New Year&#8217;s Resolutions and Technology Learning Roadmap 2023</a><br />
So time to buckle up and learn about cloud concepts first!</p>
<h2>The Cloud</h2>
<p><em>tl;dr; the cloud is someone else&#8217;s computer 🙂</em></p>
<p>In general cloud computing means that you don&#8217;t pay for computer hardware like servers, NAS, SAN devices anymore.<br />
Instead, you use them as a service.</p>
<h2>Service Models</h2>
<p>There are a couple of different service models.</p>
<h3></h3>
<h3><img fetchpriority="high" decoding="async" src="https://creatronix.de/wp-content/uploads/2025/09/service-models-1024x895.png" alt="" width="1024" height="895" class="alignnone size-large wp-image-7571" srcset="https://creatronix.de/wp-content/uploads/2025/09/service-models-1024x895.png 1024w, https://creatronix.de/wp-content/uploads/2025/09/service-models-300x262.png 300w, https://creatronix.de/wp-content/uploads/2025/09/service-models-768x671.png 768w, https://creatronix.de/wp-content/uploads/2025/09/service-models.png 1143w" sizes="(max-width: 1024px) 100vw, 1024px" />IaaS</h3>
<p>Renting other people&#8217;s servers and storage units is called <strong>Infrastructure as a service or IaaS.</strong><br />
Instead of installing components into a well-protected, air-conditioned server room on your company&#8217;s premise you pay the cloud provider for doing so.<br />
Advantages: You trade capital expense with operational expenses.<br />
Disadvantages: operating costs of data centers are also comprised of maintaining the software components.<br />
So another service model is called Platform as a service or PaaS</p>
<h3>PaaS</h3>
<p>In this use case you pay for hardware usage and updates of the system as well. This is called <strong>Platform as a Service</strong> (PaaS)<br />
The PaaS provider will take care of updating the OS and other dedicated packages (think: sudo apt-get)<br />
You will only have to keep your applications up to date.</p>
<h3>SaaS</h3>
<p>Last but not least: SaaS or <strong>Software as Service</strong><br />
In many cases you want to use a specific software and don&#8217;t want to be concerned with keeping the application itself upto-date<br />
(thinks databases) So there is a service model where you just use a specific software and don&#8217;t have to worry about updates / maintenance at all.</p>
<h3>FaaS</h3>
<p>Ah, hold on, one more thing. There is a so called &#8220;serverless&#8221; concept.<br />
Serverless vendors offer compute runtimes, also known as Function as a Service (FaaS)<br />
The cloud provider allocates machine resources on demand, taking care of the servers on behalf of their customers.<br />
An example is AWS Lambda</p>
<h2>Further Reading</h2>
<p><a href="https://aws.amazon.com/types-of-cloud-computing/">https://aws.amazon.com/types-of-cloud-computing/</a></p>
<p>The post <a href="https://creatronix.de/cloud-computing-overview/">Cloud Computing Overview</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to create youtube thumbnails &#8211; pillow tutorial</title>
		<link>https://creatronix.de/how-to-create-youtube-thumbnails-pillow-tutorial/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Tue, 15 Nov 2022 14:57:14 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=6387</guid>

					<description><![CDATA[<p>Motivation Inspired by automate the boring stuff and motivated by my last automation attempts, I wanted to see if there is more stuff which can be automated. Creating YouTube thumbnails is one of the time consuming tasks I tried to simplify. Installation Pillow is a fork of PIL the Python Imaging Library. We can install&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-create-youtube-thumbnails-pillow-tutorial/">How to create youtube thumbnails &#8211; pillow tutorial</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Inspired by automate the boring stuff and motivated by my <a href="https://creatronix.de/category/devops/">last automation attempts</a>, I wanted to see if there is more stuff which can be automated.<br />
Creating YouTube thumbnails is one of the time consuming tasks I tried to simplify.</p>
<h2>Installation</h2>
<p>Pillow is a fork of PIL the Python Imaging Library. We can install it with:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Bash"><code>pip install pillow
</code></pre>
</div>
<h2>Loading images</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>def test_open_image():
    thumbnail = Image.open("example_img.jpg")
    assert thumbnail.size == (4032, 3024)
</code></pre>
</div>
<h2><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/11/example_img-1024x768.jpg" alt="" class="alignnone size-large wp-image-6381" width="1024" height="768" srcset="https://creatronix.de/wp-content/uploads/2022/11/example_img-1024x768.jpg 1024w, https://creatronix.de/wp-content/uploads/2022/11/example_img-300x225.jpg 300w, https://creatronix.de/wp-content/uploads/2022/11/example_img-768x576.jpg 768w, https://creatronix.de/wp-content/uploads/2022/11/example_img.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></h2>
<h2>Resizing Images</h2>
<p>YouTube recommends 1200&#215;720 as the standard thumbnail size. So let&#8217;s use pillow to resize the image:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>thumbnail = Image.open("example_img.jpg").convert("RGB")
thumbnail.thumbnail((1200, 720), Image.LANCZOS)
thumbnail.save("example_img_resized.jpg")
</code></pre>
</div>
<h2>Loading Fonts</h2>
<p>The TrueType font format was developed by Apple and Microsoft as a response to the PostScript font format.<br />
TTF has long been the most common format for fonts on Mac and Windows operating systems.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>title_font = ImageFont.truetype(r'c:\windows\fonts\arial.ttf')
</code></pre>
</div>
<p>If you are sure that the font is a registered system font you don&#8217;t need to provide the absolute path</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>title_font = ImageFont.truetype('arial.ttf')
</code></pre>
</div>
<p>On macOs you will encounter another related format which is called ttc</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>title_font = ImageFont.truetype("Supplemental/Futura.ttc")
</code></pre>
</div>
<h3>Font size</h3>
<p>The default size of the loaded font is 10. With the size parameter you can adjust that:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>title_font = ImageFont.truetype("Supplemental/Futura.ttc", size=120)
</code></pre>
</div>
<h2>Drawing text on images</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>thumbnail = Image.open("example_img.jpg")
if sys.platform == "win32":
    title_font = ImageFont.truetype("arial.ttf", size=120)
else:
    title_font = ImageFont.truetype("Supplemental/Futura.ttc", size=120)
draw_surface = ImageDraw.<strong>Draw</strong>(thumbnail, 'RGBA')
draw_surface.<strong>text</strong>((0, 0), "Hello Pillow", font=title_font, <strong>fill</strong>=(148, 14, 76, 0))
thumbnail.save("thumbnail_with_text.jpg")
</code></pre>
</div>
<p>For adding text we need to add a drawing surface to the image with the Draw function. The text function will draw the text to the surface. The fill parameter takes an RGBA tuple for the font color.</p>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_text-1024x768.jpg" alt="" class="alignnone size-large wp-image-6384" width="1024" height="768" srcset="https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_text-1024x768.jpg 1024w, https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_text-300x225.jpg 300w, https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_text-768x576.jpg 768w, https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_text.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<h2>Centering text</h2>
<p>To center the text in x-axis we need the width of the image and the width of the textbox</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>thumbnail = Image.open("example_img.jpg")
thumbnail_width = thumbnail.size[0]
</code></pre>
</div>
<p>The image object has a size attribute. The width is at index 0</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>left, top, right, bottom = title_font.getbbox("Hello Pillow")
</code></pre>
</div>
<p>With the getbbox function we can get the coordinates of the left top and the right bottom of the text&#8217;s bounding box so we have to calculate the width with:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>textbox_width = right - left
</code></pre>
</div>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/11/calculate_center.png" alt="" class="alignnone size-full wp-image-6386" width="591" height="245" srcset="https://creatronix.de/wp-content/uploads/2022/11/calculate_center.png 591w, https://creatronix.de/wp-content/uploads/2022/11/calculate_center-300x124.png 300w" sizes="(max-width: 591px) 100vw, 591px" /></p>
<p>Finally we can calculate the starting position of the textbox:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>textbox_start_x = (thumbnail_width - textbox_width) / 2
</code></pre>
</div>
<h2><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_centered_text-1024x768.jpg" alt="" class="alignnone size-large wp-image-6385" width="1024" height="768" srcset="https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_centered_text-1024x768.jpg 1024w, https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_centered_text-300x225.jpg 300w, https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_centered_text-768x576.jpg 768w, https://creatronix.de/wp-content/uploads/2022/11/thumbnail_with_centered_text.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></h2>
<h2>Complete Code</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>from PIL import Image, ImageFont, ImageDraw
def test_add_centered_text_to_image():
    thumbnail = Image.open("example_img.jpg")
    draw_surface = ImageDraw.Draw(thumbnail)
    title_font = ImageFont.truetype("arial.ttf", size=120)
    thumbnail_width = thumbnail.size[0]
    left, top, right, bottom = title_font.getbbox("Hello Pillow")
    textbox_width = right - left
    textbox_start_x = (thumbnail_width - textbox_width) / 2
    textbox_start_y = 80
    draw_surface.text((textbox_start_x, textbox_start_y), "Hello Pillow", font=title_font, fill=PG_GREEN)
    thumbnail.save("thumbnail_with_centered_text.jpg")
</code></pre>
</div>
<p>The post <a href="https://creatronix.de/how-to-create-youtube-thumbnails-pillow-tutorial/">How to create youtube thumbnails &#8211; pillow tutorial</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to create WordPress articles via REST API</title>
		<link>https://creatronix.de/how-to-create-wordpress-articles-via-rest-api/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Fri, 04 Nov 2022 16:06:29 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=6353</guid>

					<description><![CDATA[<p>Motivation If you had less menial manual work you could sit at the beach and relax more often 🙂 So regarding my pain points I figured out that publishing articles to my blog takes a huge amount of time too. In order to publish an article I need to: Log in into the WordPress backend&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-create-wordpress-articles-via-rest-api/">How to create WordPress articles via REST API</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>If you had less menial manual work you could sit at the beach and relax more often 🙂</p>
<p>So regarding my pain points I figured out that publishing articles to my blog takes a huge amount of time too.</p>
<p>In order to publish an article I need to:</p>
<ul>
<li>Log in into the WordPress backend</li>
<li>Create a new post in the WordPress backend</li>
<li>Insert the markdown text for the article into the post (I write my articles in markdown and use github for versioning)</li>
<li>Convert the markdown format into HTML by pressing the enter key on every tag (sic!) (so that ## becomes h2)</li>
<li>Upload all media / images</li>
<li>Insert images into the post</li>
<li>Select the featured image</li>
<li>Write some SEO relevant metadata</li>
<li>Publish the post</li>
</ul>
<p>Why not &#8220;Automate the boring stuff&#8221; here as well? In this part I will show you the first part of publishing a post.</p>
<h2>Prerequisites</h2>
<p>For uploading we use the requests module. So let&#8217;s install it via:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-bash" data-lang="Bash"><code>pip install requests</code></pre>
</div>
<h3>Application Password</h3>
<p>As another prerequisites we need an application password:</p>
<ul>
<li>Log in to your WordPress site with an admin user account</li>
<li>Navigate to Users &gt; Profile.</li>
<li>Scroll down to the “Application Passwords” heading.</li>
<li>Enter an application name</li>
<li>Click &#8220;Add New Application Password&#8221;</li>
<li>Store the generated password in a secure place</li>
</ul>
<h2>Uploading Posts</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>data = {
    'title': 'Example wordpress post',
    'status': 'draft',
    'slug': 'example-wordpress-post',
    'author': 1,
    'content': '# H1 heading \n ## h2 heading'
}
</code></pre>
</div>
<p>This is the minimal data you have to provide to be able to create a post via API.<br />
The author has to be an integer. You can find the users&#8217; ids via https://&lt;your_wordpress_site&gt;<your_wp_site>/wp-json/wp/v2/users in your browser.</your_wp_site></p>
<h3>Authentication</h3>
<p>For authentication you need a header:<code></code></p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>WORDPRESS_CREDENTIALS = USER_NAME + ":" + APPLICATION_PASSWORD 
WORDPRESS_TOKEN = base64.b64encode(WORDPRESS_CREDENTIALS.encode()) 
WORDPRESS_HEADER = {'Authorization': 'Basic ' + WORDPRESS_TOKEN.decode('utf-8')}</code></pre>
</div>
<p>USER_NAME has to be a real user with admin rights not the application password name (It got me confused)</p>
<h3>Posting the Post</h3>
<p>We use the REST API v2 which is located at:<your_wp_site></your_wp_site></p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>WORDPRESS_API = "https://&lt;your_wordpress_site&gt;/wp-json/wp/v2"</code></pre>
</div>
<p>The endpoint for uploading posts is</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>API_ENDPOINT = WORDPRESS_API + "/posts"</code></pre>
</div>
<p>Now we have all information to finally post the post</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>def upload_post(data):
    response = requests.post(API_ENDPOINT, json=data, headers=WORDPRESS_HEADER)
    return response
</code></pre>
</div>
<h2>Little helpers</h2>
<h3>Creating slugs</h3>
<p>Normally the slug for a post is the title just with lowercase and hyphen instead of spaces<br />
(That&#8217;s what the editor in the wp backend would normally do automatically)<br />
So let&#8217;s do this programmatically as well:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>def make_slug_from_title(title):
    slug = title.lower().replace(" ", "-")
    return slug
</code></pre>
</div>
<h3>Converting from markdown to HTML</h3>
<p>With the markdown package you can convert your article before uploading</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-bash" data-lang="Bash"><code>pip install Markdown</code></pre>
</div>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>html_text = markdown(article_content, output_format="html")
</code></pre>
</div>
<p>Just one line of additional code. I love Python!</p>
<h3>Reading and Converting a markdown file</h3>
<p>To create the data for the upload in one go I wrote a convenience function:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>def get_article_data(folder):
    base_dir = '../content'
    article = os.path.join(base_dir, folder, folder + ".md")
    with open(article, "r") as f:
        title = f.readline().replace("#", "").strip()
        article_content = f.read()
    html_text = markdown(article_content, output_format="html")
    slug = make_slug_from_title(title)
    data = {
        'title': title,
        'status': 'draft',
        'slug': slug,
        'author': 1,
        'content': html_text,
    }
    return data
</code></pre>
</div>
<h3>Putting it together</h3>
<p>With these helpers you can condense it into</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>data = get_article_data(folder)
upload_post(data)
</code></pre>
</div>
<h2>Further Reading</h2>
<p><a href="https://creatronix.de/how-to-use-automator-on-macos/">How to use Automator on macOS</a></p>
<p><a href="https://creatronix.de/how-to-use-google-translate-with-python/">How to use google translate with python</a></p>
<p><a href="https://developer.wordpress.org/rest-api/">https://developer.wordpress.org/rest-api/</a></p>
<p>The post <a href="https://creatronix.de/how-to-create-wordpress-articles-via-rest-api/">How to create WordPress articles via REST API</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use Automator on macOS</title>
		<link>https://creatronix.de/how-to-use-automator-on-macos/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Sun, 30 Oct 2022 09:45:43 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Tools]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=6292</guid>

					<description><![CDATA[<p>Motivation Inspired by the session at BarCamp Regensburg I started to think about pain points in my workflow. I figured out that the conversion of my photos was too cumbersome. Before When writing articles I download the images from my phone via AirDrop to my Mac. Apple stores images in the HEIC format on my&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-use-automator-on-macos/">How to use Automator on macOS</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Inspired by the session at <a href="https://creatronix.de/barcamp-regensburg-2022/">BarCamp Regensburg</a> I started to think about pain points in my workflow. I figured out that the conversion of my photos was too cumbersome.</p>
<h2>Before</h2>
<p>When writing articles I download the images from my phone via AirDrop to my Mac. Apple stores images in the HEIC format on my iPhone. I cannot upload HEIC directly to my blog. So I need to convert them with Preview by opening and exporting them to jpg. This is not very elegant especially when you have a lot of images.</p>
<h2>Automation</h2>
<p>So let&#8217;s see if we can use Automator to make our lives easier</p>
<h3>Open Automator</h3>
<p>Go to Launchpad and Open Automator</p>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_icon.png" alt="" class="alignnone wp-image-6300 size-full" width="463" height="425" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_icon.png 463w, https://creatronix.de/wp-content/uploads/2022/10/automator_icon-300x275.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></p>
<p>This is the main screen:</p>
<h3><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_main_screen-1024x728.png" alt="" class="alignnone wp-image-6303 size-large" width="1024" height="728" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_main_screen-1024x728.png 1024w, https://creatronix.de/wp-content/uploads/2022/10/automator_main_screen-300x213.png 300w, https://creatronix.de/wp-content/uploads/2022/10/automator_main_screen-768x546.png 768w, https://creatronix.de/wp-content/uploads/2022/10/automator_main_screen.png 1301w" sizes="(max-width: 1024px) 100vw, 1024px" /></h3>
<h3>Quick Action</h3>
<p>Select &#8220;Quick Action&#8221; from menu</p>
<h3><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_quick_action.png" alt="" class="alignnone wp-image-6304 size-full" width="555" height="509" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_quick_action.png 555w, https://creatronix.de/wp-content/uploads/2022/10/automator_quick_action-300x275.png 300w" sizes="(max-width: 555px) 100vw, 555px" /></h3>
<h3>Select Action</h3>
<p>Search for &#8220;Change Types of Images&#8221;</p>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_change_image_type-1024x728.png" alt="" class="alignnone wp-image-6295 size-large" width="1024" height="728" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_change_image_type-1024x728.png 1024w, https://creatronix.de/wp-content/uploads/2022/10/automator_change_image_type-300x213.png 300w, https://creatronix.de/wp-content/uploads/2022/10/automator_change_image_type-768x546.png 768w, https://creatronix.de/wp-content/uploads/2022/10/automator_change_image_type.png 1301w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>Drag &amp; Drop it to the right panel and set Output Image Type by setting the &#8220;To Type&#8221; dropdown to JPEG</p>
<h3><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_to_jpg-1024x728.png" alt="" class="alignnone wp-image-6305 size-large" width="1024" height="728" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_to_jpg-1024x728.png 1024w, https://creatronix.de/wp-content/uploads/2022/10/automator_to_jpg-300x213.png 300w, https://creatronix.de/wp-content/uploads/2022/10/automator_to_jpg-768x546.png 768w, https://creatronix.de/wp-content/uploads/2022/10/automator_to_jpg.png 1301w" sizes="(max-width: 1024px) 100vw, 1024px" /></h3>
<h3>Export</h3>
<p>Open the Menu File -&gt; Export</p>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_export_1.png" alt="" class="alignnone wp-image-6298 size-full" width="342" height="423" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_export_1.png 342w, https://creatronix.de/wp-content/uploads/2022/10/automator_export_1-243x300.png 243w" sizes="(max-width: 342px) 100vw, 342px" /></p>
<p>Name the workflow e.g. HEIC_to_JPG_conversion.workflow</p>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_export_2-1024x728.png" alt="" class="alignnone wp-image-6299 size-large" width="1024" height="728" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_export_2-1024x728.png 1024w, https://creatronix.de/wp-content/uploads/2022/10/automator_export_2-300x213.png 300w, https://creatronix.de/wp-content/uploads/2022/10/automator_export_2-768x546.png 768w, https://creatronix.de/wp-content/uploads/2022/10/automator_export_2.png 1301w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>Save it to the desktop</p>
<h3>Installation</h3>
<p>Open Finder and go to the desktop and double click. Click &#8220;Install&#8221;</p>
<p><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_install_1.png" alt="" class="alignnone wp-image-6301 size-full" width="558" height="241" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_install_1.png 558w, https://creatronix.de/wp-content/uploads/2022/10/automator_install_1-300x130.png 300w" sizes="(max-width: 558px) 100vw, 558px" /></p>
<p>Another window will open and show you the active extension including your workflow:</p>
<h3><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_install_2-300x238.png" alt="" class="alignnone size-medium wp-image-6302" width="300" height="238" srcset="https://creatronix.de/wp-content/uploads/2022/10/automator_install_2-300x238.png 300w, https://creatronix.de/wp-content/uploads/2022/10/automator_install_2-768x610.png 768w, https://creatronix.de/wp-content/uploads/2022/10/automator_install_2.png 780w" sizes="(max-width: 300px) 100vw, 300px" /></h3>
<h3>Usage</h3>
<p>When you open up a context menu (right-click in Finder) you will now see your workflow</p>
<h2><img decoding="async" src="https://creatronix.de/wp-content/uploads/2022/10/automator_context_menu.png" alt="" class="alignnone size-full wp-image-6296" width="265" height="169" /></h2>
<h2>Deleting Workflows</h2>
<p>Go to ~/Library/Services<br />
Delete the workflow you do not need any more</p>
<h2>Further Reading</h2>
<p><a href="https://creatronix.de/pillow-how-to-convert-images-to-webp/">Pillow how to convert images to webp</a></p>
<p><a href="https://creatronix.de/how-to-create-youtube-thumbnails-pillow-tutorial/">How to create youtube thumbnails &amp;#8211; pillow tutorial</a></p>
<p>&nbsp;</p>
<p>The post <a href="https://creatronix.de/how-to-use-automator-on-macos/">How to use Automator on macOS</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use google translate with python</title>
		<link>https://creatronix.de/how-to-use-google-translate-with-python/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Sun, 23 Oct 2022 18:29:11 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=6273</guid>

					<description><![CDATA[<p>Motivation Sometimes you need to translate text from one language to another. I for example often write articles in German but want to have them in English for this blog. For this use case you can use google&#8217;s translation function in the browser. But wouldn&#8217;t it be sweet to automate this task and spare some&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-use-google-translate-with-python/">How to use google translate with python</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Sometimes you need to translate text from one language to another.<br />
I for example often write articles in German but want to have them in English for this blog.<br />
For this use case you can use google&#8217;s translation function in the browser.<br />
But wouldn&#8217;t it be sweet to automate this task and spare some copy/paste orgies?</p>
<h2>Installation</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-bash" data-lang="Bash"><code>pip install googletrans==3.1.0a0</code></pre>
</div>
<h2>First Translation &#8211; German to English</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>def test_translate_de_en():
    from googletrans import Translator
    translator = Translator()
    text = "Wie geht's?"
    translated = translator.translate(text, src="de", dest="en")
    assert translated.text == "How are you?"</code></pre>
</div>
<h2>English to German</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>def test_translate_en_de():
    from googletrans import Translator
    translator = Translator()
    text = 'How are you?'
    translated = translator.translate(text, src='en', dest="de")
    assert translated.text == 'Wie geht es dir?'</code></pre>
</div>
<h2>Limitations</h2>
<p>The maximum character limit on a single text is 15,000</p>
<p>The post <a href="https://creatronix.de/how-to-use-google-translate-with-python/">How to use google translate with python</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use tox to test your code on multiple platforms</title>
		<link>https://creatronix.de/how-to-use-tox-to-test-your-code-on-multiple-platforms/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Fri, 08 Jul 2022 08:15:23 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Software Engineering & Programming]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=5621</guid>

					<description><![CDATA[<p>Motivation When writing Python packages you often have to assure that the packages can be used on different platforms and Python versions e.g. the package must work under Python 3.8 on Linux as well as with Python 3.9 on Windows. But how do you test all those supported OS and version combinations? Enter tox History&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-use-tox-to-test-your-code-on-multiple-platforms/">How to use tox to test your code on multiple platforms</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>When writing Python packages you often have to assure that the packages can be used on different platforms and Python versions</p>
<p>e.g. the package must work under Python 3.8 on Linux as well as with Python 3.9 on Windows.</p>
<p>But how do you test all those supported OS and version combinations?</p>
<p>Enter tox</p>
<h2>History</h2>
<p>tox was first released in October 2018, first stable version 0.5 came out in 2010.</p>
<p>Today we have the 3.25 and tox 4 is in the making.</p>
<h2>Installation</h2>
<pre>pip install tox</pre>
<h2>Setup &amp; Usage</h2>
<p>At a bare minimum you need a tox.ini file in your project&#8217;s root directory with the follwing content:</p>
<pre>[tox]
envlist = py38, py39

[testenv]
deps = pytest
commands = pytest</pre>
<p>To run tox you just type in</p>
<pre>tox</pre>
<p>and Bob&#8217;s your uncle</p>
<h3>How does it work?</h3>
<p>tox will now do the following things automagically for you</p>
<ol>
<li>Build the package (Make an sdist distribution by invoking python setup.py sdist)</li>
<li>For each listed environment (in this example Python 3.8 and 3.9)
<ol>
<li>Create the environment with venv</li>
<li>Install the package</li>
<li>Install additional dependencies</li>
<li>Run the commands</li>
</ol>
</li>
</ol>
<p>tox will create a .tox directory in your project</p>
<h2><img decoding="async" class="alignnone size-full wp-image-5630" src="https://creatronix.de/wp-content/uploads/2022/07/tox_envs.png" alt="" width="154" height="165" /></h2>
<h2>More configuration</h2>
<h3>Running on multiple OS</h3>
<pre>[tox]
envlist = {win32, linux}-{py38, py39}

[testenv]
platform = win32
deps = -r ./requirements-dev.txt
commands = coverage run -m pytest --junit-xml=reports/test_report-{envname}.xml

[testenv:linux-py38]
platform = linux|linux2

[testenv:linux-py39]
platform = linux|linux2</pre>
<p>tox has a neat syntax to create a matrix of OS and Python versions</p>
<p>{win32, linux}-{py38, py39} will result in the following environments</p>
<p>win32-py38<br />
win32-py39<br />
linux-py38<br />
linux-py39</p>
<h3>Building wheels</h3>
<p>If you are interested in testing the creation of wheels as well you can use a plugin like</p>
<p><a href="https://pypi.org/project/tox-wheel/">https://pypi.org/project/tox-wheel/</a></p>
<p>or call python setup.py bdist_wheel directly in the commands section</p>
<h3>Python 3.10</h3>
<pre>[tox]
envlist = py37, py38, py39, <strong>py310</strong></pre>
<h3>Multiple dependencies</h3>
<p>If your tox builds rely on more dependencies you have to list them  like this:</p>
<pre>[testenv]
deps = pytest
       pyhamcrest</pre>
<p>But to avoid duplication you should use the dependencies from your requirements file</p>
<pre>[testenv]
deps = -r ./requirements-dev.txt</pre>
<h2>Testing Coverage</h2>
<p>When you add coverage and pytest-cov to your requirements you can generate test coverage</p>
<pre>[testenv]
deps = -r ./requirements-dev.txt
commands = coverage run -m pytest --junit-xml=reports/test_report-{envname}.xml</pre>
<h2>Pitfalls</h2>
<p>WARNING: could not copy distfile to D:\.tox\distshare</p>
<p>drive not mounted</p>
<h2>Further Reading</h2>
<p><a href="https://tox.wiki/en/latest/index.html">https://tox.wiki/en/latest/index.html</a></p>
<p><a href="https://github.com/jboegeholz/easypattern/tree/wip">https://github.com/jboegeholz/easypattern/tree/wip</a></p>
<p>The post <a href="https://creatronix.de/how-to-use-tox-to-test-your-code-on-multiple-platforms/">How to use tox to test your code on multiple platforms</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use Greasemonkey to make your life easier</title>
		<link>https://creatronix.de/how-to-use-greasemonkey-to-make-your-life-easier/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Thu, 17 Feb 2022 07:43:48 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=5115</guid>

					<description><![CDATA[<p>Motivation Sometimes you encounter websites which seem to have time traveled from 1999. No responsive UI, no widgets, just plain html input fields and selects. Time to improve these sites 🙂 Greasemonkey overview Greasemonkey is a browser plugin which lets you inject client-side JavaScript into the webpage just as the developer could have intended to&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-use-greasemonkey-to-make-your-life-easier/">How to use Greasemonkey to make your life easier</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Sometimes you encounter websites which seem to have time traveled from 1999. No responsive UI, no widgets, just plain html input fields and selects.</p>
<p>Time to improve these sites 🙂</p>
<h2>Greasemonkey overview</h2>
<p>Greasemonkey is a browser plugin which lets you inject client-side JavaScript into the webpage just as the developer could have intended to do.</p>
<p><a href="https://addons.mozilla.org/de/firefox/addon/greasemonkey/">GM for firefox</a></p>
<p>If you use Google Chrome you can use the <a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo">Tampermonkey</a> extension.</p>
<p>Now you can manipulate the DOM to make the page look more appealing and function better.</p>
<p>&nbsp;</p>
<h2>Hello <del>World</del> Greasemonkey</h2>
<p>Let&#8217;s start with a simple script:</p>
<pre>// ==UserScript==
// @name hello_greasemonkey
// @namespace https://creatronix.de
// @description prints "Hello Greasemonkey" to the console
// @include https://creatronix.de*
// @version 1
// ==/UserScript== 
console.log("Hello Greasemonkey");
</pre>
<p>This script does nothing more than printing a string to the console</p>
<p>Ctrl + Shift + J opens the Browser console in Firefox.</p>
<p>Hint: If you don&#8217;t see the console output you have to activate &#8220;Show Content messages&#8221; in the gear menu of the browser console.</p>
<p>The @include statement ties the script to a specific URL. The wildcard * can be used to indicate all sub-URLs shall be included as well.</p>
<p>But wait &#8211; there is more:</p>
<h2>Add jQuery UI Datepicker</h2>
<p>I&#8217;ve had a page where the date input where just plain input fields.</p>
<p>With the following script I&#8217;ve added a nice date picker widget.</p>
<p>For that purpose you can use jQuery and jQuery UI.</p>
<p>With the @require you can use a CDN to import the needed libraries.</p>
<p>&nbsp;</p>
<pre>// ==UserScript==
// @name add_calendar_widget
// @namespace creatronix
// @description adds an jQuery-UI calendar to date fields
// @include &lt;the_site_to_insert_the_script&gt;
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @require https://code.jquery.com/ui/1.13.1/jquery-ui.min.js
// @version 1

// ==/UserScript==

$(document).ready(function(){
  console.log("script works");
  $( 'input[name="from"]' ).datepicker({ firstDay: 1, dateFormat: 'dd.mm.yy' });
  $( 'input[name="until"]' ).datepicker({ firstDay: 1, dateFormat: 'dd.mm.yy' });
  $("#ui-datepicker-div").css({'background-color':'white'});
}</pre>
<p>The post <a href="https://creatronix.de/how-to-use-greasemonkey-to-make-your-life-easier/">How to use Greasemonkey to make your life easier</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Anatomy of a Jenkinsfile &#8211; Tutorial</title>
		<link>https://creatronix.de/anatomy-of-a-jenkinsfile/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Fri, 28 Jan 2022 16:25:27 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=4681</guid>

					<description><![CDATA[<p>Why should you use a Jenkinsfile? The biggest advantage of a Jenkinsfile is the ability to use version control to manage your build system. When you use freestyle jobs you can loose you configuration due to limit history depth. Descriptive vs Scripted Jenkinsfiles come in two flavours: Declarative pipelines always begin with the word pipeline&#8230;</p>
<p>The post <a href="https://creatronix.de/anatomy-of-a-jenkinsfile/">Anatomy of a Jenkinsfile &#8211; Tutorial</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Why should you use a Jenkinsfile?</h2>
<p>The biggest advantage of a Jenkinsfile is the ability to use version control to manage your build system.</p>
<p>When you use freestyle jobs you can loose you configuration due to limit history depth.</p>
<h2>Descriptive vs Scripted</h2>
<p>Jenkinsfiles come in two flavours:</p>
<p><strong>Declarative</strong> pipelines always begin with the word <strong>pipeline </strong></p>
<p><strong>Scripted</strong> pipelines always begin with the word <strong>node</strong></p>
<p>This tutorial deals with the declarative pipeline scripts.</p>
<h2>Prerequisites</h2>
<p>Before you can use a Jenkinsfile-Job you need to install this plugin in your Jenkins:</p>
<p><a href="https://plugins.jenkins.io/workflow-aggregator/">https://plugins.jenkins.io/workflow-aggregator/</a></p>
<h2>A minimalistic Jenkinsfile</h2>
<pre>pipeline {
    agent any

    environment{

    }
    stages {
        stage('Build') {
            steps {
                echo 'Building..'
            }
        }
        stage('Test') {
            steps {
                echo 'Testing..'
            }
        }
        stage('Deploy') {
            steps {
                echo 'Deploying....'
            }
        }
    }
}</pre>
<h2>Agent</h2>
<p>The agent defines on which build node the project can be build.</p>
<pre>agent any</pre>
<p>&#8216;any&#8217; means that the job can be run on every available node on your Jenkins master. You can of course tie a job to a certain node e.g. by label</p>
<pre>agent { label 'windows'}</pre>
<h2>Environment</h2>
<p>The environment block can be used to set environment variables e.g. path to git executable, special directories for reports.</p>
<pre>environment{
    NEW_VERSION = '1.3.0'
}</pre>
<h2>Stages &amp; Steps</h2>
<p>You can divide your pipeline script into several logical units called stages.</p>
<p>e.g. Build &#8211; Test &#8211; Deploy</p>
<p>You can add additional stages for linting, quality checking, code coverage and so on.</p>
<p>The steps is where the magic happens. A stage can consist of several steps</p>
<h3>Conditions</h3>
<pre>stage('Deploy') {
</pre>
<pre>    when {
        expression {
            BRANCH_NAME == 'main'
        }
    }</pre>
<pre> steps { echo 'Deploying....' } }</pre>
<p>You can apply a when block to tie some stages to a specific preconditions. In this example we only want to deploy our project when we are dealing with the main branch.</p>
<h2>Parallel execution</h2>
<p>If you want to execute tests in parallel you do the following:</p>
<pre>stage('Test') {
    parallel {
        stage('Test On Windows') {
            agent {
                label "windows"
            }
            steps {
                bat "run-tests.bat"
            }
        }
        stage('Test On Linux') {
            agent {
                label "linux"
            }
            steps {
                sh "run-tests.sh"
            }
        }
    }
}</pre>
<h2>Post actions</h2>
<pre>post {
    always {
    }
    failure {
    }
}</pre>
<h2>Available Environment Variables</h2>
<p>https://&lt;your_jenkins_ip_orcname&gt;/env-vars.html</p>
<p>e.g. https://localhost:8080/env-vars.html</p>
<h2>IDE / Tool Support</h2>
<p>If you want IDEA to recognize a Jenkinsfile as a Groovy file, then you can add the String &#8220;Jenkinsfile&#8221; as a valid file name pattern (normally contains file endings) for Groovy files. This is supported &#8220;out of the box&#8221; without requiring any additional Plugin (except the &#8220;Groovy&#8221; Plugin, but that is already part of IDEA).</p>
<p>Source: <a href="https://stackoverflow.com/questions/47796757/jenkinsfile-syntax-highlighting-in-java-project-using-intellij-idea/48326267#48326267">https://stackoverflow.com/questions/47796757/jenkinsfile-syntax-highlighting-in-java-project-using-intellij-idea/48326267#48326267</a></p>
<p>Another solution for PyCharm:</p>
<p>The following filetype xml will highlight Jenkinsfile syntax in PyCharm</p>
<p><a href="https://stackoverflow.com/questions/51124878/jenkinsfile-syntax-highlighting-in-pycharm-idea/56749404#56749404">https://stackoverflow.com/questions/51124878/jenkinsfile-syntax-highlighting-in-pycharm-idea/56749404#56749404</a></p>
<p>Another way is to use the <a href="https://www.jenkins.io/doc/book/blueocean/pipeline-editor/">Pipeline Editor Plugin</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://creatronix.de/anatomy-of-a-jenkinsfile/">Anatomy of a Jenkinsfile &#8211; Tutorial</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to add Travis CI to your github project</title>
		<link>https://creatronix.de/how-to-add-travis-ci-to-your-github-project/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Fri, 26 Nov 2021 13:42:16 +0000</pubDate>
				<category><![CDATA[DevOps & Automation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[travis]]></category>
		<category><![CDATA[yaml]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=4200</guid>

					<description><![CDATA[<p>Travis CI is a nice way to add Continous Integration / Test / Deplyoment to your github project. As long as your project is open source aka not private you can use Travis CI for free (with a limited quota of 10000 minutes) Account Create an account at travis-ci.com  Connect it with your github account&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-add-travis-ci-to-your-github-project/">How to add Travis CI to your github project</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Travis CI is a nice way to add Continous Integration / Test / Deplyoment to your github project.</p>
<p>As long as your project is open source aka not private you can use Travis CI for free (with a limited quota of 10000 minutes)</p>
<h2>Account</h2>
<p>Create an account at <a href="https://www.travis-ci.com/">travis-ci.com </a></p>
<p>Connect it with your github account</p>
<h2>Configuration</h2>
<p>For enable travis CI in your project you must add a <strong>.travis.yml</strong> file to the root folder. Mind the dot for hidden file!</p>
<p>The content for a python project can look as follows:</p>
<pre><code class="language-python">language: python
python:
  - "3.7"
  - "3.8"
  - "3.9"
  - "3.10"

script: 
  - python -m unittest discover</code></pre>
<p>Under the python tag you can list all versions under which your code shall be executed. If you don&#8217;t provide further information the testing platform is Ubuntu 16.04 Xenial. If you want to run things on Ubuntu 20.04 you can add:</p>
<pre><code class="language-python">dist: focal</code></pre>
<h2>Optional Badge</h2>
<p>You can add a badge to your readme</p>
<pre><code class="language-python">[![Build Status](https://app.travis-ci.com/jboegeholz/easypattern.svg?branch=master)](https://app.travis-ci.com/jboegeholz/easypattern)</code></pre>
<h2>Further Reading</h2>
<p><a href="https://docs.travis-ci.com/user/languages/python/">https://docs.travis-ci.com/user/languages/python/</a></p>
<p>The post <a href="https://creatronix.de/how-to-add-travis-ci-to-your-github-project/">How to add Travis CI to your github project</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
