Sketchapp Headers information - macos

I want to learn more about sketchapp to build a plugin for it, I was looking at the JSON files we can extract from a project and i noticed all the "classes" (i look them up and they show up as headers) tagged in it like: "MSRect", "MSColor", "MSExportOptions", etc.
I've looked at the sketchapp developer webpage, and some forums and i found some mentions to this classes but i couldn't get anything usefull at basic level.
The question would be, where i can find information about what are those classes and what they do?
Thank you.

https://github.com/abynim/Sketch-Headers, here I could find all the information i needed about this "classes", some one took the time to use the dump command to get all the information ( Methods, properties, etc.), and upload it to github.
This files took some time to understand and manage, but they solved all the problems i had with the creation of my plugin for Sketch.

Related

Is it possible to copy comments and suggestions when copying a Google Doc using Drive API?

I noticed that comments and suggestions are not by default copied when using drive.files.copy. This is imperative to my project, so I did some googling and it seems like this feature may not even exist? I thought about copying and applying the comments manually using the Docs API, but I can't seem to find anything helpful about this on SO or the Google API documentation for Drive and Docs. Does anyone know if this is possible and how to do this?
Thanks
edit: the comments.list method returns comments, but not suggestions. I think I would be able to insert these comments manually into the copied document. What about suggestions? Is there a way to retrieve these?
It would be really nice if I could easily copy both without a lot of leg work.
Unfortunately it's not possible to copy a Google Docs file with comments and suggestions
As for comments, you can copy-paste them manually like done here.
However, suggestions are different from comments (at least as the Google APIs go) - see here for information.
In order to retrieve suggestions, you can use the documents.get method
Yet, inserting suggestions programmatically is currently not possible - see here for more details

How to successfully integrate API documentation into your build process

We've been looking into solutions to keep our API documentation accurate and up-to-date. This has led me down this rabbit hole of various solutions using standards such as OpenAPI and a whole universe of open source tools for integrating API documentation into your build pipeline, setting up mock servers, failing the build when APIs change or no longer match the documentation, etc. Right now, I'm fairly overwhelmed so to avoid having this question closed as "Too Broad", I'd like to narrow things down to a key piece of the puzzle that I'm a bit lost on. In simple terms, how do you connect the auto-generated Swagger JSON to the fully documented and detailed version of the spec (most likely as a bunch of YAML files and Markdown files)?
Right now, we have the ability to generate Swagger JSON based on our compiled code, but it's sparse and doesn't contain any information that can't be obtained through the code itself. Obviously I'd want to fill in details such as longer descriptions of each API, sample code, etc. From what I can tell, it's standard practice to generate your OpenAPI specs using a tool that can import directly from Swagger, then you use an editor (such as Swagger Editor) to fill in all the details. This gets bundled up as a bunch of YAML files, MD files, etc which get checked into Github, and then there's various tools that could build that into some portal for your users to go to (Redoc does this sort of thing).
However, how do changes to your original "auto-generated JSON" get merged into the "final product"? My guess would be there's some build step that runs some sort of diff tool that compares the autogenerated JSON from the current build to the "published" OpenAPI spec and then somehow alerts the team if there's new APIs that have to be documented or existing APIs that have changed and need their documentation update. Is this kinda on track or is there a big part I'm missing. Thanks!

Workflow to post on Jekyll via Windows

