Applescript command to extract template from a powerpoint presentation - macos

I need to extract the template from a powerpoint presentation and apply that template to another presentation.
After my search, I found two commands:
1) get template name of presentation
The above commands gives the template name, but not the path where it is stored. I am unable to find that.
2) apply template presentation file name "Macintosh HD:Users:Shared:Zesty"
The above command applies the "Zesty" design template to the presentation. But again I had no success as I don't know where this design template is stored. After googling I found the location can be: "/Users/sanjeev/Library/Application\ Support/Microsoft/Office/User\ Templates ". But I found no templates there.
So, is there any way to extract the template from a powerpoint presentation and apply that template to another presentation??
Thanks

PowerPoint doesn't store the path to templates in presentation files. There's no need to. It never refers to external templates except when the user/your code applies them. At that point, it stores a copy of the template IN the PPT file.
Extracting a template from the PPT file is simply a matter of opening the file and saving it as a template.
But you don't even need to do that unless you want to. Since every presentation contains its own template, you can apply the template from one presentation to another; no need for an actual template file.
In VBA, you'd do:
ActivePresentation.ApplyTemplate FileName:="[path to file whose template you want to apply"
I don't do Applescript, but it should be possible to translate that.

This might be 10 years late :-) but here is some AppleScript that does it:
-- Create a presentation to write to
set newPresentation to make new presentation
-- apply a template file to this new presentation
apply template newPresentation file name "/Users/martinpacker/Documents/template.potx"
(Obviously I came across this question while looking for an answer myself - and eventually figured it out. It might help someone in another decade or so.) :-)

Related

How do I apply nonintrusive design changes to Magento 1.X

I am having a little trouble here with a Magento installation here, which I "inherited" from a company who did some pretty heavy customizations to the theme.
I tried to rationalize most of the changes and was pretty successful with it. The problem is now, that I have some template files which have only one line of change.
In this specific case for example it would be a <button> that is now an <a> link. This is pretty much only one line in a 300 line template file.
Similar problems occurred with layout files of extensions. They have ONE dirty line in there, which for example resets the whole layout.
I then need to overwrite the complete layout XML file in the design, just to make a little change in one line, because those layout files are either overwritten or not. There is not merging process involved.
I took a look into the designer's documentation of Magento, but could not find anything useful.
I know that I could do some specific layout changes in the "local.xml" in my design, but those are more or less "contextless", which is not that great if those changes do belong to a certain extension.
Do you know a way to apply little template changes like mentioned in the first half or partially layout file overrides?
My main goal is to keep the files automatically updatable, which pretty much means: Download the module, replace files, done.
No manual updates to any overwritten files.
Use the "inherited" template as default template in a new package and add a child template with your changes. Example:
app/design/frontend/[package_name]/default - here will be the "inherited" old template
app/design/frontend/[package_name]/[your_child_template] - here will be your new child template
skin/design/frontend/[package_name]/default - here will be the "inherited" old template
skin/design/frontend/[package_name]/[your_child_template] - here will be your new child template
Partially layout file overwrides can be done for all pages or extensions in one local.xml file. Example:
app/design/frontend/[package_name]/[your_child_template]/layout/local.xml
If you want to add changes for a certain extension just add the extension xml file in your template folder. It will be the last one rendered and will wthe original. Example for the checkout cart page:
app/design/frontend/[package_name]/[your_child_template]/template/checkout/cart.phtml
For a small change inside a phtml file like your button example you will have to overwrite the whole phtml file. There is no way in Magneto to overwrite just a part of a phtml file.

How to edit numbers of Evernote notes, and make them sync?

