Python for IT specialists tasks automation EuroPython 2015, Bilbao - - PowerPoint PPT Presentation

python for it specialists tasks automation
SMART_READER_LITE
LIVE PREVIEW

Python for IT specialists tasks automation EuroPython 2015, Bilbao - - PowerPoint PPT Presentation

Python for IT specialists tasks automation EuroPython 2015, Bilbao @2015, G.Nieri @ Talk contents Well show tools and scripts to automate different common tasks using Python scripts. This talk is just a starting point for your new life


slide-1
SLIDE 1

Python for IT specialists tasks automation

EuroPython 2015, Bilbao

slide-2
SLIDE 2

@2015, G.Nieri @

Talk contents

We’ll show tools and scripts to automate different common tasks using Python scripts. This talk is just a starting point for your new life as automation addicted

slide-3
SLIDE 3

@2015, G.Nieri @

Who is Gianluca Nieri?

  • Software developer;
  • Amazon AWS Architect and DevOps;
  • Technical writer;
  • Automation&Python addicted;

Web: www.gianlucanieri.com Mail: gianluca@gianlucanieri.com Twitter: @gianx

slide-4
SLIDE 4

@2015, G.Nieri @

Introduction - Why automation?

Save time No errors Less disctractions

(found on Intermnet, I apologize with the author for not citating him)

slide-5
SLIDE 5

@2015, G.Nieri @

Introduction – When automate?

Three factors:

  • Single execution time;
  • Run frequency;
  • Accuracy.

(found on Intermnet, I apologize with the author for not citating him)

slide-6
SLIDE 6

@2015, G.Nieri @

Introduction – What can you automate?

Almost everything: … string manipulation… … information retriving… … data manipulation… … image management… … document management… Whatever you want!

slide-7
SLIDE 7

@2015, G.Nieri @

Introduction - The tools

  • Python alone is not enough
  • Writing a UI for interaction is not handy;
  • You need third-party tools to manage

interaction, activation, results handling, etc.

slide-8
SLIDE 8

@2015, G.Nieri @

Tools – What are these tools?

  • “Line command tools”: a useful tool to launch

command, macros, action without leaving your workflow;

  • “Text expansion tools”: expand text snippets

and automatically retrive informations

  • “File trigger tools”: do action based on

filesystem objects, files, folder, etc.

slide-9
SLIDE 9

@2015, G.Nieri @

Tools - What software do we need?

Tools OS X Linux Windows Command line ● Alfred

  • Keyboard

Maestro

  • Synapse
  • Mutate
  • Kupfer
  • Gnome Do
  • Listary
  • Launcy

Text expansion

  • Text

expander

  • AutoKey
  • Autotext
  • Phrase

expander FS Triggers

  • Hazel
  • Maid

?????

slide-10
SLIDE 10

@2015, G.Nieri @

Alfred

(http://www.alfredapp.com/)

“Create immensely powerful workflows by connecting keywords, hotkeys and actions together to extend Alfred to do amazing things without writing a single line of code!”

slide-11
SLIDE 11

@2015, G.Nieri @

Keyboard maestro

(http://www.keyboardmaestro.com/)

“Keyboard Maestro can help improve almost every aspect

  • f using your Mac

[...] like typing your email address, or going to Gmail or Facebook, launching Pages, or duplicating a line, all take time and add frustration”

slide-12
SLIDE 12

@2015, G.Nieri @

Text expander

(https://smilesoftware.com/TextExpander)

“TextExpander saves your fingers and your keyboard, expanding custom keyboard shortcuts into frequently-used text and pictures”

slide-13
SLIDE 13

@2015, G.Nieri @

Hazel

(http://www.noodlesoft.com/hazel.php)

“Hazel watches whatever folders you tell it to, automatically

  • rganizing your files according to the rules you create.”
slide-14
SLIDE 14

@2015, G.Nieri @

Some ideas...

Commands Text expansion Automated procedures Simple tasks

  • Translate;
  • Meteo;
  • CSV display;
  • Currency;
  • Timezones;
  • Net infos;

File actions

  • Image manipulation;
  • Copy file names;
  • Quick notes;

Advanced

  • Documenting;
  • Text manager;
  • URL shortening;
  • Pretty printing;
  • Minifying (simple);
  • List to sql;
  • Encode/decode text

(url/html);

  • Links;
  • Batch image

processing;

  • Batch upload&share;
slide-15
SLIDE 15

@2015, G.Nieri @

Net info

slide-16
SLIDE 16

@2015, G.Nieri @

… in depth...

  • Input is passed to a script via a {query}

placeholder;

  • Script filter (simplified)

<?xml version="1.0"?>

<items> <item uid="1" arg="VALUE" valid="YES" autocomplete="option"> <title>Option1</title> <subtitle>First option</subtitle> <icon>icon.png</icon> </item> </items>

slide-17
SLIDE 17

@2015, G.Nieri @

Time zones

slide-18
SLIDE 18

@2015, G.Nieri @

Translate

slide-19
SLIDE 19

@2015, G.Nieri @

Quick notes

slide-20
SLIDE 20

@2015, G.Nieri @

Currency converter

slide-21
SLIDE 21

@2015, G.Nieri @

Text manager

slide-22
SLIDE 22

@2015, G.Nieri @

Pretty print

slide-23
SLIDE 23

@2015, G.Nieri @

Documenting

slide-24
SLIDE 24

@2015, G.Nieri @

Image manipulation

slide-25
SLIDE 25

@2015, G.Nieri @

Copy file names

slide-26
SLIDE 26

@2015, G.Nieri @

Meteo

slide-27
SLIDE 27

@2015, G.Nieri @

#6 - CSV Display

slide-28
SLIDE 28

@2015, G.Nieri @

Links

,,curl ,,ctitle ,,clinkm ,,clinkh

slide-29
SLIDE 29

@2015, G.Nieri @

Url shortening

,,cshort

slide-30
SLIDE 30

@2015, G.Nieri @

List to SQL

,,listsql

slide-31
SLIDE 31

@2015, G.Nieri @

Encode/Decode text

,,urlencode ,,urldecode

slide-32
SLIDE 32

@2015, G.Nieri @

Batch image processing

slide-33
SLIDE 33

@2015, G.Nieri @

Batch upload and share

slide-34
SLIDE 34

@2015, G.Nieri @

Conclusion

Where to go from here?

  • Think which are the most repetitive/sensitive

action you do on a daily basis and try to automate them, you literraly have no limits;

  • Learn about automation on mobile (Android:

Tasker, iOS: Workflow, Pythonista, Drafts);

slide-35
SLIDE 35

@2015, G.Nieri @

Conclusion

Thanks everybody! You can find all the scripts here: http://www.gianlucanieri.com/ep2015/ If you want you can contact me at: gianluca@gianlucanieri.com