Commit Graph

30 Commits

Author SHA1 Message Date
Sebastian Thiel
11b6fe212f fix(rename): mv youtube-rs to google-apis-rs 2015-03-02 12:05:42 +01:00
Sebastian Thiel
e3b6aee6d6 feat(make): apis target - make all apis 2015-03-02 11:56:32 +01:00
Sebastian Thiel
2298601165 feat(mako): can now use custom libraries in pycode
Namespaces can exclusively be used during rendering, which is fine if
you remind yourself of the newline rules.
However, I also need some utiltiies that convert input data. These
are now within their own libraries, which can be used from python blocks
like the ordinary python functions they are.

Quite neat.
In future, most of the functionality will be in separate namespaces,
the top-level will just assemble the main library file, usnig the
provided %defs. That way, the main file is kept clean.
2015-03-02 11:52:15 +01:00
Sebastian Thiel
be938255bd feat(mako): cargo.toml template
It's quite final, and super easy to change and to read.

It seems we want to use namespaces/shared implementations soon to allow
using defs. In our case, we transform the version in a particular way,
which is easy enough, yet I'd like to use it to make the system more
powerful.
2015-03-01 18:31:55 +01:00
Sebastian Thiel
2d77857aaf feat(mako): generic source/output mappings
This includes proper handling of dependencies.
The code is concise, pythonic and quite 'cody', but does the job just
fine.
2015-03-01 18:04:00 +01:00
Sebastian Thiel
087a0762ac feat(mako-render): multiple input-outputs per call
That way, we read the data files only once, but produce all the outputs
we need. Together with a powerful makefile, we have a multi-invocation
with proper depedency tracking.
Everything will be regenerated though, even though just a single input
template file changed.

The alternative would be to have one dependency and invocation per
input dependency, but that will read the entire json each time.

Let's see what's faster/more useful during development.
2015-03-01 17:44:02 +01:00
Sebastian Thiel
c3d399e91a fix(mako-deps): handle whitespace and add GENINFO
Also, remove obsolete pyra files
2015-03-01 16:54:45 +01:00
Sebastian Thiel
d79f041e30 Merge branch 'mako-templates'
And mako it is !
2015-03-01 16:29:12 +01:00
Sebastian Thiel
30041e9c7d feat(mako): api deps generation works
It's very pleasant to use, and worth the slightly greater effort.
2015-03-01 16:28:57 +01:00
Sebastian Thiel
20410adb78 feat(mako): mako autosetup and improved executable
Now we can write mako templates, with a similar feature set as
pyratemp. Except that its syntax is nicer, allows to do everything
and that there is syntax highlight support.

Let's see how it fares
2015-03-01 16:01:46 +01:00
Sebastian Thiel
7b38b4c12f Merge branch 'template-engine' 2015-03-01 15:22:29 +01:00
Sebastian Thiel
c0bfeabbc3 feat(pyratemp): successfully generating make deps
After minor modifications to pyratemp, it certainly does the job.

What it **does NOT** do:

* multiple outputs per template/command invocation
* NICE embedding of code (like GSL can)

It will do the job nonetheless, but mako might be worth a look
2015-03-01 15:08:37 +01:00
Sebastian Thiel
179c64c5e7 fix(pyratemp): is now self-contained
A little more than the promised 500 lines of code though ;).
2015-03-01 13:29:54 +01:00
Sebastian Thiel
e06738a7bd fix(template-engine): removed gsl, added pyratemp
As GSL failed in my first attempt to get the example program going,
it might be better to try something else before too much time is spend.