I've been trying to format my Evernote notes (thousands of them) so that they are readable on any device.
I've accessed evernote storage on my Mac and saw folders of entries -- every folder contains a note.xhtml and a content.enml files, which directly stores note contents.
I can modify the *.xhtml file, and changes are reflected on Evernote client, but they just won't sync over to the server. Additionally, the *.enml file contains corresponding content to xthml file, but the change won't go there.
Is there any way I can neatly edit my notes, on the HTML level?
Thx!
In AppleScript, it's pretty easy to get and set the HTML. To actually manipulate the HTML you might want another language.
Here's how you read and write HTML content to a single selected Evernote note:
tell application "Evernote"
set noteList to selection
set n to item 1 of noteList
set extractedHtml to HTML content of n
set HTML content of n to "<p>Foo Bar</p><p>foo baz</P>"
end tell
Evernote provides some good examples of using AppleScript on their developer site. You can also use xsltproc for some more systematic manipulation. I have a read-only example of using xslt via AppleScript in a recent post of mine. This above little snippet might be enough of an example to tell you how to set the HTML content.
But, to give you a better answer, I'd need to know a little more about how you want to manipulate your notes. The above example just grabs the first item in your current selection and sets the content.

How to import multiple XML files into one inDesign document without copy/paste?

I use InDesign CS6, and I have several XML files with the same structure. Only the data are
different.
I created an Indesign layout with some tagged placeholder frames on merge mode, for automated layout.
Today for each XML file I have to create a new InDesign document to import
the XML. Everything works fine. Then in order to have all Indesign
layouts one after the other into a single Indesign layout, I have
to use the copy/paste function.
I mean for example, copy the contents of all documents to the first one. Or add pages of other documents to the first one, then delete spaces between each page.
So my question is the following:
How to repeat this process without copy/paste function, knowing that the
number of XML files could be unknown.
Thank you very much for your answer.

Best Way to Modify Another Programmer's Navigation

"Change an item in the navigation? Sure I can do that in 15 minutes."
So I am trying to update the navigation on a site that I inherited only to find out that the previous programmer was a college student and was using this site as a project of some sort. Needless to say there are zero comments and the code calls function after function and I just can't follow the logic.
I am looking for a roundabout way to update the navigation. I tried using Dreamweaver to search through all of the files in the site and look for any files that contain the name of the page or the url (hoping to find some sort of included file). There was none. I did file text files that control the main navigation but none for the subnavigation.
There is no database.
If it helps here is the site. http://bit.ly/jbs639
And if you want to look at the interesting text file that is parsed to create the main navigation you can find it here: http://bit.ly/m3erna
Hmmm.... Interesting indeed. You have my sympathy.
One thing that I would look at... The file that gets parsed for the main navigation appears to be a simple delimited file. Sure, the delimiter is a rather unusual +++, but that choice means it avoids conflict with things like commas that might be desirable in the link text. It looks as if the last element indicates what type of resource is being accessed (file or directory, although I don't know what - if any - effect that has on the final output). It also appears that there are similar text files (in the framework/cfg/nav/ folder... which should probably not be generally accessible BTW) for the sub-menus. (E.g. the file stores.txt appears to contain the additional navigation items associated with the stores sub-navigation).
You don't mention which sub-menu you're trying to change. I suspect it is the "About TTO" one, which I can't find an entry for... but I'd look to see if there are any similar navigation text files in the /content/about/ folder.
Good Luck!
Of course it was as simple as a function that reads all of the files in the directory and the name of the file. I guess that in this case there was no shortcut.

BEA Publisher Woes

I'm using BEA's Publisher product with ALUI. I want to have a simple portlet that just displays Content Items that I've published, but after playing with it for a couple of hours, I find myself stuck.
I have a Data Entry template that just takes a name and a file, and a presentation template associated with that. But I can't figure out how to make the presentation template display a list of published content items associated with the Data Entry template.
I tried using the Tag Helper and I saw that the file properties were available, e.g. name, location, length, however I can't get the template to actually display the information.
Also, since I can't publish said presentation template (you aren't allowed to publish a presentation template associated with a data entry template), I have to make ANOTHER presentation template, and include the first one, and then make a new portlet that displays that second template. Is this how it's supposed to work? It seems awfully complicated for such a simple task.
I would greatly appreciate any input anyone can give. Thanks!
In case anyone else runs into this:
http://forums.oracle.com/forums/thread.jspa?messageID=3171395&#3171395

Resources