I am currently working on a Jekyll blog on Linux. However I'd like to add contributors to this blog who are using Windows and who haven't any skills in programming or using tools like Git etc.
I was wondering what could be the best process/pratice to enable them to post on the blog?
Installing them the entire environment and writing a script maybe?
Could it cause any issues due to the OS?
Any suggestions or advices are welcome :)
I don't think installing git, and pushing content to your repo is hard task for any non-tech guy.
1: Little tough way
Use team viewer and help your partner to setup git.
Allowed access to your repository.
Teach them, about frontmatter, and some jekyll commands.
2: Simple and smooth way.
Just get doc files dirctly from partner, which contain only content, nothing else, and convert yourself into markdown with manual frontmatter.
3: Create your own dashboard.
You can create your own dashoard like WordPress, where your partner can add categories, tags, title, meta description etc things, that can convert into frontmatter automatically. For that, you need to build yourself. (I find out that kind of generator here, but look's like he deleted, you can find it, by visiting him, old deleted commits).
I had the same problem so I ended up using Wordpress as the interface to it and creating a plugin to marry the systems up.
I figured I'd share it so feel free to have a look:
https://wordpress.org/plugins/wp2jekyll/

Saving PDF files with Chickenfoot

I'm writing a web-crawler using Chickenfoot and need to save PDF files. I can either click the link on the page or grab the PDF's URL and use
go("http://www.whatever.com/file.pdf")
and I get the firefox "Opening file.pdf" dialog box, but can't click the "OK" button to actually save the file.
I've tried using other means to download the files (wget, python's urllib2, twill), but the PDF files are gated so none of those will work.
Any help is appreciated.
This example of how to save a target in the Mozilla developer documents looks like it should do exactly what you want. I've tested a Chickenfoot example that is very similar that gets the temp environment variable, and that worked well for me in Chickenfoot.
https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIWebBrowserPersist#Example
You might have to play with the application associations in Tools, Options, Applications to make sure the action is set to Save File, but those settings might not apply to these functions.
End Answer, begin related grumblings...
I sure wish someone would fix the many bugs in Chickenfoot, and write a nice Cookbook programming guide. I've been using it for years, and there are still many basic things I've not been able to figure out how to do. I finally broke down and subscribed to the mailing list, as the archives have some decent script examples. It takes a lot of searching through the pdf references, blogs, etc. as the web API reference is very sparse.
I love how simple Chickenfoot can make automating some tasks, but it takes me days of searching javascript, DOM, and Firefox documents to find ways to do some of the things it can't, since I'm not really a web programmer. The goal of Chickenfoot seems to be that I shouldn't have to be, but unfortunately few are refining the proof of concept, as MIT has dropped the project.
I tried to do this several ways using only Chickenfoot commands and confirmed they don't work with the latest Firefox 3 and Chickenfoot 1.0.7.
I hope this helps! Good luck. Sorry I only ran across your question yesterday, but found it too interesting to leave alone.
You won't be able to click on Firefox dialogs for the sake of security.
The best way to download the content of a URL is to read then write the content of the URL.
// Chickenfoot 1.0.7 Javascript Code to download the content of a url.
include( "fileio.js" ); // enables the write function.
var url = "http://google.com",
saveFileTo = "c://chickenfoot-google.com";
write( saveFileTo, read( url ) );
You might find it helpful to use jquery with chickenfoot.
http://groups.csail.mit.edu/uid/chickenfoot/scripts/index.php?title=Using_jQuery,_jQuery_UI_and_similar_libraries
This has worked for me to save Excel files from NCES portal.
http://muaz-khan.blogspot.com/2012/10/save-files-on-disk-using-javascript-or.html
I was using Firefox 3.0 and the "old syntax" version of the code. I also stripped code intended for IE and "(window.URL || window.webkitURL).revokeObjectURL(save.href);" which generated an error.

What do I need to know to create Xcode project templates?

I know some of the tutorials for creating Xcode project templates, for example this one here: http://robnapier.net/blog/project-templates-364
This is the best one I could find. All others basically repeat the same info, or are no longer up to date, or worse tell me that even they don't know what they're doing. Possibly useful tools that are linked to here and in other places are no longer available.
I keep running into roadblocks, and would like to gather as much information as possible on the process of creating Xcode project templates. Info that is most importantly up to date (at least it must be relevant for Xcode 3 or higher).
For example, what I'd like to see is:
a description of the
TemplateChooser.plist and similar
plist files and what these options do
(in my case, once I add a
TemplateChooser.plist, my project
disappears from the Xcode project
template list)
how to create a project template that references another .xcodeproj (when I do that, the other .xcodeproj appears in the project template list even though it doesn't use the special naming convention)
processes that can be applied, for example is it possible to run a script during the creating of a project from a template? This would be useful to unzip certain files into the newly created project.
If you have the answer or suggestions to any of the issues above, I'd appreciate that. Otherwise any link to good Xcode project template resources would be highly recommended. Especially if there is an official documentation from Apple - I haven't found one yet which seems to imply that project templates are undocumented.
Have you seen these:
http://www.sodeso.nl/?p=895
http://www.codeproject.com/KB/iPhone/CreatingXcodeProject.aspx
If you say you have searched, I'm pretty sure you've already seen the links but these are the best resources I could find with my 'googlabilities'
You might try contact this guy - http://linkedin.com/in/mottishneor he has some related messages around the web
The links suggested by FX are also not bad at all!
There is indeed little XCode template info out there. What I have found of interest are the following links (I documented myself on the topic, but haven't yet gone any further):
a Google Code search reveals a few examples, but not much
in particular, I found interesting to look at the code provided by Three20; they have some basic examples, like here
referencing another project worked for me, so maybe you could open a specific question about that giving more details?
there is information scattered on the Apple mailing-lists
there is no official documentation from Apple, as is evidenced by the lack of results to this query
I'm sorry if this is not a Enlighting, concise answer. As you said, it's not well documented, and sources are all over the place. I just hope I could highlight some places to find information that your own searches might not have reached :)
I don't have a Mac anymore, so this is as much as I can give you without testing this myself. As far as I can tell, Xcode templates are undocumented by Apple.
This guy has some guides for messing with Xcode templates but the info is pretty sparse. My suggestion for working with templateChooser.plist is to try to only edit that file in the interface builder.
This guide is a good example of how to add a reference to another .xcodeproj. For the reason you were having trouble adding a reference to your project we probably need more information.
If you scroll way down in this doc you can that each template already includes a script called myscript.sh. This script will show up in the scripts menu for projects built with that template. That isn't quite as convenient as running scripts automatically, but it's better than nothing.
In conclusion, Xcode template documentation is a nightmare. It looks like there are a lot of powerful features there, but they are obscured because of lack of user friendlyness and because documentation lags far behind Apples updates of Xcode. It just doesn't seem to be a priority for them. I hope this helps.
And yet another video link http://howtomakeiphoneapps.com/2010/10/how-to-make-custom-xcode-templates-with-video/

Resources