Git Product home page Git Product logo

military-pp-auto's Introduction

Egyption Army PowerPoint Automation

Motivation

Due to excessive usage of MS-Office in my military service, I came up with a simple tool for automting about 90% of the tasks related to formating and printing. (Military-Style presentations, mostly in Arabic)

Structure

Can be broken into 4 groups

  1. ready add-in
  • This can be copied to MS-PowerPoint default add-in location then added to the toolbar
  1. Actual Source presentation used for building the add-in in group [1]
  • contains source.ppt the source presentation(the code is accompanied with the presentation)
  • config.komy.txt, heights.komy, toolbars which are files referenced by the code in source.ppt
  1. macros folder contains the code exported from source.ppt (just to view the code on github)
  2. gifs folder contains demo gifs shown in the readme
Numbers in brackets are related to the groups
.
├── [2] config.komy.txt     # config file for the tool
├── [4] gifs                # demo gifs
├── [2] heights.komy        # heights / number of lines data
├── [3] macros              # code exported as files
│   ├──  class modules      # class code files
│   ├──  forms              # form code files
│   └──  modules            # plain modules
├── [1] ready add-in        # the add-in to be added to MS-Powerpoint
├── [2] source.ppt          # source presentation with all exported code included
└── [2] toolbars            # toolbar images used by the tool (custom icons)

Features

  1. Slide Formatting
  • Textbox colors (pre-defined set of colors)
  • Text colors
  • Basic Alignment and arrangement
  • Line spacing
  • fixing reversed numbers issues
  • Detecting parenthesis and coloring text within
  • Optimal Alignment and line spacing (most advanced part and saving a lot of time)

2. Presentation overall operations - Black and White colorization for printers (since powerpoint black & white printing may miss some gradients and shadows causing high-ink consumption) - Removing inner colors for color-printers (inner colors and shadows cause high-ink consumption)

3. Other commonly used tools

Theory

What really makes me love this tool isn't only time-saving but the strong algorithmic and mathematical background needed to build those features

  1. Optimal line spacing
  • Looks for the optimal line spacing for textboxes in a slide (they are all the same for visual symmetry) by defining a target padding percentage in a slide and try to minimize an euclidean distance function using ternary search algorithm (which makes it somehow real-time)
  • I also modelled the font sizes and number of lines in simple 3D tensor represented in heights.komy which makes searching for fonts and number of lines so efficient and apply only one UI call (not trial and error in the presentation view) [this is because MS-office wraps text so we can only find number of lines in reverse fashion (pre-processing approach)]
  1. Finding horizontal groups of textboxes in one line
  • I used some form of Jaccard index on the y-axis to find intersections (projected onto the y-axis)
  • To handle rotations some trigonometry must be involved

3. Handling nested groups - I used recursion in the form of flood-fill through sub-groups

Dedication

This work is dedicated for the Egyptian Army and I believe this helped a lot.

military-pp-auto's People

Contributors

mohammed-elkomy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

akshay-sh30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.