navinpeiris / jsca2js Goto Github PK
View Code? Open in Web Editor NEWUtility to convert JSON in Appcelerator's JSCA format to JavaScript
Utility to convert JSON in Appcelerator's JSCA format to JavaScript
Titanium 2.0.2 has just been released.. I don't know how many changes has been done to the API...
I'm new to Titanium but prefer IntelliJ IDEA to Eclipse and need to able to code offline so I would really like to have an updated file :)
I was unable to convert the 3.2.1. api to .js format using this utility. I had no problem up until now, so I am wondering if the new iOS7 additions broke something. I could really use the new version, so if it can be converted and included in the download, that would be great.
Can we get a 6.x compatible version out of this?
I followed this tutorial which led me here:
http://navinpeiris.com/2011/10/17/appcelerator-titanium-javascript-code-completion-in-intellij/
Everything worked great except documentation was not appearing in the popup window. Opening the titanium-mobile-alloy-3.4.0.js file gave this error:
I wonder if it's worth splitting (a) finding a way around this limit or (b) splitting the js file into parts?
What do you think?
Hello,
See below, I get the the following error:
Retrieving Titanium JSCA API for version: 4.1.0
Converting API to JavaScript
Traceback (most recent call last):
File "./titanium-mobile.py", line 124, in
main()
File "./titanium-mobile.py", line 114, in main
javascript = convertJsca2Js(jsca, version)
File "/Users/stephenconnolly/Documents/PhpstormProjects/jsca2js/jsca2js.py", line 268, in convertJsca2Js
javascript += formatNamespace(namespace)
File "/Users/stephen/Documents/PhpstormProjects/jsca2js/jsca2js.py", line 251, in formatNamespace
formatter.addLine(formatMethods(namespaceContent))
File "/Users/stephen/Documents/PhpstormProjects/jsca2js/jsca2js.py", line 196, in formatMethods
formatter.add(generateMethodJSDoc(method))
File "/Users/stephen/Documents/PhpstormProjects/jsca2js/jsca2js.py", line 142, in generateMethodJSDoc
formatter.addLine(prefix, '@returns ', formatReturn(returns))
File "/Users/stephen/Documents/PhpstormProjects/jsca2js/formatter.py", line 18, in addLine
return self.add(self.indent).add(''.join(args)).newLine()
TypeError: sequence item 2: expected string, list found
Any ideas ?
Regards,
Stephen
Hi-
I'm using the current 3.2.1 version of Ti, and when I run your script, I get:
$ ./titanium-mobile.py 3.2.1
Retrieving Titanium JSCA API for version: 3.2.1
Unable to retrieve API for Titanium version 3.2.1
It will however fetch the older versions, such as 3.1.2, so maybe something changed on the server-side for this latest version?
TIA, and great utility!
Im getting an error with sdk 4.1.0.
My console output:
Retrieving Titanium JSCA API for version: 4.1.0
Converting API to JavaScript
Traceback (most recent call last):
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\titanium-mobile.py", l
ine 124, in
main()
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\titanium-mobile.py", l
ine 114, in main
javascript = convertJsca2Js(jsca, version)
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\jsca2js.py", line 268,
in convertJsca2Js
javascript += formatNamespace(namespace)
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\jsca2js.py", line 251,
in formatNamespace
formatter.addLine(formatMethods(namespaceContent))
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\jsca2js.py", line 196,
in formatMethods
formatter.add(generateMethodJSDoc(method))
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\jsca2js.py", line 142,
in generateMethodJSDoc
formatter.addLine(prefix, '@returns ', formatReturn(returns))
File "D:\Users\felipe.almeida-sc\Desktop\jsca2js-master\formatter.py", line 18
, in addLine
return self.add(self.indent).add(''.join(args)).newLine()
TypeError: sequence item 2: expected string, list found
Is it possible to add support for SDK 5.5+ ?
Hi!
I got an error parsing the newest SDK json 3.4.0
Retrieving Titanium JSCA API for version: 3.4.0
100.0% 24731648 / 24723669
Converting API to JavaScript
Writing JavaScript to file: titanium-js/titanium-mobile-3.4.0.js
Traceback (most recent call last):
File "titanium-mobile.py", line 124, in <module>
main()
File "titanium-mobile.py", line 118, in main
writeJsFile(javascript, outputFilePath)
File "titanium-mobile.py", line 63, in writeJsFile
file.write(content)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 443792: ordinal not in range(128)
Could you please fix it? Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.