Code Monkey home page Code Monkey logo

md2pptx's People

Contributors

42sol-eu avatar martinpacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

md2pptx's Issues

Support Card Slide

Use H4 (####) to define a card on a slide, laying them out side by side.

Include other Drafts drafts

  • TODO:elaborate [Andreas,Martin]

  • Create a Java Script based action to include other drafts and saving it as a [[title]].mdp in file location accessible by Pytho

FIX: German Umlauts

Suggestion to add in def parseText(text):

    # Replace certain entity references with actual characters
    text2 = text2.replace("ä", "ä")
    text2 = text2.replace("Ä", "Ä")
    text2 = text2.replace("ü", "ü")
    text2 = text2.replace("Ü", "Ü")
    text2 = text2.replace("ö", "ö")
    text2 = text2.replace("Ö", "Ö")
    text2 = text2.replace("ß", "ß")
    text2 = text2.replace("€", "€")

install issue with pip3

I'm using Mate 20.04 with python3.8 and earlier releases.

I had to use pip not pip3 for the install to work.

If I used pip3, I get the error when using md2pptx

ModuleNotFoundError: No module named 'pptx'

For reference, here's some output

$ pip3 install python-pptx
Requirement already satisfied: python-pptx in /home/mikeg/.local/lib/python3.8/site-packages (0.6.18)
Requirement already satisfied: lxml>=3.1.0 in /usr/lib/python3/dist-packages (from python-pptx) (4.5.0)
Requirement already satisfied: XlsxWriter>=0.5.7 in /home/mikeg/.local/lib/python3.8/site-packages (from python-pptx) (1.3.7)
Requirement already satisfied: Pillow>=3.3.2 in /usr/lib/python3/dist-packages (from python-pptx) (7.0.0)
$ pip install python-pptx
Collecting python-pptx
  Using cached python-pptx-0.6.18.tar.gz (8.9 MB)
Requirement already satisfied: lxml>=3.1.0 in /home/mikeg/.local/lib/python3.7/site-packages (from python-pptx) (4.4.1)
Requirement already satisfied: Pillow>=3.3.2 in /home/mikeg/anaconda3/lib/python3.7/site-packages (from python-pptx) (7.0.0)
Requirement already satisfied: XlsxWriter>=0.5.7 in /home/mikeg/anaconda3/lib/python3.7/site-packages (from python-pptx) (1.2.7)
Building wheels for collected packages: python-pptx
  Building wheel for python-pptx (setup.py) ... done
  Created wheel for python-pptx: filename=python_pptx-0.6.18-py3-none-any.whl size=275703 sha256=22b1ff963ef5599a2a7a0bed09e31b878c07b36854bb94e9124d4bcd09127559 
  Stored in directory: /home/mikeg/.cache/pip/wheels/68/99/55/8f6d0c128a214c26ac5b9f75ea68f6387feec407055458af1e
Successfully built python-pptx
Installing collected packages: python-pptx
Successfully installed python-pptx-0.6.18

Support escaped underscore

Mucks up editing in e.g. BBEdit not having it.

Any more similar characters to backslash escape? Asterisk?

Prereq Python 3.8

Would allow assignment in an if statement - which would make regex usage more efficient in the standard input parsing code.

DISCUSSION: Effects during Template Creation

Hi Martin,
during Template Creation (modifying your "Martin Template.pptx" to my templates)
I have some questions that I do not understand.

If you have a quick idea its fine, but I will investigate the other stuff anyway.

  • Font Overwrite: The font sometimes ignores the defined settings in the master-slide
  • Text Position Overwrite in Heading Slide (Level ##): The textbox will be moved to your template position even if it takes my settings
  • Table-Seperator still showing in pptx

image

Keep script from crashing (if no match was found)

Please close if this makes no sense to you

    # [Issue 9](https://github.com/MartinPacker/md2pptx/issues/9)
    if matchInfo == None:
        continue 
        # > NOTE: 
        # Traceback (most recent call last):
        # File "md2pptx", line 1997, in <module>
        #    name = matchInfo.group(1).strip()
        # AttributeError: 'NoneType' object has no attribute 'group'

Support Numbered Lists

Today we only support bulleted lists. It would be nice to support numbered lists.

It's actually pretty complex manipulation of the XML to do this - which is why I haven't done it until now.

Make code slide foreground and background colours settable

Today they are (defaulted to probable) black on (hardcoded) green.

It should be easy to make these changeable, perhaps at the slide level. That way you could intersperse green screens with other kinds of fixed-pitch, non-bulleted, presentation.

Code slides to support spans

The use of a <span> with bgcolor would enable syntax colouring - with the colouring created by another tool, such as Codye on iOS.

Command Line Parameters

add input file as a second command line parameter to support running on iOS.

sys.argv[2] would be ok.

typed parameters even better

Relax requirement for vertical bars for multi-graphic slides

md2pptx requires simulation of a Markdown table for more than 1 graphic on a slide. This isn't even compliant with Markdown tables - as the vertical bars would get rendered by other Markdown processors.

This got slightly relaxed a while back - with the terminating vertical bar on a line not being required. This makes editing a little easier.

In reality, though, the table mechanism isn't needed...

... Better to just notice 2 graphics side by side on a line. Likewise a second line with a graphic on.

While this will render differently with any other Markdown processor (I think), it will at least be acceptable.

Links don't seem to work in User Guide

I'm sure I uploaded the graphics that illustrate what happens when you specify a "chevron" Table Contents. They seem not to be pulled in - at least on Working Copy.

Third graphic on a slide isn’t centered

If I have 1, 2, or 4 graphics on a slide they are appropriately positioned.

If I have 3 the third is placed under the first. It should be centered in the bottom half.

Hyperlinks appear broken

Maybe I was having a bad day but I couldn’t get hyperlinks to work. (They used to.)

Proper damage report soon. Maybe concurrent with the fix. :-)

hipodz.pptx missing

I'm having a problem with a missing template "hipodz.pptx" and I can't find it on the webbernet.

Running

$ md2pptx test/cardTest.md /tmp/cardTest.pptx

md2pptx Markdown To Powerpoint Converter 1.8.1 10 February, 2021
================================================================
Open source project: https://github.com/MartinPacker/md2pptx

Metadata:
=========

Name                                     Value
----                                     -----
template                                 Martin Template.pptx
template                                 hipodz.pptx
cardlayout                               horizontal
baseTextSize                             20
CardColour                               BACKGROUND 2
CardTitlePosition                        inside
cardshadow                               yes
cardshape                                rounded

Template file hipodz.pptx does not exist. Terminating.

Commenting out the corresponding template line in cardTest.md fixes the problem.

Improve Path Handling (winOS)

slideMasterFile is checked for a path seperator (/) which is linux and macOS only.
Windows (winOS) sadly uses \.

Using the pathlib.Path object from standard library solves that issue completly.

if slideMasterFile != "":
    from pathlib import Path # move this to top of script obviusly
    if not Path(slideMasterFile).exits():
        # Slide master in same directory as md2pptx code
        script_path = Path(".")
        slideMasterFile = script_path / slideMasterFile
    print(f"\nUsing {slideMasterFile} as base for presentation")

Command Line Parameters extension (without breaking stdin)

Steps:

  • check for sys.argv[2] available
  • set it as a path object
  • check for exits
  • load
  • if no data was read > exit
#Line1856
output_file = sys.argv[1]

input_file = "" 
if len(sys.argv) > 2:
    from pathlib import Path # move this to front of script
    input_path = Path(sys.argv[2])
    if input_path.exists():
        with input_path.open() as file:
            input_file = file.readlines()
else: 
    input_file = sys.stdin.readlines()

if input_file == "":
    sys.exit(-1)

slideNumber = 1
```

User-Configurable Margins Between Cards

Zero would lead to special considerations:

  • How to separate card boundaries - as they're all the same colour.
  • Whether cards should have curved corners - as that would look odd.

Maybe zero is really 0.05 inches or something like that.

Special Title Data

Hi,
my template has a two row title layout.
I would love to set the first row to a text (like the section title)
and the second row to the slides title.

Would this be possible in the given structure of the md2pptx?

Create functions to return dimensions of title and content areas

Right now it's a little haphazard. But functions to return rectangles would be good. Something like

titleRect = getTitleRect()

and

contentRect = getContentRect(titleRect)

In the latter case passing in None for titleRect sizes the content as if there were not title.

Hyperlinks from headings

Not sure if Markdown supports this. md2pptx currently seems not to do this. Labeled as a bug because I think Markdown should support it and so should md2pptx

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.