Fortunately, pyratemp **seems** to be something usable, and even if not,
it might be possible to make it usable as it's just a 'simple'
python script that I might be able to understand, if need be.
2015-03-01 13:24:01 +01:00
Sebastian Thiel
f2ca8c3fb7 fix(make): fixed dependencies
The make deps generator should only care about the shared xml
2015-03-01 11:54:44 +01:00
Sebastian Thiel
e081017cb3 fix(xml): forgot to add shared.xml
As XML files are ignored, I didn't see that.
2015-03-01 11:47:32 +01:00
Sebastian Thiel
0812068c90 feat(gsl): my first gsl program ...
And it crashes on linux and on osx.
What am I doing wrong ?
2015-03-01 11:45:00 +01:00
Sebastian Thiel
0c2f149b1e feat(make): unified make based build system
Added all prerequisite programs in binary for easier use.
Make is now implemented top-level, and is not expected to do too much
work actually. It will, however, keep track of all required
gsl invocation and make sure calls are efficient by not having
to rebuild everything every time. That's what make does, anyway ;)
2015-03-01 11:21:41 +01:00
Sebastian Thiel
f13c2960ab feat(service): added authenticator arg
That will allow interaction between client and authentication attempts.
It also shows how cumbersome it is to deal with all these
generics ... but hey, you gotta do what you gotta do.

If boxes of pointers would be used, it would be easier to handle, but
enforces a certain memory model. That, of course, is not desired.
2015-03-01 10:21:03 +01:00
Sebastian Thiel
6fe9a5d8bf Merge branch 'gsl-setup' 2015-03-01 09:28:33 +01:00
Sebastian Thiel
1980f76c32 feat(make): makefile for handling json-to-xml
That way, it will remain clearly documented how to do this, and allow
for efficient calling of gsl as well, at some point.

Of course it will be a little more difficult for us to know all
dependencies, but gsl could generate these as well for us, I suppose.
2015-03-01 09:24:16 +01:00
Sebastian Thiel
e83b063f05 fix(json2xml): works exactly as needed.
Producing non-malformed pretty xml
2015-03-01 09:03:49 +01:00
Sebastian Thiel
e0724fb56f fix(json2xml): xml.tostring works now ...
... but it still generates invalid output due to scopes.
Should be an easy fix
2015-03-01 08:22:35 +01:00
Sebastian Thiel
143aa6fd86 fix(json2xml): make it handle top-level keys
It can now handle multiple of them.

However, conversion fails, as the bloody xml converter can't handle
booleans ??? WTF
2015-03-01 08:06:24 +01:00
Sebastian Thiel
eebcf54929 feat(xmlconv): add conversion tool and youtube api
The json file needs to be converted to valid XML, which should be
done by a soon-to-be-modified xml2json tool.
2015-03-01 07:39:04 +01:00
Sebastian Thiel
aaf432fb54 feat(videos): first primitive types and api
Now it should be possible to implement first version of actual
insert handling, with everything there is about it.

That should eventually help to generalize it, as I am definitely
not going to hand-implemented these protocols ... .

The great thing is, that if done right, one will be able to truly be
first and make an impact !
2015-02-28 19:13:51 +01:00
Sebastian Thiel
d4869cfefc fix(cargo): make sure we get correct openssl vers. 2015-02-28 19:11:53 +01:00
Sebastian Thiel
24a727fdea feat(layout): improved module layout
As there will be plenty of types, it will be better to split it up.
Also learned something about self::<submodule> :).

Insert and and update should be hand-implemented just to see how it's
working. Then there should be some investment to auto-generate this
with `gsl`. Once the latter works ... I could auto-generate all apis,
or adjust the go generator to create rust instead.

Depends on what will be faster ... .
2015-02-28 16:44:04 +01:00
Sebastian Thiel
67b052c5f3 feat(architecture): figure out ownership model
There is a central `YouTube` type which helps constructing various
sub-builders, which in turn provide individual functions.

Architecturally, it's very similar to the go implementation, but
more efficient memory wise.
2015-02-28 15:42:52 +01:00
Sebastian Thiel
dda847607f feat(all): initial commit
Base project with everything it will need to grow:
* CI
* documentation
* basic cargo
2015-02-27 10:23:31 +01:00