├── .gitignore ├── .htaccess ├── LICENSE ├── README.md ├── beatles.rdf ├── beatles.ttl ├── classes ├── Convert.php ├── Endpoint.php ├── Exporter.php ├── HTTPStatus.php ├── Importer.php ├── Logging.php ├── MetaDb.php ├── Queries.php ├── Utils.php └── modules │ ├── abstractModule.php │ ├── adminModule.php │ ├── exportModule.php │ ├── redirectModule.php │ ├── serviceModule.php │ ├── sessionModule.php │ ├── sparqlFilterModule.php │ ├── staticModule.php │ ├── typeModule.php │ └── uriModule.php ├── common.inc.php ├── default.settings.inc.php ├── doc ├── README ├── examples │ ├── components │ │ ├── services │ │ │ ├── people │ │ │ │ ├── html.template │ │ │ │ └── queries │ │ │ │ │ └── main.query │ │ │ └── peopleByName │ │ │ │ ├── html.template │ │ │ │ ├── json.template │ │ │ │ └── queries │ │ │ │ └── main.query │ │ └── types │ │ │ └── foaf:Person │ │ │ ├── html.template │ │ │ └── queries │ │ │ ├── attendees.query │ │ │ ├── birthplace.query │ │ │ ├── endpoint.dbpedia │ │ │ ├── geo.query │ │ │ └── location.query │ │ │ ├── main.query │ │ │ └── personalDetails.query │ └── originalComponents │ │ ├── includes │ │ └── header.inc │ │ ├── services │ │ ├── classes │ │ │ ├── html.template │ │ │ └── queries │ │ │ │ └── main.query │ │ ├── instances │ │ │ ├── html.template │ │ │ └── queries │ │ │ │ └── main.query │ │ ├── namedGraphs │ │ │ ├── html.template │ │ │ └── queries │ │ │ │ └── main.query │ │ └── search │ │ │ ├── html.template │ │ │ ├── json.template │ │ │ └── queries │ │ │ └── main.query │ │ ├── static │ │ ├── README.TXT │ │ ├── admin │ │ │ ├── codemirror │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── demo │ │ │ │ │ ├── activeline.html │ │ │ │ │ ├── changemode.html │ │ │ │ │ ├── closetag.html │ │ │ │ │ ├── complete.html │ │ │ │ │ ├── emacs.html │ │ │ │ │ ├── folding.html │ │ │ │ │ ├── formatting.html │ │ │ │ │ ├── fullscreen.html │ │ │ │ │ ├── loadmode.html │ │ │ │ │ ├── marker.html │ │ │ │ │ ├── matchhighlighter.html │ │ │ │ │ ├── multiplex.html │ │ │ │ │ ├── mustache.html │ │ │ │ │ ├── preview.html │ │ │ │ │ ├── resize.html │ │ │ │ │ ├── runmode.html │ │ │ │ │ ├── search.html │ │ │ │ │ ├── theme.html │ │ │ │ │ ├── vim.html │ │ │ │ │ ├── visibletabs.html │ │ │ │ │ └── xmlcomplete.html │ │ │ │ ├── doc │ │ │ │ │ ├── baboon.png │ │ │ │ │ ├── baboon_vector.svg │ │ │ │ │ ├── compress.html │ │ │ │ │ ├── docs.css │ │ │ │ │ ├── internals.html │ │ │ │ │ ├── manual.html │ │ │ │ │ ├── oldrelease.html │ │ │ │ │ ├── reporting.html │ │ │ │ │ └── upgrade_v2.2.html │ │ │ │ ├── index.html │ │ │ │ ├── keymap │ │ │ │ │ ├── emacs.js │ │ │ │ │ └── vim.js │ │ │ │ ├── lib │ │ │ │ │ ├── codemirror.css │ │ │ │ │ ├── codemirror.js │ │ │ │ │ └── util │ │ │ │ │ │ ├── closetag.js │ │ │ │ │ │ ├── dialog.css │ │ │ │ │ │ ├── dialog.js │ │ │ │ │ │ ├── foldcode.js │ │ │ │ │ │ ├── formatting.js │ │ │ │ │ │ ├── javascript-hint.js │ │ │ │ │ │ ├── loadmode.js │ │ │ │ │ │ ├── match-highlighter.js │ │ │ │ │ │ ├── multiplex.js │ │ │ │ │ │ ├── overlay.js │ │ │ │ │ │ ├── pig-hint.js │ │ │ │ │ │ ├── runmode-standalone.js │ │ │ │ │ │ ├── runmode.js │ │ │ │ │ │ ├── search.js │ │ │ │ │ │ ├── searchcursor.js │ │ │ │ │ │ ├── simple-hint.css │ │ │ │ │ │ ├── simple-hint.js │ │ │ │ │ │ └── xml-hint.js │ │ │ │ ├── mode │ │ │ │ │ ├── clike │ │ │ │ │ │ ├── clike.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── scala.html │ │ │ │ │ ├── clojure │ │ │ │ │ │ ├── clojure.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── coffeescript │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── coffeescript.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── commonlisp │ │ │ │ │ │ ├── commonlisp.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── css │ │ │ │ │ │ ├── css.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── diff │ │ │ │ │ │ ├── diff.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── ecl │ │ │ │ │ │ ├── ecl.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── erlang │ │ │ │ │ │ ├── erlang.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── gfm │ │ │ │ │ │ ├── gfm.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── go │ │ │ │ │ │ ├── go.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── groovy │ │ │ │ │ │ ├── groovy.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── haskell │ │ │ │ │ │ ├── haskell.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── haxe │ │ │ │ │ │ ├── haxe.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── htmlembedded │ │ │ │ │ │ ├── htmlembedded.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── htmlmixed │ │ │ │ │ │ ├── htmlmixed.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── javascript │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── javascript.js │ │ │ │ │ ├── jinja2 │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── jinja2.js │ │ │ │ │ ├── less │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── less.js │ │ │ │ │ ├── lua │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── lua.js │ │ │ │ │ ├── markdown │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── markdown.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── mysql │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── mysql.js │ │ │ │ │ ├── ntriples │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── ntriples.js │ │ │ │ │ ├── ocaml │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── ocaml.js │ │ │ │ │ ├── pascal │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── pascal.js │ │ │ │ │ ├── perl │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── perl.js │ │ │ │ │ ├── php │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── php.js │ │ │ │ │ ├── pig │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── pig.js │ │ │ │ │ ├── plsql │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── plsql.js │ │ │ │ │ ├── properties │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── properties.js │ │ │ │ │ ├── python │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── python.js │ │ │ │ │ ├── r │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── r.js │ │ │ │ │ ├── rpm │ │ │ │ │ │ ├── changes │ │ │ │ │ │ │ ├── changes.js │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ └── spec │ │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ │ ├── spec.css │ │ │ │ │ │ │ └── spec.js │ │ │ │ │ ├── rst │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── rst.js │ │ │ │ │ ├── ruby │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── ruby.js │ │ │ │ │ ├── rust │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── rust.js │ │ │ │ │ ├── scheme │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── scheme.js │ │ │ │ │ ├── shell │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── shell.js │ │ │ │ │ ├── sieve │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── sieve.js │ │ │ │ │ ├── smalltalk │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── smalltalk.js │ │ │ │ │ ├── smarty │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── smarty.js │ │ │ │ │ ├── sparql │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── sparql.js │ │ │ │ │ ├── stex │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── stex.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── tiddlywiki │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── tiddlywiki.css │ │ │ │ │ │ └── tiddlywiki.js │ │ │ │ │ ├── tiki │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── tiki.css │ │ │ │ │ │ └── tiki.js │ │ │ │ │ ├── vb │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── vb.js │ │ │ │ │ ├── vbscript │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── vbscript.js │ │ │ │ │ ├── velocity │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── velocity.js │ │ │ │ │ ├── verilog │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── verilog.js │ │ │ │ │ ├── xml │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── xml.js │ │ │ │ │ ├── xquery │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── test │ │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ │ ├── testBase.js │ │ │ │ │ │ │ ├── testEmptySequenceKeyword.js │ │ │ │ │ │ │ ├── testMultiAttr.js │ │ │ │ │ │ │ ├── testNamespaces.js │ │ │ │ │ │ │ ├── testProcessingInstructions.js │ │ │ │ │ │ │ └── testQuotes.js │ │ │ │ │ │ └── xquery.js │ │ │ │ │ └── yaml │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── yaml.js │ │ │ │ ├── package.json │ │ │ │ ├── test │ │ │ │ │ ├── driver.js │ │ │ │ │ ├── index.html │ │ │ │ │ ├── lint │ │ │ │ │ │ ├── lint.js │ │ │ │ │ │ └── parse-js.js │ │ │ │ │ ├── mode_test.css │ │ │ │ │ ├── mode_test.js │ │ │ │ │ ├── phantom_driver.js │ │ │ │ │ ├── run.js │ │ │ │ │ └── test.js │ │ │ │ └── theme │ │ │ │ │ ├── ambiance.css │ │ │ │ │ ├── blackboard.css │ │ │ │ │ ├── cobalt.css │ │ │ │ │ ├── eclipse.css │ │ │ │ │ ├── elegant.css │ │ │ │ │ ├── erlang-dark.css │ │ │ │ │ ├── lesser-dark.css │ │ │ │ │ ├── monokai.css │ │ │ │ │ ├── neat.css │ │ │ │ │ ├── night.css │ │ │ │ │ ├── rubyblue.css │ │ │ │ │ ├── vibrant-ink.css │ │ │ │ │ └── xq-dark.css │ │ │ ├── img │ │ │ │ ├── barchart.png │ │ │ │ ├── circlepacking.png │ │ │ │ ├── columnchart.png │ │ │ │ ├── dendrogram.png │ │ │ │ ├── graph.png │ │ │ │ ├── linechart.png │ │ │ │ ├── maps.png │ │ │ │ ├── parallelcoordinates.png │ │ │ │ ├── piechart.png │ │ │ │ ├── radar.png │ │ │ │ ├── scatter.png │ │ │ │ ├── table.png │ │ │ │ ├── timeknots.png │ │ │ │ └── wordcloud.png │ │ │ └── js │ │ │ │ └── editor.js │ │ ├── css │ │ │ ├── basic.css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── person.css │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ ├── glyphicons-halflings.png │ │ │ ├── lodspeakr_logotype.png │ │ │ └── wait.gif │ │ ├── index.html │ │ ├── js │ │ │ ├── bootstrap-typeahead.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── d3.layout.cloud.js │ │ │ ├── jquery.js │ │ │ ├── raphael │ │ │ │ ├── g.bar.js │ │ │ │ ├── g.raphael.js │ │ │ │ └── raphael.js │ │ │ └── typeahead.js │ │ └── vendor │ │ │ └── timeknots │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── example │ │ │ └── index.html │ │ │ └── src │ │ │ ├── d3.license │ │ │ ├── d3.v2.min.js │ │ │ ├── timeknots-min.js │ │ │ └── timeknots.js │ │ └── types │ │ └── rdfs__Resource │ │ ├── html.template │ │ └── queries │ │ ├── po.query │ │ └── sp.query └── img │ └── 303redirection.png ├── index.php ├── install.sh ├── lib ├── Haanga │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── contrib │ │ ├── dummy.php │ │ └── meneame_pagination.php │ ├── examples │ │ ├── complex │ │ │ ├── base.html │ │ │ ├── include.html │ │ │ ├── index-test.html │ │ │ ├── index.html │ │ │ └── subtemplate.html │ │ ├── django-yui-layout-templates │ │ │ ├── README │ │ │ ├── layout_1_column_full_width.html │ │ │ ├── layout_2_columns_narrow_left_column.html │ │ │ ├── layout_2_columns_narrow_right_column.html │ │ │ ├── layout_2_equal_columns.html │ │ │ ├── layout_3_columns_quarter_half_quarter.html │ │ │ ├── layout_3_columns_varying_width.html │ │ │ ├── layout_3_equal_columns.html │ │ │ ├── layout_4_equal_columns.html │ │ │ ├── layout_base.html │ │ │ ├── layout_overrides.html │ │ │ └── shared │ │ │ │ ├── footer.html │ │ │ │ └── header.html │ │ ├── django-yui.php │ │ ├── index.php │ │ ├── inheritance.php │ │ ├── inheritance │ │ │ ├── layout.html │ │ │ ├── page.html │ │ │ ├── section.html │ │ │ └── shared │ │ │ │ └── about.html │ │ ├── template_runtime.php │ │ └── tmp │ │ │ └── .empty │ ├── haanga-cli.php │ ├── lib │ │ ├── Haanga.php │ │ └── Haanga │ │ │ ├── AST.php │ │ │ ├── Compiler.php │ │ │ ├── Compiler │ │ │ ├── Exception.php │ │ │ ├── Parser.php │ │ │ ├── Parser.y │ │ │ ├── Runtime.php │ │ │ └── Tokenizer.php │ │ │ ├── Exception.php │ │ │ ├── Extension.php │ │ │ ├── Extension │ │ │ ├── Filter.php │ │ │ ├── Filter │ │ │ │ ├── Alert.php │ │ │ │ ├── Capfirst.php │ │ │ │ ├── Count.php │ │ │ │ ├── Cut.php │ │ │ │ ├── D3circlepacking.php │ │ │ │ ├── D3dendrogram.php │ │ │ │ ├── D3forcegraph.php │ │ │ │ ├── D3linechart.php │ │ │ │ ├── D3parallelcoordinates.php │ │ │ │ ├── D3radarchart.php │ │ │ │ ├── D3stackedcolumnchart.php │ │ │ │ ├── D3wordcloud.php │ │ │ │ ├── Date.php │ │ │ │ ├── Default.php │ │ │ │ ├── Deurifier.php │ │ │ │ ├── Dictsort.php │ │ │ │ ├── Empty.php │ │ │ │ ├── Escape.php │ │ │ │ ├── Exists.php │ │ │ │ ├── Explode.php │ │ │ │ ├── Googlemaps.php │ │ │ │ ├── Googlevizannotatedtimeline.php │ │ │ │ ├── Googlevizbarchart.php │ │ │ │ ├── Googlevizcolumnchart.php │ │ │ │ ├── Googlevizlinechart.php │ │ │ │ ├── Googlevizpiechart.php │ │ │ │ ├── Googlevizscatterchart.php │ │ │ │ ├── Googleviztable.php │ │ │ │ ├── Hostname.php │ │ │ │ ├── Intval.php │ │ │ │ ├── Isarray.php │ │ │ │ ├── Join.php │ │ │ │ ├── Leafletmaps.php │ │ │ │ ├── Length.php │ │ │ │ ├── Lower.php │ │ │ │ ├── Null.php │ │ │ │ ├── Pluralize.php │ │ │ │ ├── Pop.php │ │ │ │ ├── Raphaeltimeline.php │ │ │ │ ├── Reverse.php │ │ │ │ ├── Safe.php │ │ │ │ ├── Slugify.php │ │ │ │ ├── Stringformat.php │ │ │ │ ├── Strlen.php │ │ │ │ ├── Substr.php │ │ │ │ ├── Timeknot.php │ │ │ │ ├── Title.php │ │ │ │ ├── Trans.php │ │ │ │ ├── Translation.php │ │ │ │ ├── Trim.php │ │ │ │ ├── Truncatechars.php │ │ │ │ ├── Truncatewords.php │ │ │ │ ├── Upper.php │ │ │ │ ├── Urifier.php │ │ │ │ ├── Urifragment.php │ │ │ │ ├── Uripath.php │ │ │ │ ├── Urischeme.php │ │ │ │ ├── Urldecode.php │ │ │ │ ├── Urlencode.php │ │ │ │ └── gRaphaelBarChart.php │ │ │ ├── Tag.php │ │ │ └── Tag │ │ │ │ ├── Buffer.php │ │ │ │ ├── Currenttime.php │ │ │ │ ├── Cycle.php │ │ │ │ ├── Dictsort.php │ │ │ │ ├── Escape.php │ │ │ │ ├── Exec.php │ │ │ │ ├── Firstof.php │ │ │ │ ├── Inline.php │ │ │ │ ├── Lower.php │ │ │ │ ├── Min.php │ │ │ │ ├── Setsafe.php │ │ │ │ ├── Spaceless.php │ │ │ │ ├── Templatetag.php │ │ │ │ ├── Trans.php │ │ │ │ ├── Tryinclude.php │ │ │ │ └── Upper.php │ │ │ └── Generator │ │ │ └── PHP.php │ └── tests │ │ ├── TestSuite.php │ │ ├── assert_templates │ │ ├── autoescape.html │ │ ├── autoescape.php │ │ ├── autoescape.tpl │ │ ├── base.html │ │ ├── base.php │ │ ├── base.tpl │ │ ├── bitwise.html │ │ ├── bitwise.tpl │ │ ├── bug_#14.html │ │ ├── bug_#14.php │ │ ├── bug_#14.tpl │ │ ├── bug_001.html │ │ ├── bug_001.php │ │ ├── bug_001.tpl │ │ ├── class_static.html │ │ ├── class_static.tpl │ │ ├── concat.html │ │ ├── concat.tpl │ │ ├── concat1.html │ │ ├── concat1.tpl │ │ ├── custom_tag.html.php │ │ ├── custom_tag.tpl │ │ ├── cycle.html │ │ ├── cycle.php │ │ ├── cycle.tpl │ │ ├── dummy.html │ │ ├── dummy.tpl │ │ ├── empty_block.html │ │ ├── empty_block.tpl │ │ ├── empty_block_base.tpl │ │ ├── empty_loop.html │ │ ├── empty_loop.php │ │ ├── empty_loop.tpl │ │ ├── exec-inc.tpl │ │ ├── exec.html.php │ │ ├── exec.tpl │ │ ├── expr.html │ │ ├── expr.php │ │ ├── expr.tpl │ │ ├── filter.html │ │ ├── filter.php │ │ ├── filter.tpl │ │ ├── first_of.html │ │ ├── first_of.php │ │ ├── first_of.tpl │ │ ├── for_range.html │ │ ├── for_range.tpl │ │ ├── for_range1.html │ │ ├── for_range1.tpl │ │ ├── for_range2.html │ │ ├── for_range2.tpl │ │ ├── for_range3.html │ │ ├── for_range3.tpl │ │ ├── for_range4.html │ │ ├── for_range4.php │ │ ├── for_range4.tpl │ │ ├── for_range5.html │ │ ├── for_range5.php │ │ ├── for_range5.tpl │ │ ├── foreach_vars.html │ │ ├── foreach_vars.php │ │ ├── foreach_vars.tpl │ │ ├── global.html │ │ ├── global.php │ │ ├── global.tpl │ │ ├── if_else_simple.html │ │ ├── if_else_simple.php │ │ ├── if_else_simple.tpl │ │ ├── ifchanged.html │ │ ├── ifchanged.php │ │ ├── ifchanged.tpl │ │ ├── ifequals.html │ │ ├── ifequals.tpl │ │ ├── in.html │ │ ├── in.php │ │ ├── in.tpl │ │ ├── inheritence_nested_block.html │ │ ├── inheritence_nested_block.tpl │ │ ├── inheritence_nested_block_duplicated.html │ │ ├── inheritence_nested_block_duplicated.tpl │ │ ├── inline.html │ │ ├── inline.tpl │ │ ├── inline_buffer.tpl │ │ ├── intval.html │ │ ├── intval.php │ │ ├── intval.tpl │ │ ├── is_array.html │ │ ├── is_array.php │ │ ├── is_array.tpl │ │ ├── join.html │ │ ├── join.php │ │ ├── join.tpl │ │ ├── load.html │ │ ├── load.php │ │ ├── load.tpl │ │ ├── locale │ │ │ └── es_ES │ │ │ │ └── LC_MESSAGES │ │ │ │ ├── messages.mo │ │ │ │ └── messages.po │ │ ├── loop.html │ │ ├── loop.php │ │ ├── loop.tpl │ │ ├── loop_object.html │ │ ├── loop_object.php │ │ ├── loop_object.tpl │ │ ├── method.html │ │ ├── method.php │ │ ├── method.tpl │ │ ├── nested_block.html │ │ ├── nested_block.tpl │ │ ├── nested_block_second_parent.html │ │ ├── nested_block_second_parent.tpl │ │ ├── nested_block_second_parent_override.html │ │ ├── nested_block_second_parent_override.tpl │ │ ├── null.html │ │ ├── null.php │ │ ├── null.tpl │ │ ├── object.html │ │ ├── object.php │ │ ├── object.tpl │ │ ├── partial.tpl │ │ ├── pluralize.html │ │ ├── pluralize.php │ │ ├── pluralize.tpl │ │ ├── regroup.html │ │ ├── regroup.php │ │ ├── regroup.tpl │ │ ├── set.html │ │ ├── set.tpl │ │ ├── spaceless.html │ │ ├── spaceless.tpl │ │ ├── strip_whitespace.html │ │ ├── strip_whitespace.tpl │ │ ├── sub_set.tpl │ │ ├── subtemplate.html │ │ ├── subtemplate.php │ │ ├── subtemplate.tpl │ │ ├── templatetag.html │ │ ├── templatetag.tpl │ │ ├── title.html │ │ ├── title.php │ │ ├── title.tpl │ │ ├── trans.html │ │ ├── trans.php │ │ ├── trans.tpl │ │ ├── truncatewords.html │ │ ├── truncatewords.php │ │ ├── truncatewords.tpl │ │ ├── try_include.html │ │ ├── try_include.tpl │ │ ├── variable_existe.html │ │ ├── variable_existe.tpl │ │ ├── with.html │ │ ├── with.php │ │ └── with.tpl │ │ ├── err_templates │ │ ├── block.tpl │ │ ├── block_nonparent.tpl │ │ ├── block_super.tpl │ │ ├── block_super_filter.tpl │ │ ├── block_super_nonsubtemplate.tpl │ │ ├── dictsort.tpl │ │ ├── dictsort1.tpl │ │ ├── dictsort2.tpl │ │ ├── err_block.tpl │ │ ├── err_block_nonparent.tpl │ │ ├── err_block_super.tpl │ │ ├── err_block_super_filter.tpl │ │ ├── err_block_super_nonsubtemplate.tpl │ │ ├── err_dictsort.tpl │ │ ├── err_dictsort1.tpl │ │ ├── err_dictsort2.tpl │ │ ├── err_forloop.tpl │ │ ├── err_forloop1.tpl │ │ ├── err_ifchanged.tpl │ │ ├── err_invalid_blockname.tpl │ │ ├── err_invalid_tryinclude.tpl │ │ ├── err_load1.tpl │ │ ├── err_load2.tpl │ │ ├── err_loop_varname.tpl │ │ ├── err_pluralize.tpl │ │ ├── err_reverse.tpl │ │ ├── err_templatetag1.tpl │ │ ├── err_templatetag2.tpl │ │ ├── err_templatetag3.tpl │ │ ├── err_title.tpl │ │ ├── exec_notallowed.tpl │ │ ├── forloop.tpl │ │ ├── forloop1.tpl │ │ ├── ifchanged.tpl │ │ ├── inline1.tpl │ │ ├── inline2.tpl │ │ ├── inline3.tpl │ │ ├── inline4.tpl │ │ ├── inline5.tpl │ │ ├── invalid_blockname.tpl │ │ ├── loop_varname.tpl │ │ ├── pluralize.tpl │ │ ├── reverse.tpl │ │ ├── templatetag1.tpl │ │ ├── templatetag2.tpl │ │ ├── templatetag3.tpl │ │ ├── title.tpl │ │ ├── tokenizer_1.tpl │ │ ├── tokenizer_2.tpl │ │ ├── tokenizer_3.tpl │ │ ├── tokenizer_4.tpl │ │ └── tokenizer_5.tpl │ │ ├── errorTest.php │ │ ├── templateTest.php │ │ └── tmp │ │ ├── assert_templates │ │ ├── autoescape.tpl.php │ │ ├── autoescape.tpl.php.dump │ │ ├── base.tpl.php │ │ ├── base.tpl.php.dump │ │ ├── bitwise.tpl.php │ │ ├── bitwise.tpl.php.dump │ │ ├── bug_001.tpl.php │ │ ├── bug_001.tpl.php.dump │ │ ├── class_static.tpl.php │ │ ├── class_static.tpl.php.dump │ │ ├── concat.tpl.php │ │ ├── concat.tpl.php.dump │ │ ├── concat1.tpl.php │ │ ├── concat1.tpl.php.dump │ │ ├── custom_tag.tpl.php │ │ ├── custom_tag.tpl.php.dump │ │ ├── cycle.tpl.php │ │ ├── cycle.tpl.php.dump │ │ ├── dummy.tpl.php │ │ ├── dummy.tpl.php.dump │ │ ├── empty_block.tpl.php │ │ ├── empty_block.tpl.php.dump │ │ ├── empty_block_base.tpl.php │ │ ├── empty_block_base.tpl.php.dump │ │ ├── empty_loop.tpl.php │ │ ├── empty_loop.tpl.php.dump │ │ ├── exec.tpl.php │ │ ├── exec.tpl.php.dump │ │ ├── filter.tpl.php │ │ ├── filter.tpl.php.dump │ │ ├── first_of.tpl.php │ │ ├── first_of.tpl.php.dump │ │ ├── for_range.tpl.php │ │ ├── for_range.tpl.php.dump │ │ ├── for_range1.tpl.php │ │ ├── for_range1.tpl.php.dump │ │ ├── for_range2.tpl.php │ │ ├── for_range2.tpl.php.dump │ │ ├── for_range3.tpl.php │ │ ├── for_range3.tpl.php.dump │ │ ├── for_range4.tpl.php │ │ ├── for_range4.tpl.php.dump │ │ ├── for_range5.tpl.php │ │ ├── for_range5.tpl.php.dump │ │ ├── foreach_vars.tpl.php │ │ ├── foreach_vars.tpl.php.dump │ │ ├── global.tpl.php │ │ ├── global.tpl.php.dump │ │ ├── if_else_simple.tpl.php │ │ ├── if_else_simple.tpl.php.dump │ │ ├── ifchanged.tpl.php │ │ ├── ifchanged.tpl.php.dump │ │ ├── ifequals.tpl.php │ │ ├── ifequals.tpl.php.dump │ │ ├── in.tpl.php │ │ ├── in.tpl.php.dump │ │ ├── inheritence_nested_block.tpl.php │ │ ├── inheritence_nested_block.tpl.php.dump │ │ ├── inheritence_nested_block_duplicated.tpl.php │ │ ├── inheritence_nested_block_duplicated.tpl.php.dump │ │ ├── inline.tpl.php │ │ ├── inline.tpl.php.dump │ │ ├── intval.tpl.php │ │ ├── intval.tpl.php.dump │ │ ├── join.tpl.php │ │ ├── join.tpl.php.dump │ │ ├── load.tpl.php │ │ ├── load.tpl.php.dump │ │ ├── loop.tpl.php │ │ ├── loop.tpl.php.dump │ │ ├── loop_object.tpl.php │ │ ├── loop_object.tpl.php.dump │ │ ├── method.tpl.php │ │ ├── method.tpl.php.dump │ │ ├── nested_block.tpl.php │ │ ├── nested_block.tpl.php.dump │ │ ├── nested_block_second_parent.tpl.php │ │ ├── nested_block_second_parent.tpl.php.dump │ │ ├── nested_block_second_parent_override.tpl.php │ │ ├── nested_block_second_parent_override.tpl.php.dump │ │ ├── object.tpl.php │ │ ├── object.tpl.php.dump │ │ ├── partial.tpl.php │ │ ├── partial.tpl.php.dump │ │ ├── pluralize.tpl.php │ │ ├── pluralize.tpl.php.dump │ │ ├── regroup.tpl.php │ │ ├── regroup.tpl.php.dump │ │ ├── set.tpl.php │ │ ├── set.tpl.php.dump │ │ ├── spaceless.tpl.php │ │ ├── spaceless.tpl.php.dump │ │ ├── strip_whitespace.tpl.php │ │ ├── strip_whitespace.tpl.php.dump │ │ ├── sub_set.tpl.php │ │ ├── sub_set.tpl.php.dump │ │ ├── subtemplate.tpl.php │ │ ├── subtemplate.tpl.php.dump │ │ ├── templatetag.tpl.php │ │ ├── templatetag.tpl.php.dump │ │ ├── title.tpl.php │ │ ├── title.tpl.php.dump │ │ ├── trans.tpl.php │ │ ├── trans.tpl.php.dump │ │ ├── truncatewords.tpl.php │ │ ├── truncatewords.tpl.php.dump │ │ ├── try_include.tpl.php │ │ ├── try_include.tpl.php.dump │ │ ├── variable_existe.tpl.php │ │ ├── variable_existe.tpl.php.dump │ │ ├── with.tpl.php │ │ └── with.tpl.php.dump │ │ └── err_templates │ │ ├── block.tpl.php │ │ ├── block_nonparent.tpl.php │ │ ├── block_super.tpl.php │ │ ├── block_super_filter.tpl.php │ │ ├── block_super_nonsubtemplate.tpl.php │ │ ├── dictsort.tpl.php │ │ ├── dictsort1.tpl.php │ │ ├── dictsort2.tpl.php │ │ ├── err_block.tpl.php │ │ ├── err_block_nonparent.tpl.php │ │ ├── err_block_super.tpl.php │ │ ├── err_block_super_filter.tpl.php │ │ ├── err_block_super_nonsubtemplate.tpl.php │ │ ├── err_dictsort.tpl.php │ │ ├── err_dictsort1.tpl.php │ │ ├── err_dictsort2.tpl.php │ │ ├── err_forloop.tpl.php │ │ ├── err_forloop1.tpl.php │ │ ├── err_ifchanged.tpl.php │ │ ├── err_invalid_blockname.tpl.php │ │ ├── err_invalid_tryinclude.tpl.php │ │ ├── err_load1.tpl.php │ │ ├── err_load2.tpl.php │ │ ├── err_loop_varname.tpl.php │ │ ├── err_pluralize.tpl.php │ │ ├── err_reverse.tpl.php │ │ ├── err_templatetag1.tpl.php │ │ ├── err_templatetag2.tpl.php │ │ ├── err_templatetag3.tpl.php │ │ ├── err_title.tpl.php │ │ ├── exec_notallowed.tpl.php │ │ ├── forloop.tpl.php │ │ ├── forloop1.tpl.php │ │ ├── ifchanged.tpl.php │ │ ├── inline1.tpl.php │ │ ├── inline2.tpl.php │ │ ├── inline3.tpl.php │ │ ├── inline4.tpl.php │ │ ├── inline5.tpl.php │ │ ├── invalid_blockname.tpl.php │ │ ├── loop_varname.tpl.php │ │ ├── pluralize.tpl.php │ │ ├── reverse.tpl.php │ │ ├── templatetag1.tpl.php │ │ ├── templatetag2.tpl.php │ │ ├── templatetag3.tpl.php │ │ ├── title.tpl.php │ │ ├── tokenizer_1.tpl.php │ │ ├── tokenizer_2.tpl.php │ │ ├── tokenizer_3.tpl.php │ │ ├── tokenizer_4.tpl.php │ │ └── tokenizer_5.tpl.php └── arc2 │ ├── .gitignore │ ├── ARC2.php │ ├── ARC2_Class.php │ ├── ARC2_Reader.php │ ├── ARC2_Resource.php │ ├── ARC2_TestHandler.php │ ├── ARC2_getFormat.php │ ├── ARC2_getPreferredFormat.php │ ├── extractors │ ├── ARC2_DcExtractor.php │ ├── ARC2_ErdfExtractor.php │ ├── ARC2_MicroformatsExtractor.php │ ├── ARC2_OpenidExtractor.php │ ├── ARC2_PoshRdfExtractor.php │ ├── ARC2_RDFExtractor.php │ ├── ARC2_RdfaExtractor.php │ └── ARC2_TwitterProfilePicExtractor.php │ ├── parsers │ ├── ARC2_AtomParser.php │ ├── ARC2_CBJSONParser.php │ ├── ARC2_JSONParser.php │ ├── ARC2_LegacyXMLParser.php │ ├── ARC2_RDFParser.php │ ├── ARC2_RDFXMLParser.php │ ├── ARC2_RSSParser.php │ ├── ARC2_SGAJSONParser.php │ ├── ARC2_SPARQLParser.php │ ├── ARC2_SPARQLPlusParser.php │ ├── ARC2_SPARQLXMLResultParser.php │ ├── ARC2_SPOGParser.php │ ├── ARC2_SemHTMLParser.php │ └── ARC2_TurtleParser.php │ ├── serializers │ ├── ARC2_LegacyHTMLSerializer.php │ ├── ARC2_LegacyJSONSerializer.php │ ├── ARC2_LegacyXMLSerializer.php │ ├── ARC2_MicroRDFSerializer.php │ ├── ARC2_NTriplesSerializer.php │ ├── ARC2_POSHRDFSerializer.php │ ├── ARC2_RDFJSONSerializer.php │ ├── ARC2_RDFSerializer.php │ ├── ARC2_RDFXMLSerializer.php │ ├── ARC2_RSS10Serializer.php │ └── ARC2_TurtleSerializer.php │ ├── sparqlscript │ ├── ARC2_SPARQLScriptParser.php │ └── ARC2_SPARQLScriptProcessor.php │ └── store │ ├── ARC2_MemStore.php │ ├── ARC2_RemoteStore.php │ ├── ARC2_Store.php │ ├── ARC2_StoreAskQueryHandler.php │ ├── ARC2_StoreAtomLoader.php │ ├── ARC2_StoreCBJSONLoader.php │ ├── ARC2_StoreConstructQueryHandler.php │ ├── ARC2_StoreDeleteQueryHandler.php │ ├── ARC2_StoreDescribeQueryHandler.php │ ├── ARC2_StoreDumpQueryHandler.php │ ├── ARC2_StoreDumper.php │ ├── ARC2_StoreEndpoint.php │ ├── ARC2_StoreHelper.php │ ├── ARC2_StoreInsertQueryHandler.php │ ├── ARC2_StoreLoadQueryHandler.php │ ├── ARC2_StoreQueryHandler.php │ ├── ARC2_StoreRDFXMLLoader.php │ ├── ARC2_StoreRSSLoader.php │ ├── ARC2_StoreSGAJSONLoader.php │ ├── ARC2_StoreSPOGLoader.php │ ├── ARC2_StoreSelectQueryHandler.php │ ├── ARC2_StoreSemHTMLLoader.php │ ├── ARC2_StoreTableManager.php │ └── ARC2_StoreTurtleLoader.php ├── namespaces.php ├── root.htaccess └── utils ├── changeNamespaceSparql.php ├── create_db.sh ├── defaults ├── service │ ├── html.template │ └── queries │ │ └── main.query └── type │ ├── html.template │ └── queries │ ├── po.query │ └── sp.query ├── install ├── install-dev ├── install-https ├── link-components.sh ├── lodspk.sh └── modules ├── add-endpoint.php ├── add-namespace.php ├── add-variable.php ├── backup.sh ├── cache.sh ├── change-password.php ├── create-scaffold.sh ├── create-service.sh ├── create-type.sh ├── create-uri.sh ├── debug.php ├── default.php ├── delete-service.sh ├── delete-type.sh ├── delete-uri.sh ├── detail-component.sh ├── disable-module.php ├── enable-module.php ├── getvar.php ├── list-components.sh ├── list-endpoints.php ├── list-modules.php ├── list-namespaces.php ├── remove-endpoint.php ├── remove-namespace.php ├── remove-variable.php ├── restore.sh ├── start-endpoint.sh ├── stop-endpoint.sh ├── test-endpoint.sh ├── update-lodspeakr.sh └── version.sh /.gitignore: -------------------------------------------------------------------------------- 1 | settings.inc.php 2 | *~ 3 | views/* 4 | models/* 5 | components/* 6 | static/* 7 | cache/* 8 | meta/* 9 | meta/db.sqlite 10 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine on 2 | 3 | RewriteRule ^$ index.php [L] 4 | RewriteCond %{REQUEST_FILENAME} !-f 5 | RewriteCond %{REQUEST_FILENAME} !-d 6 | RewriteCond %{SCRIPT_FILENAME} !.*/index.php$ 7 | RewriteRule ^(.*)$ index.php?q=$1 [L] 8 | -------------------------------------------------------------------------------- /classes/modules/abstractModule.php: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /classes/modules/redirectModule.php: -------------------------------------------------------------------------------- 1 | 36 | -------------------------------------------------------------------------------- /default.settings.inc.php: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | ## Documentation 2 | 3 | The latest version of the documentation is available at 4 | 5 | https://github.com/alangrafu/lodspeakr/wiki 6 | 7 | ## Examples 8 | 9 | Some real-world examples are provided under example/components to show how components are used 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/examples/components/services/people/html.template: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | TWC People directory 8 | 9 | 10 | 11 |

People

12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /doc/examples/components/services/people/queries/main.query: -------------------------------------------------------------------------------- 1 | PREFIX foaf: 2 | PREFIX rdfs: 3 | 4 | SELECT DISTINCT ?person ?email ?name WHERE { 5 | GRAPH ?g { 6 | ?person a foaf:Person ; 7 | foaf:name ?name ; 8 | foaf:mbox ?email . 9 | } 10 | }order by ?name 11 | -------------------------------------------------------------------------------- /doc/examples/components/services/peopleByName/html.template: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | TWC People directory 8 | 9 | 10 | 11 |

People

12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /doc/examples/components/services/peopleByName/json.template: -------------------------------------------------------------------------------- 1 | { 2 | "people": [ 3 | {% for row in models.main %} 4 | { 5 | "uri": "{{row.person.value}}", 6 | "name": "{{row.name.value}}", 7 | "email": "{{row.email.value}}" 8 | }{%if ! forloop.last%},{%endif%} 9 | {% endfor %} 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /doc/examples/components/services/peopleByName/queries/main.query: -------------------------------------------------------------------------------- 1 | PREFIX foaf: 2 | PREFIX rdfs: 3 | 4 | SELECT DISTINCT ?person ?email ?name WHERE { 5 | GRAPH ?g { 6 | ?person a foaf:Person ; 7 | foaf:name ?name ; 8 | foaf:mbox ?email . 9 | FILTER(regex(?name, "^{{lodspk.args.arg0}}", "i" )) 10 | } 11 | }order by ?name 12 | -------------------------------------------------------------------------------- /doc/examples/components/types/foaf:Person/queries/attendees.query: -------------------------------------------------------------------------------- 1 | PREFIX twc: 2 | PREFIX foaf: 3 | SELECT DISTINCT ?attendee ?attendeeName WHERE { 4 | GRAPH { 5 | ?event twc:hasAttendee <{{uri}}> . 6 | ?event twc:hasAttendee ?attendee . 7 | OPTIONAL{ 8 | ?attendee foaf:name ?attendeeName . 9 | } 10 | FILTER(str(?attendee) != "{{uri}}") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /doc/examples/components/types/foaf:Person/queries/birthplace.query: -------------------------------------------------------------------------------- 1 | PREFIX twc: 2 | PREFIX foaf: 3 | PREFIX dbp: 4 | SELECT distinct ?bplace WHERE { 5 | GRAPH { 6 | <{{uri}}> dbp:birthPlace ?bplace 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /doc/examples/components/types/foaf:Person/queries/endpoint.dbpedia/geo.query: -------------------------------------------------------------------------------- 1 | PREFIX geo: 2 | PREFIX dbp: 3 | PREFIX rdfs: 4 | 5 | SELECT distinct ?lat ?lon ?name WHERE { 6 | <{{first.birthplace.bplace.value}}> rdfs:label ?name ; 7 | geo:lat ?lat; 8 | geo:long ?lon. 9 | }limit 1 10 | -------------------------------------------------------------------------------- /doc/examples/components/types/foaf:Person/queries/endpoint.dbpedia/location.query: -------------------------------------------------------------------------------- 1 | PREFIX rdfs: 2 | PREFIX dbp: 3 | SELECT distinct ?name ?abstract WHERE { 4 | <{{first.birthplace.bplace.value}}> dbp:abstract ?abstract; 5 | rdfs:label ?name . 6 | FILTER(lang(?abstract) = "en") 7 | }limit 1 8 | -------------------------------------------------------------------------------- /doc/examples/components/types/foaf:Person/queries/main.query: -------------------------------------------------------------------------------- 1 | PREFIX twc: 2 | PREFIX foaf: 3 | SELECT ?event ?eventName WHERE { 4 | GRAPH { 5 | ?event twc:hasAttendee <{{uri}}> . 6 | OPTIONAL{ 7 | ?event foaf:name ?eventName . 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /doc/examples/components/types/foaf:Person/queries/personalDetails.query: -------------------------------------------------------------------------------- 1 | PREFIX twc: 2 | PREFIX foaf: 3 | PREFIX rdfs: 4 | PREFIX dcterms: 5 | 6 | SELECT ?name ?desc ?pic WHERE { 7 | GRAPH { 8 | <{{uri}}> foaf:name ?name ; 9 | foaf:depiction ?pic ; 10 | dcterms:description ?desc. 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/classes/html.template: -------------------------------------------------------------------------------- 1 | {%include "../../includes/header.inc"%} 2 |
3 |

Classes available

4 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/classes/queries/main.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?resource WHERE { 2 | { 3 | GRAPH ?g { 4 | ?x a ?resource . 5 | } 6 | }UNION{ 7 | ?x a ?resource . 8 | } 9 | }order by ?resource 10 | LIMIT {{lodspk.maxResults}} 11 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/instances/html.template: -------------------------------------------------------------------------------- 1 | {%include "../../includes/header.inc"%} 2 |
3 |

Instances of class {{lodspk.args.arg0}}

4 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/instances/queries/main.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?resource WHERE { 2 | { 3 | GRAPH ?g{ 4 | ?resource a {{lodspk.args.arg0}} 5 | } 6 | }UNION{ 7 | ?resource a {{lodspk.args.arg0}} 8 | } 9 | }order by ?resource 10 | limit {{lodspk.maxResults}} 11 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/namedGraphs/html.template: -------------------------------------------------------------------------------- 1 | {%include "../../includes/header.inc"%} 2 |
3 |

Named graphs available

4 | {%if first.main.g%} 5 |
    6 | {% for row in models.main %} 7 |
  • {{row.g.value}}
  • 8 | {% endfor %} 9 |
10 | {%else%} 11 |
12 |

No named graphs found

13 |
14 | {%endif%} 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/namedGraphs/queries/main.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?g WHERE { 2 | GRAPH ?g{ 3 | [] ?p ?resource . 4 | } 5 | } 6 | order by ?g 7 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/search/html.template: -------------------------------------------------------------------------------- 1 | {%include "../../includes/header.inc"%} 2 |
3 |

Results searching for "{{lodspk.args.arg0}}"

4 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/search/json.template: -------------------------------------------------------------------------------- 1 | [ 2 | {%for i in models.main%}{%if !forloop.first && models.main|length > 1%},{%endif%} 3 | { "value": "{{i.label.value}}", "uri": "{{i.resource.value}}"} 4 | {%endfor%} 5 | ] 6 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/services/search/queries/main.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?resource ?label WHERE { 2 | { 3 | GRAPH ?g { 4 | ?resource rdfs:label ?label . 5 | } 6 | }UNION{ 7 | ?resource rdfs:label ?label . 8 | } 9 | FILTER(regex(str(?label), "{{lodspk.args.arg0}}", "i")) 10 | } 11 | LIMIT 10 12 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/README.TXT: -------------------------------------------------------------------------------- 1 | This folder can be used to store static documents, such as HTML pages, CSS files and JS code. LODSPeaKr doesn't force you to use it, however, it is considered a good practice to have everything under static/ and not disperse everywhere. 2 | 3 | A second benefit is that it will allow other people to reuse your static pages if you decide to export the code. LODSPeaKr will only look on static/ models/ and views/ directories. 4 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /npm-debug.log -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror [![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror) 2 | 3 | CodeMirror is a JavaScript component that provides a code editor in 4 | the browser. When a mode is available for the language you are coding 5 | in, it will color your code, and optionally help with indentation. 6 | 7 | The project page is http://codemirror.net 8 | The manual is at http://codemirror.net/doc/manual.html 9 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/doc/baboon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/codemirror/doc/baboon.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/lib/util/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: relative; 3 | } 4 | 5 | .CodeMirror-dialog > div { 6 | position: absolute; 7 | top: 0; left: 0; right: 0; 8 | background: white; 9 | border-bottom: 1px solid #eee; 10 | z-index: 15; 11 | padding: .1em .8em; 12 | overflow: hidden; 13 | color: #333; 14 | } 15 | 16 | .CodeMirror-dialog input { 17 | border: none; 18 | outline: none; 19 | background: transparent; 20 | width: 20em; 21 | color: inherit; 22 | font-family: monospace; 23 | } 24 | 25 | .CodeMirror-dialog button { 26 | font-size: 70%; 27 | } -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/lib/util/simple-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-completions { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 6 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 7 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 8 | } 9 | .CodeMirror-completions select { 10 | background: #fafafa; 11 | outline: none; 12 | border: none; 13 | padding: 0; 14 | margin: 0; 15 | font-family: monospace; 16 | } 17 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("diff", function() { 2 | 3 | var TOKEN_NAMES = { 4 | '+': 'tag', 5 | '-': 'string', 6 | '@': 'meta' 7 | }; 8 | 9 | return { 10 | token: function(stream) { 11 | var tw_pos = stream.string.search(/[\t ]+?$/); 12 | 13 | if (!stream.sol() || tw_pos === 0) { 14 | stream.skipToEnd(); 15 | return ("error " + ( 16 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 17 | } 18 | 19 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 20 | 21 | if (tw_pos === -1) { 22 | stream.skipToEnd(); 23 | } else { 24 | stream.pos = tw_pos; 25 | } 26 | 27 | return token_name; 28 | } 29 | }; 30 | }); 31 | 32 | CodeMirror.defineMIME("text/x-diff", "diff"); 33 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/rpm/changes/changes.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("changes", function(config, modeConfig) { 2 | var headerSeperator = /^-+$/; 3 | var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; 4 | var simpleEmail = /^[\w+.-]+@[\w.-]+/; 5 | 6 | return { 7 | token: function(stream) { 8 | if (stream.sol()) { 9 | if (stream.match(headerSeperator)) { return 'tag'; } 10 | if (stream.match(headerLine)) { return 'tag'; } 11 | } 12 | if (stream.match(simpleEmail)) { return 'string'; } 13 | stream.next(); 14 | return null; 15 | } 16 | }; 17 | }); 18 | 19 | CodeMirror.defineMIME("text/x-rpm-changes", "changes"); 20 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/rpm/spec/spec.css: -------------------------------------------------------------------------------- 1 | .cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;} 2 | .cm-s-default span.cm-macro {color: #b218b2;} 3 | .cm-s-default span.cm-section {color: green; font-weight: bold;} 4 | .cm-s-default span.cm-script {color: red;} 5 | .cm-s-default span.cm-issue {color: yellow;} 6 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFFFFF; 3 | background-color: #990000; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px ! important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/vbscript/vbscript.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("vbscript", function() { 2 | var regexVBScriptKeyword = /^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im; 3 | 4 | return { 5 | token: function(stream) { 6 | if (stream.eatSpace()) return null; 7 | var ch = stream.next(); 8 | if (ch == "'") { 9 | stream.skipToEnd(); 10 | return "comment"; 11 | } 12 | if (ch == '"') { 13 | stream.skipTo('"'); 14 | return "string"; 15 | } 16 | 17 | if (/\w/.test(ch)) { 18 | stream.eatWhile(/\w/); 19 | if (regexVBScriptKeyword.test(stream.current())) return "keyword"; 20 | } 21 | return null; 22 | } 23 | }; 24 | }); 25 | 26 | CodeMirror.defineMIME("text/vbscript", "vbscript"); 27 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/xquery/test/testEmptySequenceKeyword.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | module("testEmptySequenceKeyword"); 3 | test("testEmptySequenceKeyword", function() { 4 | expect(1); 5 | 6 | var input = '"foo" instance of empty-sequence()'; 7 | var expected = '"foo" instance of empty-sequence()'; 8 | 9 | $("#sandbox").html(''); 10 | var editor = CodeMirror.fromTextArea($("#editor")[0]); 11 | var result = $(".CodeMirror-lines div div pre")[0].innerHTML; 12 | 13 | equal(result, expected); 14 | $("#editor").html(""); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/xquery/test/testMultiAttr.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | module("testMultiAttr"); 3 | test("test1", function() { 4 | expect(1); 5 | 6 | var expected = '<p a1="foo" a2="bar">hello world</p>'; 7 | 8 | $("#sandbox").html(''); 9 | $("#editor").html('

hello world

'); 10 | var editor = CodeMirror.fromTextArea($("#editor")[0]); 11 | var result = $(".CodeMirror-lines div div pre")[0].innerHTML; 12 | 13 | equal(result, expected); 14 | $("#editor").html(""); 15 | }); 16 | }); -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/mode/xquery/test/testProcessingInstructions.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | module("testProcessingInstructions"); 3 | test("testProcessingInstructions", function() { 4 | expect(1); 5 | 6 | var input = 'data() instance of xs:string'; 7 | var expected = 'data(<?target content?>) instance of xs:string'; 8 | 9 | $("#sandbox").html(''); 10 | var editor = CodeMirror.fromTextArea($("#editor")[0]); 11 | var result = $(".CodeMirror-lines div div pre")[0].innerHTML; 12 | 13 | equal(result, expected); 14 | $("#editor").html(""); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"2.34.1", 4 | "main": "codemirror.js", 5 | "description": "In-browser code editing made bearable", 6 | "licenses": [{"type": "MIT", 7 | "url": "http://codemirror.net/LICENSE"}], 8 | "directories": {"lib": "./lib"}, 9 | "scripts": {"test": "node ./test/run.js"}, 10 | "devDependencies": {"node-static": "0.6.0"}, 11 | "bugs": "http://github.com/marijnh/CodeMirror/issues", 12 | "keywords": ["JavaScript", "CodeMirror", "Editor"], 13 | "homepage": "http://codemirror.net", 14 | "maintainers":[{"name": "Marijn Haverbeke", 15 | "email": "marijnh@gmail.com", 16 | "web": "http://marijnhaverbeke.nl"}], 17 | "repositories": [{"type": "git", 18 | "url": "http://marijnhaverbeke.nl/git/codemirror"}, 19 | {"type": "git", 20 | "url": "https://github.com/marijnh/CodeMirror.git"}] 21 | } 22 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/test/mode_test.css: -------------------------------------------------------------------------------- 1 | .mt-output .mt-token { 2 | border: 1px solid #ddd; 3 | white-space: pre; 4 | font-family: "Consolas", monospace; 5 | text-align: center; 6 | } 7 | 8 | .mt-output .mt-style { 9 | font-size: x-small; 10 | } 11 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/test/phantom_driver.js: -------------------------------------------------------------------------------- 1 | var page = require('webpage').create(); 2 | 3 | page.open("http://localhost:3000/test/index.html", function (status) { 4 | if (status != "success") { 5 | console.log("page couldn't be loaded successfully"); 6 | phantom.exit(1); 7 | } 8 | waitFor(function () { 9 | return page.evaluate(function () { 10 | var output = document.getElementById('status'); 11 | if (!output) { return false; } 12 | return (/^(\d+ failures?|all passed)/i).test(output.innerText); 13 | }); 14 | }, function () { 15 | var failed = page.evaluate(function () { return window.failed; }); 16 | var output = page.evaluate(function () { 17 | return document.getElementById('status').innerText; 18 | }); 19 | console.log(output); 20 | phantom.exit(failed > 0 ? 1 : 0); 21 | }); 22 | }); 23 | 24 | function waitFor (test, cb) { 25 | if (test()) { 26 | cb(); 27 | } else { 28 | setTimeout(function () { waitFor(test, cb); }, 250); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/test/run.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var lint = require("./lint/lint"); 4 | 5 | lint.checkDir("mode"); 6 | lint.checkDir("lib"); 7 | 8 | var ok = lint.success(); 9 | 10 | var files = new (require('node-static').Server)('.'); 11 | 12 | var server = require('http').createServer(function (req, res) { 13 | req.addListener('end', function () { 14 | files.serve(req, res); 15 | }); 16 | }).addListener('error', function (err) { 17 | throw err; 18 | }).listen(3000, function () { 19 | var child_process = require('child_process'); 20 | child_process.exec("which phantomjs", function (err) { 21 | if (err) { 22 | console.error("PhantomJS is not installed. Download from http://phantomjs.org"); 23 | process.exit(1); 24 | } 25 | var cmd = 'phantomjs test/phantom_driver.js'; 26 | child_process.exec(cmd, function (err, stdout) { 27 | server.close(); 28 | console.log(stdout); 29 | process.exit(err || !ok ? 1 : 0); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} 2 | .cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} 3 | .cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} 4 | .cm-s-elegant span.cm-variable {color: black;} 5 | .cm-s-elegant span.cm-variable-2 {color: #b11;} 6 | .cm-s-elegant span.cm-qualifier {color: #555;} 7 | .cm-s-elegant span.cm-keyword {color: #730;} 8 | .cm-s-elegant span.cm-builtin {color: #30a;} 9 | .cm-s-elegant span.cm-error {background-color: #fdd;} 10 | .cm-s-elegant span.cm-link {color: #762;} 11 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/codemirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta {color: #555;} 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/barchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/barchart.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/circlepacking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/circlepacking.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/columnchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/columnchart.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/dendrogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/dendrogram.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/graph.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/linechart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/linechart.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/maps.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/parallelcoordinates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/parallelcoordinates.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/piechart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/piechart.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/radar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/radar.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/scatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/scatter.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/table.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/timeknots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/timeknots.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/admin/img/wordcloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/admin/img/wordcloud.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/css/basic.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #FFF; 3 | } 4 | 5 | h1{ 6 | font-size: 24px; 7 | } 8 | 9 | h1,h2,body { 10 | font-weight: normal; 11 | vertical-align: top; 12 | font-family: Helvetica Neue,Georgia, serif; 13 | padding: 0; 14 | margin: 0; 15 | display: inline; 16 | letter-spacing: -0.02em; 17 | } 18 | 19 | a, 20 | a:hover, 21 | a:visited { 22 | margin: 0; 23 | padding: 0; 24 | color: #000; 25 | } 26 | a:hover{ 27 | text-decoration: none; 28 | } 29 | 30 | 31 | table tr td { 32 | padding: 2px; 33 | border-color: gray; 34 | background-color: white; 35 | } 36 | td{ 37 | max-width:550px; 38 | word-wrap: break-word; 39 | } 40 | table{ 41 | width: 50%; 42 | } 43 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/css/person.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #FFF; 3 | } 4 | 5 | h1{ 6 | font-size: 45px; 7 | } 8 | 9 | h1,h2,body { 10 | font-weight: normal; 11 | vertical-align: top; 12 | font-family: Georgia, serif; 13 | } 14 | 15 | a, 16 | a:hover, 17 | a:visited { 18 | margin: 0; 19 | padding: 0; 20 | color: #000; 21 | } 22 | a:hover{ 23 | text-decoration: none; 24 | } 25 | 26 | 27 | table tr td { 28 | border-width: thin; 29 | padding: 2px; 30 | border-style: dotted; 31 | border-color: gray; 32 | background-color: white; 33 | } 34 | 35 | table{ 36 | width: 50%; 37 | margin-left:100px; 38 | margin-right:auto; 39 | } 40 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/img/lodspeakr_logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/img/lodspeakr_logotype.png -------------------------------------------------------------------------------- /doc/examples/originalComponents/static/img/wait.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/examples/originalComponents/static/img/wait.gif -------------------------------------------------------------------------------- /doc/examples/originalComponents/types/rdfs__Resource/queries/po.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?p ?o WHERE { 2 | { 3 | GRAPH ?g{ 4 | <{{uri}}> ?p ?o. 5 | } 6 | }UNION{ 7 | <{{uri}}> ?p ?o . 8 | } 9 | }LIMIT {{lodspk.maxResults}} 10 | -------------------------------------------------------------------------------- /doc/examples/originalComponents/types/rdfs__Resource/queries/sp.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?s ?p WHERE { 2 | { 3 | GRAPH ?g{ 4 | ?s ?p <{{uri}}> . 5 | } 6 | }UNION{ 7 | ?s ?p <{{uri}}> . 8 | } 9 | }LIMIT {{lodspk.maxResults}} 10 | -------------------------------------------------------------------------------- /doc/img/303redirection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/doc/img/303redirection.png -------------------------------------------------------------------------------- /lib/Haanga/Makefile: -------------------------------------------------------------------------------- 1 | all: build test 2 | 3 | build: 4 | #plex lib/Haanga/Compiler/Lexer.lex 5 | phplemon lib/Haanga/Compiler/Parser.y 6 | 7 | 8 | test: 9 | cd tests; ~/bin/php-5.2/bin/php /usr/bin/phpunit --colors --verbose TestSuite.php 10 | cd tests; php /usr/bin/phpunit --coverage-html coverage/ --colors --verbose TestSuite.php 11 | 12 | test-fast: 13 | cd tests; php /usr/bin/phpunit --stop-on-failure --colors --verbose TestSuite.php 14 | 15 | 16 | edit: 17 | vim lib/Haanga/Compiler/Parser.y lib/Haanga/Compiler/Tokenizer.php -O 18 | -------------------------------------------------------------------------------- /lib/Haanga/README: -------------------------------------------------------------------------------- 1 | This project was created* and sponsored by Menéame (http://meneame.net/) 2 | 3 | [*] http://twitter.com/gallir/status/16256084676 4 | -------------------------------------------------------------------------------- /lib/Haanga/contrib/dummy.php: -------------------------------------------------------------------------------- 1 | 7 | {% block 1 %} 8 | {% endblock 1 %} 9 | 10 |
11 |
12 | {% block 2 %} 13 | {% endblock 2 %} 14 |
15 |
16 | {% endblock body_content %} 17 | -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/layout_2_columns_narrow_right_column.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout_overrides.html' %} 2 | 3 | {% block yahooui %}id="doc3" class="yui-t4"{% endblock yahooui %} 4 | 5 | {% block body_content %} 6 |
7 |
8 | {% block 1 %} 9 | {% endblock 1 %} 10 |
11 |
12 |
13 | {% block 2 %} 14 | {% endblock 2 %} 15 |
16 | {% endblock body_content %} -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/layout_2_equal_columns.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout_overrides.html' %} 2 | 3 | {% block yahooui %}id="doc3"{% endblock yahooui %} 4 | 5 | {% block body_content %} 6 |
7 |
8 |
9 |
10 | {% block 1 %} 11 | {% endblock 1 %} 12 |
13 |
14 | {% block 2 %} 15 | {% endblock 2 %} 16 |
17 |
18 |
19 |
20 | {% endblock body_content %} 21 | -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/layout_3_columns_varying_width.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout_overrides.html' %} 2 | 3 | {% block yahooui %}id="doc3" class="yui-t2"{% endblock yahooui %} 4 | 5 | {% block body_content %} 6 |
7 |
8 |
9 |
10 | {% block 2 %} 11 | {% endblock 2 %} 12 |
13 |
14 |
15 | {% block 3 %} 16 | {% endblock 3 %} 17 |
18 |
19 |
20 |
21 | {% block 1 %} 22 | {% endblock 1 %} 23 |
24 | {% endblock body_content %} 25 | -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/layout_3_equal_columns.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout_overrides.html' %} 2 | 3 | {% block yahooui %}id="doc3"{% endblock yahooui %} 4 | 5 | {% block body_content %} 6 |
7 |
8 |
9 |
10 | {% block 1 %} 11 | {% endblock 1 %} 12 |
13 |
14 | {% block 2 %} 15 | {% endblock 2 %} 16 |
17 |
18 | {% block 3 %} 19 | {% endblock 3 %} 20 |
21 |
22 |
23 |
24 | {% endblock body_content %} 25 | -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/layout_overrides.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout_base.html' %} 2 | 3 | # This file should contain any override to the layout_base.html 4 | -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/shared/footer.html: -------------------------------------------------------------------------------- 1 | {% for file in files %} 2 | {{ file }} | 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/examples/django-yui-layout-templates/shared/header.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/lib/Haanga/examples/django-yui-layout-templates/shared/header.html -------------------------------------------------------------------------------- /lib/Haanga/examples/inheritance/page.html: -------------------------------------------------------------------------------- 1 | {% extends 'section.html' %} 2 | 3 | 4 | {% block title %}Userlist | {{ block.super }} -- {{title}}{% endblock %} 5 | 6 | {% block content %} 7 | {% spaceless %} 8 |

Userlist

9 |
    10 | {% for user in users %} 11 |
  • {{ user.username|escape }}
  • 12 | 13 | {% if user.username != 'foobar' %} 14 | haha 15 | {% endif %} 16 | 17 | {% endfor %} 18 |
19 | 20 | [{{ block.super }}] 21 | 22 | {% endspaceless %} 23 | {% endblock %} 24 | 25 | -------------------------------------------------------------------------------- /lib/Haanga/examples/inheritance/section.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.html' %} 2 | {% block title %} User Section | [{{ block.super }}] {% endblock %} 3 | 4 | {% block header %} 5 |

Section of a website

6 | {% endblock %} 7 | 8 | {% block content %} 9 | cesar 10 | {% endblock content %} 11 | 12 | {% block body %} 13 |

new Body

14 | {{ block.super }} 15 | {% endblock body %} 16 | -------------------------------------------------------------------------------- /lib/Haanga/examples/inheritance/shared/about.html: -------------------------------------------------------------------------------- 1 | included file -------------------------------------------------------------------------------- /lib/Haanga/examples/template_runtime.php: -------------------------------------------------------------------------------- 1 | {{foobar}}{{ foobar }} 7 | 8 | Este template será compilado a una función PHP ({{foo|default:foobar}}) 9 | 10 | 11 | EOT 12 | ); 13 | 14 | $fnc(array("foobar" => 'hola', 'foo' => '.I.'), FALSE /* print it */); 15 | $fnc(array("foobar" => 'chau'), FALSE /* print it */); 16 | -------------------------------------------------------------------------------- /lib/Haanga/examples/tmp/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/lib/Haanga/examples/tmp/.empty -------------------------------------------------------------------------------- /lib/Haanga/haanga-cli.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | Error("alert filter only needs one parameter"); 10 | } 11 | $x = $args[0]; 12 | $pre = ''; 14 | return hexec('html_entity_decode', 15 | hexec('preg_replace', '/$/', $post, 16 | hexec('preg_replace', '/^/', $pre, $x))); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Capfirst.php: -------------------------------------------------------------------------------- 1 | $item) { 15 | $field[$key] = $item[$sort_by]; 16 | } 17 | array_multisort($field, SORT_REGULAR, $array); 18 | return $array; 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Empty.php: -------------------------------------------------------------------------------- 1 | Error("Explode only needs two parameter"); 9 | } 10 | 11 | return hexec('explode', $args[1], $args[0]); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Hostname.php: -------------------------------------------------------------------------------- 1 | 1) { 8 | if (!Haanga_AST::is_str($args[1])) { 9 | $compiler->Error("pluralize: First parameter must be an string"); 10 | } 11 | $parts = explode(",", $args[1]['string']); 12 | $singular = ""; 13 | if (count($parts) == 1) { 14 | $plural = $parts[0]; 15 | } else { 16 | $singular = $parts[0]; 17 | $plural = $parts[1]; 18 | } 19 | } else { 20 | $singular = ""; 21 | $plural = "s"; 22 | } 23 | 24 | return hexpr_cond(hexpr($args[0], '<=', 1), $singular, $plural); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Pop.php: -------------------------------------------------------------------------------- 1 | Error("Pop only needs two parameter"); 9 | } 10 | 11 | return hexec('array_pop', $args[0]); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Reverse.php: -------------------------------------------------------------------------------- 1 | Error("Reverse only needs one parameter"); 9 | } 10 | 11 | return hexec('array_reverse', $args[0], TRUE); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Safe.php: -------------------------------------------------------------------------------- 1 | var_is_safe = TRUE; 8 | return current($args); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Slugify.php: -------------------------------------------------------------------------------- 1 | Error("slugify filter only needs one parameter"); 9 | } 10 | 11 | $arg = hexec('strtolower', $args[0]); 12 | $arg = hexec('str_replace'," ","-",$arg); 13 | $arg = hexec('preg_replace',"/[^\d\w-_]/",'',$arg); 14 | return $arg; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Stringformat.php: -------------------------------------------------------------------------------- 1 | Error("substr parameter must have one param"); 9 | } 10 | if (!isset($args[1]['string'])) { 11 | $cmp->Error("substr parameter must be a string"); 12 | } 13 | list($start, $end) = explode(",", $args[1]['string']); 14 | return hexec('substr', $args[0], (int)$start, (int)$end); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Title.php: -------------------------------------------------------------------------------- 1 | Error("title filter only needs one parameter"); 9 | } 10 | 11 | return hexec('ucwords', hexec('strtolower', $args[0])); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Trans.php: -------------------------------------------------------------------------------- 1 | var_is_safe = TRUE; 9 | return hexec('urldecode', $args[0]); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Filter/Urlencode.php: -------------------------------------------------------------------------------- 1 | var_is_safe = TRUE; 9 | return hexec('urlencode', $args[0]); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Tag/Buffer.php: -------------------------------------------------------------------------------- 1 | Error("buffer filter must have one parameter"); 11 | } 12 | 13 | /* get new code object */ 14 | $code = hcode(); 15 | /* redirect buffer to $args[1] */ 16 | $code->decl($args[1], $args[0]); 17 | /* telling to Haanga that we're handling the output */ 18 | $code->doesPrint = TRUE; 19 | 20 | /* $args[1] is already safe (it might have HTML) */ 21 | $cmp->set_safe($args[1]['var']); 22 | 23 | return $code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Tag/Currenttime.php: -------------------------------------------------------------------------------- 1 | Error("inline needs one argument"); 9 | } 10 | 11 | if ($redirected) { 12 | $cmp->Error("inline can't be redirected to one variable"); 13 | } 14 | 15 | if (!Haanga_AST::is_str($args[0])) { 16 | $cmp->Error("The argument to inline must be an string"); 17 | } 18 | $file = $args[0]['string']; 19 | 20 | if (class_exists('Haanga')) { 21 | $file = Haanga::GetTemplateDir().'/'.$file; 22 | } 23 | 24 | if (!is_file($file)) { 25 | $cmp->Error("{$file} is not a template"); 26 | } 27 | 28 | return $cmp->getOpCodes(file_get_contents($file), $file); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Tag/Lower.php: -------------------------------------------------------------------------------- 1 | set_safe($arg['var']); 12 | } 13 | } 14 | 15 | return hcode(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Tag/Trans.php: -------------------------------------------------------------------------------- 1 | 1) { 14 | $exec = hexec('sprintf', $exec); 15 | foreach ($args as $id => $arg) { 16 | if ($id !== 0) { 17 | $exec->param($arg); 18 | } 19 | } 20 | } 21 | 22 | 23 | if ($redirect) { 24 | $code->decl($redirect, $exec); 25 | } else { 26 | $cmp->do_print($code, $exec); 27 | } 28 | 29 | return $code; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Tag/Tryinclude.php: -------------------------------------------------------------------------------- 1 | Error("try_include can't be redirected to a variable"); 9 | } 10 | 11 | $code = hcode(); 12 | $exec = hexec('Haanga::Safe_Load', $args[0], hvar('vars'), TRUE, array()); 13 | 14 | $cmp->do_print($code, $exec); 15 | 16 | return $code; 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Haanga/lib/Haanga/Extension/Tag/Upper.php: -------------------------------------------------------------------------------- 1 | addTestSuite('templateTest'); 15 | $suite->addTestSuite('errorTest'); 16 | 17 | return $suite; 18 | } 19 | 20 | public static function Init() 21 | { 22 | $config = array( 23 | 'cache_dir' => 'tmp/', 24 | 'template_dir' => '.', 25 | 'debug' => TRUE, 26 | 'use_hash_filename' => FALSE, 27 | 'compiler' => array( 28 | 'allow_exec' => TRUE, 29 | 'global' => array('test_global', 'global1'), 30 | ) 31 | ); 32 | 33 | Haanga::Configure($config); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/autoescape.html: -------------------------------------------------------------------------------- 1 | <b>foo</b> 2 | <b>foo</b> 3 | { foo } 4 | 5 | foo 6 | 7 | <b>foo</b> 8 | 9 | 10 | <b>foo</b> 11 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/autoescape.php: -------------------------------------------------------------------------------- 1 | 'foo'); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/autoescape.tpl: -------------------------------------------------------------------------------- 1 | {{ variable }} 2 | {{ variable|escape }} 3 | { {{ variable|safe }} } 4 | {% autoescape off %} 5 | {{ variable }} 6 | {% autoescape on %} 7 | {{ variable }} 8 | {% endautoescape %} 9 | {% endautoescape %} 10 | {{ variable }} 11 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default Title 4 | 5 | 6 | 7 |

Menu

8 | 9 | 16 | 17 | Partial part 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/base.php: -------------------------------------------------------------------------------- 1 | array( 5 | array('url' => 'http://php.net/', 'name' => ''), 6 | array('url' => 'http://www.google.com/', 'name' => ''), 7 | ) 8 | ); 9 | 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/base.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% block title %}Default Title{% endblock %} 4 | 5 | 6 | 7 |

Menu

8 | {% block main.menu %} 9 | 14 | {% endblock %} 15 | {% block main['include-end'] %}{% include "assert_templates/partial.tpl" %}{% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bitwise.html: -------------------------------------------------------------------------------- 1 | 2 | Match 3 | 4 | 5 | Match 6 | 7 | 8 | Match 9 | 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bitwise.tpl: -------------------------------------------------------------------------------- 1 | {% if 15 & 7 == 7 %} 2 | Match 3 | {% endif %} 4 | {% if 13 & 2 == 0 %} 5 | Match 6 | {% endif %} 7 | {% if 15 | 8 == 15 %} 8 | Match 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bug_#14.html: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bug_#14.php: -------------------------------------------------------------------------------- 1 | array('endbar' => 5), 5 | ); 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bug_#14.tpl: -------------------------------------------------------------------------------- 1 | {{ endsomething.endbar }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bug_001.html: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bug_001.php: -------------------------------------------------------------------------------- 1 | 1); 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/bug_001.tpl: -------------------------------------------------------------------------------- 1 | {{ date_end }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/class_static.html: -------------------------------------------------------------------------------- 1 | haanga 2 | foo 3 | Foo 4 | 5 | something 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/class_static.tpl: -------------------------------------------------------------------------------- 1 | {{ Foo_Bar::Bar }} 2 | {{ Foo_Bar::Arr[0] }} 3 | {{ Foo_Bar::Arr['Bar'] }} 4 | {% exec Foo_Bar::something as foo %} 5 | {{ foo }} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/concat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | foobarbar 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/concat.tpl: -------------------------------------------------------------------------------- 1 | {% set bar = "bar" %} 2 | {% set foo = "foo" . "bar" . bar %} 3 | {{ foo }} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/concat1.html: -------------------------------------------------------------------------------- 1 | 2 | Match 3 | 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/concat1.tpl: -------------------------------------------------------------------------------- 1 | {% if "foo" . "bar" == "foobar" %} 2 | Match 3 | {% else %} 4 | Error 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/custom_tag.html.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/custom_tag.tpl: -------------------------------------------------------------------------------- 1 | {% current_time "Y" %} 2 | {% current_time "U" as foo %}{{ foo|date:"Y" }} 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/cycle.html: -------------------------------------------------------------------------------- 1 | 2 | uno 3 | 4 | dos 5 | 6 | tres 7 | 8 | uno 9 | 10 | dos 11 | 12 | tres 13 | 14 | ----------------------------------------------- 15 | 16 | uno 17 | dos 18 | tres 19 | uno 20 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/cycle.php: -------------------------------------------------------------------------------- 1 | array(1,2,3,4,5,6)); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/cycle.tpl: -------------------------------------------------------------------------------- 1 | {% for user in array %} 2 | {% cycle 'uno' 'dos' 'tres' %} 3 | {% endfor %} 4 | ----------------------------------------------- 5 | {% cycle 'uno' 'dos' 'tres' as foo %} 6 | {% cycle foo %} 7 | {% cycle foo %} 8 | {% cycle foo %} 9 | {% cycle foo %} 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/dummy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | testing dummy tag 4 | 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/dummy.tpl: -------------------------------------------------------------------------------- 1 | {% load "../contrib/dummy.php" %} 2 | {% dummy %} 3 | testing DUMMY TaG 4 | {% enddummy %} 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/empty_block.html: -------------------------------------------------------------------------------- 1 | bar 2 | 3 | 4 | this is inner1 5 | 6 | 7 | this is inner2 8 | 9 | 10 | foo 11 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/empty_block.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/empty_block_base.tpl"%} 2 | 3 | 4 | {% block outer %} 5 | {% block inner1 %} 6 | this is inner1 7 | {% endblock inner1 %} 8 | {% block inner2 %} 9 | this is inner2 10 | {% endblock inner2 %} 11 | {% endblock outer %} 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/empty_block_base.tpl: -------------------------------------------------------------------------------- 1 | bar 2 | {% block outer %}{% endblock %} 3 | foo 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/empty_loop.html: -------------------------------------------------------------------------------- 1 | 2 | Else 3 | 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/empty_loop.php: -------------------------------------------------------------------------------- 1 | array()); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/empty_loop.tpl: -------------------------------------------------------------------------------- 1 | {% for id,user in users %} 2 | {{ forloop.last }} 3 | {{ forloop.counter0 }} 4 | Inside loop 5 | {% empty %} 6 | Else 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/exec-inc.tpl: -------------------------------------------------------------------------------- 1 | {{ foo }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/exec.html.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/exec.tpl: -------------------------------------------------------------------------------- 1 | {% exec php_uname %} 2 | {% exec php_uname as foo %} 3 | {% include "assert_templates/exec-inc.tpl" %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/expr.html: -------------------------------------------------------------------------------- 1 | 2 | hola 3 | 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/expr.php: -------------------------------------------------------------------------------- 1 | array( 4 | 'status' => true, 5 | 'tiene_negativos' => true, 6 | 'nsfw' => false, 7 | ) 8 | ); 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/expr.tpl: -------------------------------------------------------------------------------- 1 | {% if self.status == 'published' AND self.tiene_negativos AND !self.nsfw %} 2 | hola 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/filter.html: -------------------------------------------------------------------------------- 1 | VALUE 2 | value 3 | vale 4 | 5 5 | DEFAULT VALUE 6 | 7 | HOLA QUE 8 | 9 | tal 10 | 11 | hllo world 12 | 13 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/filter.php: -------------------------------------------------------------------------------- 1 | 'value'); 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/filter.tpl: -------------------------------------------------------------------------------- 1 | {{ var|upper }} 2 | {{ var|upper|lower }} 3 | {{ var|cut:"u" }} 4 | {{ var|length }} 5 | {{ foobar|default:"default value"|upper}} 6 | {% upper %} 7 | hola que 8 | {% endupper %} 9 | {% lower %}TAL{% endlower %} 10 | {% filter upper|lower|cut:"e" %} 11 | hello world 12 | {% endfilter %} 13 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/first_of.html: -------------------------------------------------------------------------------- 1 | variable2's content 2 | default 3 | 5 4 | variable2's content 5 | default 6 | 5 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/first_of.php: -------------------------------------------------------------------------------- 1 | 'variable2\'s content'); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/first_of.tpl: -------------------------------------------------------------------------------- 1 | {% firstof xvar variable1 variable2 "default" %} 2 | {% firstof xvar variable1 variablex "default" %} 3 | {% firstof xvar variable1 variablex 5 %} 4 | {% firstof xvar,variable1,variable2,"default" %} 5 | {% firstof xvar,variable1,variablex,"default" %} 6 | {% firstof xvar,variable1,variablex,5 %} 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range.html: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | 4 | 2 5 | 6 | 3 7 | 8 | 4 9 | 10 | 5 11 | 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range.tpl: -------------------------------------------------------------------------------- 1 | {% for i in 1 .. 5 %} 2 | {{i}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range1.html: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | 4 | 3 5 | 6 | 5 7 | 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range1.tpl: -------------------------------------------------------------------------------- 1 | {% for i in 1 .. 5 step 2 %} 2 | {{i}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range2.html: -------------------------------------------------------------------------------- 1 | 2 | 5 3 | 4 | 3 5 | 6 | 1 7 | 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range2.tpl: -------------------------------------------------------------------------------- 1 | {% for i in 5 .. 1 step -2 %} 2 | {{i}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range3.html: -------------------------------------------------------------------------------- 1 | 2 | 5 3 | 4 | 3 5 | 6 | 1 7 | 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range3.tpl: -------------------------------------------------------------------------------- 1 | {% for i in 5 .. 1 step 2 %} 2 | {{i}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range4.html: -------------------------------------------------------------------------------- 1 | 2 | 5 3 | 4 | 3 5 | 6 | 1 7 | 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range4.php: -------------------------------------------------------------------------------- 1 | 5, 'max' => 1); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range4.tpl: -------------------------------------------------------------------------------- 1 | {% for i in min .. max step -2 %} 2 | {{i}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range5.html: -------------------------------------------------------------------------------- 1 | 2 | 5 3 | 4 | 3 5 | 6 | 1 7 | 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range5.php: -------------------------------------------------------------------------------- 1 | array('min' => 5, 'max' => 1)); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/for_range5.tpl: -------------------------------------------------------------------------------- 1 | {% for i in e.min .. e.max step -2 %} 2 | {{i}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/foreach_vars.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
foo 4 |
    5 | 6 |
  • 7 | 8 | one,
  • 9 | 10 | 11 |
  • 12 | 13 | two,
  • 14 | 15 | 16 |
  • 17 | 18 | tree
  • 19 | 20 | 21 |
22 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/foreach_vars.php: -------------------------------------------------------------------------------- 1 | array( 4 | array( 5 | 'cat' => array('categoria' => 'foo'), 6 | 'subCategories' => array( 7 | array('categoria' => 'one'), 8 | array('categoria' => 'two'), 9 | array('categoria' => 'tree'), 10 | ), 11 | ), 12 | ), 13 | ); 14 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/foreach_vars.tpl: -------------------------------------------------------------------------------- 1 |
2 | {% for category in categoriesArray %} 3 |
{{ category.cat.categoria }} 4 |
    5 | {% for secondaryCategory in category.subCategories %} 6 |
  • 7 | {% if forloop.last %} 8 | {{ secondaryCategory.categoria }}
  • 9 | {% else %} 10 | {{ secondaryCategory.categoria }}, 11 | {% endif %} 12 | {% endfor %} 13 |
14 |
15 | {% endfor %} 16 |
17 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/global.html: -------------------------------------------------------------------------------- 1 | 2 | string c xxx 3 | string c 4 | c 5 | c 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/global.php: -------------------------------------------------------------------------------- 1 | str = 'foo'; 4 | $data = array('index' => array('name' => $obj), 'indexstr' => 'foo'); 5 | $obj = new Stdclass; 6 | $obj->foo = array('bar' => 'c'); 7 | 8 | global $test_global, $global1; 9 | 10 | $test_global = array('b' => 'string'); 11 | $global1 = array('foo' => $obj); 12 | 13 | if (!is_callable('set_global_template')) { 14 | function set_global_template() 15 | { 16 | global $test_global, $global1; 17 | $global1['bar'] = new stdclass; 18 | $global1['bar']->xxx = new stdclass; 19 | $global1['bar']->xxx->yyyy = 'xxx'; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/global.tpl: -------------------------------------------------------------------------------- 1 | {% exec set_global_template %} 2 | {{ test_global.b }} {{global1.foo.foo.bar}} {{global1.bar.xxx.yyyy|default:"yyy"}} 3 | {{ test_global['b'] }} {{global1['foo']['foo']['bar']}} 4 | {{ global1['foo'][index.name.str]['bar'] }} 5 | {{ global1['foo'][indexstr]['bar'] }} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/if_else_simple.html: -------------------------------------------------------------------------------- 1 | True 2 | False 3 | True 4 | True 5 | False 6 | False 7 | True 8 | True 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/if_else_simple.php: -------------------------------------------------------------------------------- 1 | 'cesar'); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/if_else_simple.tpl: -------------------------------------------------------------------------------- 1 | {% if 1 == 2 || 1+2 == 3 %}True{% else %}False{% endif %} 2 | {% if var|upper == var %}True{% else %}False{% endif %} 3 | {% if 1 === 2 || 1+2 === 3 %}True{% else %}False{% endif %} 4 | {% if 1 !== 2 %}True{% else %}False{% endif %} 5 | {% if 1 > 2 %}True{% else %}False{% endif %} 6 | {% if 1 >= 2 %}True{% else %}False{% endif %} 7 | {% if 1 <= 2 %}True{% else %}False{% endif %} 8 | {% if 1 < 2 %}True{% else %}False{% endif %} 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/ifchanged.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Users with 22 years 4 | bar 5 | 6 | 7 | foo 8 | 9 | Users with 23 years 10 | older Bar 11 | 12 | 13 | older Foo 14 | 15 | 16 | 17 | Users with 22 years 18 | bar 19 | 20 | continue 21 | foo 22 | 23 | Users with 23 years 24 | older Bar 25 | 26 | continue 27 | older Foo 28 | 29 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/ifchanged.php: -------------------------------------------------------------------------------- 1 | array( 4 | array( 5 | 'name' => 'foo', 6 | 'age' => 22, 7 | 'foo' => 2, 8 | ), 9 | array( 10 | 'name' => 'older Foo', 11 | 'age' => 23, 12 | 'foo' => 2 13 | ), 14 | array( 15 | 'name' => 'older Bar', 16 | 'age' => 23, 17 | 'foo' => 2 18 | ), 19 | array( 20 | 'name' => 'bar', 21 | 'age' => 22, 22 | 'foo' => 1 23 | ), 24 | ), 25 | 'regroup_field' => 'age', 26 | ); 27 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/ifchanged.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort users regroup_field as sorted_users %} 2 | {% for user in sorted_users %} 3 | {% ifchanged %}Users with {{user['age'] }} years{% endifchanged %} 4 | {{ user['name'] }} 5 | {% endfor %} 6 | 7 | {% for user in sorted_users %} 8 | {% ifchanged user['age'] user['foo'] %}Users with {{user['age']}} years{% else %}continue{% endifchanged %} 9 | {{ user['name'] }} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/ifequals.html: -------------------------------------------------------------------------------- 1 | 2 | Non Equals 3 | 4 | 5 | Non Equals 6 | 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/ifequals.tpl: -------------------------------------------------------------------------------- 1 | {% ifequal 1 2 %} 2 | Equals 3 | {% else %} 4 | Non Equals 5 | {% endifequal %} 6 | {% ifnotequal 1 2 %} 7 | Non Equals 8 | {% else %} 9 | Equals 10 | {% endifnotequal %} 11 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/in.html: -------------------------------------------------------------------------------- 1 | 2 | Here 3 | 4 | 5 | Here 6 | 7 | 8 | Here 9 | 10 | 11 | Here 12 | 13 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/in.php: -------------------------------------------------------------------------------- 1 | array('cesar', 'd.', 'rodas'), 5 | 'search' => 'rodas', 6 | ); 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/in.tpl: -------------------------------------------------------------------------------- 1 | {% if "d." in "cesar d. rodas" %} 2 | Here 3 | {% endif %} 4 | {% if "d." in names %} 5 | Here 6 | {% endif %} 7 | {% if search in "cesar d. rodas" %} 8 | Here 9 | {% endif %} 10 | {% if search in names %} 11 | Here 12 | {% endif %} 13 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inheritence_nested_block.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | this is inner1 5 | 6 | 7 | this is inner2 8 | 9 | 10 | new stuff 11 | 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inheritence_nested_block.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/nested_block.tpl" %} 2 | 3 | {% block outer %} 4 | {{ block.super }} 5 | new stuff 6 | {% endblock outer %} 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inheritence_nested_block_duplicated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | this is inner1 5 | 6 | 7 | new inner2 8 | 9 | 10 | new stuff 11 | 12 | new inner2 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inheritence_nested_block_duplicated.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/nested_block.tpl" %} 2 | 3 | {% block outer %} 4 | {{ block.super }} 5 | new stuff 6 | {% block inner2 %} 7 | new inner2 8 | {% endblock inner2 %} 9 | {% endblock outer %} 10 | 11 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Foobar text 4 | Partial part 5 | 6 | 7 | 8 | another text 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inline.tpl: -------------------------------------------------------------------------------- 1 | {% buffer html %} 2 | Foobar text 3 | {% inline "assert_templates/partial.tpl" %} 4 | {% inline "assert_templates/inline_buffer.tpl" %} 5 | {% endbuffer %} 6 | {{ html }} 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/inline_buffer.tpl: -------------------------------------------------------------------------------- 1 | {% buffer html1 %} 2 | another text 3 | {% endbuffer %} 4 | {{ html1 }} 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/intval.html: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/intval.php: -------------------------------------------------------------------------------- 1 | new stdclass, 'foo' => array()); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/is_array.tpl: -------------------------------------------------------------------------------- 1 | {%if foo|isarray %} true {% endif %} 2 | {%if zfoo|isarray %} true {% endif %} 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/join.html: -------------------------------------------------------------------------------- 1 | one // two // three 2 | onetwothree 3 | three // two // one 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/join.php: -------------------------------------------------------------------------------- 1 | array("one", "two", "three")); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/join.tpl: -------------------------------------------------------------------------------- 1 | {{ array|join:" // " }} 2 | {{ array|join }} 3 | {{ array|reverse|join:" // " }} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/load.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | « Previous 5 | 6 | 7 | 8 | 1'; 9 | ... 10 | 11 | 12 | 13 | 14 | 8 15 | 16 | 17 | 18 | 9 19 | 20 | 21 | 22 | 10 23 | 24 | 25 | 26 | 11 27 | 28 | 29 | 30 | 12 31 | 32 | 33 | 34 | 35 | ... 36 | 50 37 | 38 | 39 | 40 | » Next 41 | 42 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/load.php: -------------------------------------------------------------------------------- 1 | « Previous 5 | {% else %} 6 | « Previous 7 | {% endif %} 8 | 9 | {% if mnm_start > 1 %} 10 | 1'; 11 | ... 12 | {% endif %} 13 | 14 | {% for page in mnm_pages %} 15 | {% if mnm_current == page %} 16 | {{page}} 17 | {% else %} 18 | {{page}} 19 | {% endif %} 20 | {% endfor %} 21 | 22 | {% if mnm_total > mnm_end %} 23 | ... 24 | {{ mnm_total }} 25 | {% endif %} 26 | 27 | {% if mnm_next %} 28 | » Next 29 | {% else %} 30 | » Next 31 | {% endif %} 32 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/locale/es_ES/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alangrafu/lodspeakr/e0ce117e7596702e361be9194adda881362e0fff/lib/Haanga/tests/assert_templates/locale/es_ES/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/locale/es_ES/LC_MESSAGES/messages.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2010-08-03 23:34-0400\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: 20 | msgid "hello" 21 | msgstr "hola" 22 | 23 | 24 | #: assert_templates/trans.tpl:1 assert_templates/trans.tpl:1 25 | msgid "Translation" 26 | msgstr "Traducción" 27 | 28 | #: assert_templates/trans.tpl:2 assert_templates/trans.tpl:2 29 | #, c-format 30 | msgid "Translation by %s" 31 | msgstr "Traducción por %s" 32 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/loop.html: -------------------------------------------------------------------------------- 1 | 2 | 3 3 | 4 | 2 5 | 6 | 1 7 | 8 | 0 9 | 10 | 11 | 12 | 4 13 | 14 | 3 15 | 16 | 2 17 | 18 | 1 19 | 20 | 21 | Last 4 22 | 23 | Last 3 24 | 25 | Last 3 26 | 27 | Last 3 28 | 29 | Last 3 30 | 31 | 32 | 33 | Last 3 34 | 35 | Last 3 36 | 37 | first 0 38 | 39 | first 0 40 | 41 | first 0 42 | 43 | first 0 44 | 45 | 46 | 47 | first 0 48 | 49 | first 0 50 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/loop.php: -------------------------------------------------------------------------------- 1 | range(1, 4), 5 | 'array_nested' => array( 6 | array(range(1,4), range(1, 2)), 7 | array(range(1,5), range(1,90)), 8 | array(range(2, 4), range(1, 1000)), 9 | array(range(1,4), range(1, 2)), 10 | ) 11 | ); 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/loop.tpl: -------------------------------------------------------------------------------- 1 | {% for i in array %} 2 | {{ forloop.revcounter0 }} 3 | {% endfor %} 4 | 5 | {% for i in array %} 6 | {{ forloop.revcounter }} 7 | {% endfor %} 8 | 9 | {% for i in array %}{% filter trim %} 10 | {% if forloop.last %} Last {{ i }}{% endif %} 11 | 12 | {% endfilter %}{% endfor %} 13 | 14 | {% for k,sub in array_nested %}{% filter trim %} 15 | 16 | {% for arr in sub %} 17 | {% for val in arr %} 18 | {% if forloop.parentloop.parentloop.last %} Last {{ k }}{% endif %} 19 | {% endfor %} 20 | {% endfor %} 21 | 22 | {% endfilter %}{% endfor %} 23 | 24 | {% for k,sub in array_nested %}{% filter trim %} 25 | 26 | {% for arr in sub %} 27 | {% for val in arr %} 28 | {% if forloop.parentloop.parentloop.first %} first {{ k }}{% endif %} 29 | {% endfor %} 30 | {% endfor %} 31 | 32 | {% endfilter %}{% endfor %} 33 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/loop_object.html: -------------------------------------------------------------------------------- 1 | 2 | foo bar 3 | 4 | nombre crodas 5 | 6 | 7 | 8 | bar 9 | 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/loop_object.php: -------------------------------------------------------------------------------- 1 | foo = 'bar'; 5 | $obj->nombre = 'crodas'; 6 | 7 | $objects = array($obj); 8 | 9 | $data = compact('obj', 'objects'); 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/loop_object.tpl: -------------------------------------------------------------------------------- 1 | {% for prop,value in obj %} 2 | {{ prop }} {{ value }} 3 | {% endfor %} 4 | 5 | {% for i in objects %} 6 | {{ i.foo }} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/method.html: -------------------------------------------------------------------------------- 1 | foo 2 | FOO 3 | bar 4 | BAR 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/method.php: -------------------------------------------------------------------------------- 1 | new Foo_Bar, 5 | ); 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/method.tpl: -------------------------------------------------------------------------------- 1 | {{ Object.method }} 2 | {{ Object.method|upper }} 3 | {{ Object.bar }} 4 | {{ Object.bar|upper }} 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/nested_block.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | this is inner1 4 | 5 | 6 | this is inner2 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/nested_block.tpl: -------------------------------------------------------------------------------- 1 | {% block outer %} 2 | {% block inner1 %} 3 | this is inner1 4 | {% endblock inner1 %} 5 | {% block inner2 %} 6 | this is inner2 7 | {% endblock inner2 %} 8 | {% endblock outer %} 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/nested_block_second_parent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | this is inner1 4 | 5 | 6 | inner2's new value 7 | 8 | 2.1 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/nested_block_second_parent.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/nested_block.tpl" %} 2 | 3 | {% block inner2 %} 4 | inner2's new value 5 | {% block inner2_1 %} 6 | 2.1 7 | {% endblock %} 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/nested_block_second_parent_override.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | this is inner1 4 | 5 | 6 | inner2's new value 7 | 8 | 2.1-overrided 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/nested_block_second_parent_override.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/nested_block_second_parent.tpl" %} 2 | 3 | {% block inner2_1 %} 4 | 2.1-overrided 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/null.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | foo is null 4 | 5 | 6 | 7 | bar is not null 8 | 9 | 10 | 11 | foobar is not null 12 | 13 | 14 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/null.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'foo' => NULL, 6 | 'bar' => false, 7 | 'foobar' => 0, 8 | )); 9 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/null.tpl: -------------------------------------------------------------------------------- 1 | {% for k,val in obj %} 2 | {% if val|null %} 3 | {{ k }} is null 4 | {% else %} 5 | {{ k }} is not null 6 | {% endif %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/object.html: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | foo 4 | bar 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/object.php: -------------------------------------------------------------------------------- 1 | name = 'foo'; 5 | $obj->obj['name'] = 'bar'; 6 | $arr['obj'] = $obj; 7 | $data = compact('obj', 'arr'); 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/object.tpl: -------------------------------------------------------------------------------- 1 | {{ obj->name }} 2 | {{ obj.obj.name }} 3 | {{ arr.obj->name }} 4 | {{ arr.obj->obj.name }} 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/partial.tpl: -------------------------------------------------------------------------------- 1 | Partial part 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/pluralize.html: -------------------------------------------------------------------------------- 1 | message 2 | walrus 3 | cherry 4 | messages 5 | walruses 6 | cherries 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/pluralize.php: -------------------------------------------------------------------------------- 1 | 1, 5 | 'num2' => 3, 6 | ); 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/pluralize.tpl: -------------------------------------------------------------------------------- 1 | message{{ num1|pluralize }} 2 | walrus{{ num1|pluralize:"es" }} 3 | cherr{{ num1|pluralize:"y,ies" }} 4 | message{{ num2|pluralize }} 5 | walrus{{ num2|pluralize:"es" }} 6 | cherr{{ num2|pluralize:"y,ies" }} 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/regroup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 22 10 | 11 | 1-3-2 (1). Middle (first) 12 | 13 | 2-2-1 (1). Bar () 14 | 15 | 3-1-0 (1). Foo (last) 16 | 17 | 18 | 23 19 | 20 | 1-2-1 (2). Older Bar (first) 21 | 22 | 2-1-0 (2). Older Foo (last) 23 | 24 | 25 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/regroup.php: -------------------------------------------------------------------------------- 1 | array( 4 | array( 5 | 'name' => 'foo', 6 | 'age' => 22, 7 | ), 8 | array( 9 | 'name' => 'Middle', 10 | 'age' => 22, 11 | ), 12 | array( 13 | 'name' => 'older Foo', 14 | 'age' => 23, 15 | ), 16 | array( 17 | 'name' => 'older Bar', 18 | 'age' => 23, 19 | ), 20 | array( 21 | 'name' => 'bar', 22 | 'age' => 22, 23 | ), 24 | ), 'regroup_by' => 'name'); 25 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/regroup.tpl: -------------------------------------------------------------------------------- 1 | {# Test regroup with filters, and without filters #} 2 | {% regroup users|dictsort:regroup_by by age as sorted_users %} 3 | {% dictsort users regroup_by as t_users %} 4 | {% regroup t_users by age as sorted_users1 %} 5 | 6 | {% if sorted_users != sorted_users1 %} 7 | Error 8 | {% endif %} 9 | 10 | {% for user in sorted_users %} 11 | {{user['grouper'] }} 12 | {% for u in user['list'] %} 13 | {{forloop.counter}}-{{forloop.revcounter}}-{{forloop.revcounter0}} ({{forloop.parentloop.counter}}). {{ u['name']|capfirst }} ({% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %}) 14 | {% endfor %} 15 | {% endfor %} 16 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/set.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 4 | testing 5 | 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/set.tpl: -------------------------------------------------------------------------------- 1 | {% set foo = 5+1 %} 2 | {% set bar = 'testing' %} 3 | {{ foo }} 4 | {% include "assert_templates/sub_set.tpl" %} 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/spaceless.html: -------------------------------------------------------------------------------- 1 |

Foo

2 | =========================== 3 |
4 |     Something cool
5 | 
6 |     
7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/spaceless.tpl: -------------------------------------------------------------------------------- 1 | {% spaceless %} 2 |

3 | Foo 4 |

{%endspaceless %} 5 | =========================== 6 | {% spaceless %} 7 | 8 |
 9 |     Something cool
10 | 
11 |     
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
{% endspaceless %} 21 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/strip_whitespace.html: -------------------------------------------------------------------------------- 1 | string string Texto laargo
2 | Este es un texto 
3 | 
4 | con
5 |         espacios
6 | 
7 | 
Another text 8 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/strip_whitespace.tpl: -------------------------------------------------------------------------------- 1 | {% if test_global %} 2 | {% for i in test_global %} 3 | {{ i }} {{ i }} 4 | {%endfor %} 5 | 6 | {% endif %} 7 | 8 | 9 | 10 | Texto laargo 11 | 12 | 13 | 14 | 15 | 16 | {% spacefull %}
17 | Este es un texto 
18 | 
19 | con
20 |         espacios
21 | 
22 | 
{% endspacefull %} 23 | 24 | 25 | Another 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | text 34 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/sub_set.tpl: -------------------------------------------------------------------------------- 1 | {{ bar }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/subtemplate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | My Title - Default Title 4 | 5 | 6 | 7 |

Menu

8 | 9 | 10 | 17 | 18 | 19 | :-) 20 | 21 | Partial part 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/subtemplate.php: -------------------------------------------------------------------------------- 1 | array( 5 | array('url' => 'http://php.net/', 'name' => ''), 6 | array('url' => 'http://www.google.com/', 'name' => ''), 7 | ) 8 | ); 9 | 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/subtemplate.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/base.tpl" %} 2 | 3 | {% block title %}My Title - {{ block.super }}{% endblock %} 4 | 5 | {% block main.menu %} 6 | {{ block.super}} 7 | 8 | :-) 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/templatetag.html: -------------------------------------------------------------------------------- 1 | {%foo%} 2 | {%foo%} 3 | {{foo}} 4 | {foo} 5 | {#foo#} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/templatetag.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag openblock %}foo{%templatetag closeblock %} 2 | {% templatetag "openblock" %}foo{%templatetag "closeblock" %} 3 | {% templatetag openvariable %}foo{%templatetag closevariable %} 4 | {% templatetag openbrace %}foo{%templatetag closebrace %} 5 | {% templatetag opencomment %}foo{%templatetag closecomment %} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/title.html: -------------------------------------------------------------------------------- 1 | Hello World 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/title.php: -------------------------------------------------------------------------------- 1 | 'HELLO wOrld'); 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/title.tpl: -------------------------------------------------------------------------------- 1 | {{ title|title }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/trans.html: -------------------------------------------------------------------------------- 1 | Traducción 2 | Traducción por cesar 3 | hola 4 | Hola 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/trans.php: -------------------------------------------------------------------------------- 1 | 'hello'); 3 | 4 | if (!is_callable('bindtextdomain')) { 5 | throw new Exception('no gettext enabled'); 6 | } 7 | 8 | $locale='es_ES.UTF-8'; 9 | putenv("LC_ALL=$locale"); 10 | setlocale(LC_ALL, $locale); 11 | 12 | bindtextdomain("messages", dirname(__FILE__)."/locale"); 13 | textdomain("messages"); 14 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/trans.tpl: -------------------------------------------------------------------------------- 1 | {% trans _("Translation") %} 2 | {% trans _("Translation by %s") "cesar" %} 3 | {{ text|trans }} 4 | {{ text|translation|capfirst }} 5 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/truncatewords.html: -------------------------------------------------------------------------------- 1 | Hello World<br/> 2 | Hello Haanga ... 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/truncatewords.php: -------------------------------------------------------------------------------- 1 | 'hello world
', 5 | 'text' => 'hello haanga world
' 6 | ); 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/truncatewords.tpl: -------------------------------------------------------------------------------- 1 | {{ short_text|truncatewords:2|title }} 2 | {{ text|truncatewords:2|title }} 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/try_include.html: -------------------------------------------------------------------------------- 1 | 2 | Partial part 3 | 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/try_include.tpl: -------------------------------------------------------------------------------- 1 | {% try_include "foobar-tpl.tpl" %} 2 | {% try_include "assert_templates/partial.tpl" %} 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/variable_existe.html: -------------------------------------------------------------------------------- 1 | No 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/variable_existe.tpl: -------------------------------------------------------------------------------- 1 | {% if var.exists|default:"" %} Yes {% else %} No {% endif %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/with.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | FOO == FOO 4 | 5 | 6 | 7 | OLDER FOO == OLDER FOO 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/with.php: -------------------------------------------------------------------------------- 1 | array( 4 | array( 5 | 'name' => 'foo', 6 | 'age' => 22, 7 | ), 8 | array( 9 | 'name' => 'older Foo', 10 | 'age' => 23, 11 | ), 12 | )); 13 | -------------------------------------------------------------------------------- /lib/Haanga/tests/assert_templates/with.tpl: -------------------------------------------------------------------------------- 1 | {% for user in users %} 2 | {% with user.name as name %} 3 | {{name|upper}} == {{user.name|upper}} 4 | {% endwith %} 5 | {% endfor %} 6 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/block.tpl: -------------------------------------------------------------------------------- 1 | {{ block.super }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/block_nonparent.tpl: -------------------------------------------------------------------------------- 1 | {% block parent %} 2 | {{ block.super }} 3 | {% endblock %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/block_super.tpl: -------------------------------------------------------------------------------- 1 | {{ block.super }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/block_super_filter.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/base.tpl" %} 2 | 3 | {% block menu %} 4 | {{block.super|upper}} 5 | {% endblock %} 6 | 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/block_super_nonsubtemplate.tpl: -------------------------------------------------------------------------------- 1 | {% block parent %} 2 | {{ block.super }} 3 | {% endblock %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/dictsort.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort foo "bar" %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/dictsort1.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort "foo" "bar" as bar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/dictsort2.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort foo bar foo as bar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_block.tpl: -------------------------------------------------------------------------------- 1 | {{ block.super }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_block_nonparent.tpl: -------------------------------------------------------------------------------- 1 | {% block parent %} 2 | {{ block.super }} 3 | {% endblock %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_block_super.tpl: -------------------------------------------------------------------------------- 1 | {{ block.super }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_block_super_filter.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/base.tpl" %} 2 | 3 | {% block menu %} 4 | {{block.super|upper}} 5 | {% endblock %} 6 | 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_block_super_nonsubtemplate.tpl: -------------------------------------------------------------------------------- 1 | {% block parent %} 2 | {{ block.super }} 3 | {% endblock %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_dictsort.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort foo "bar" %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_dictsort1.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort "foo" "bar" as bar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_dictsort2.tpl: -------------------------------------------------------------------------------- 1 | {% dictsort foo bar foo as bar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_forloop.tpl: -------------------------------------------------------------------------------- 1 | {# Invalid forloop reference (outside of an loop) #} 2 | {{ forloop.last }} 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_forloop1.tpl: -------------------------------------------------------------------------------- 1 | {% for i in array %} 2 | {{ forloop.foobar }} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_ifchanged.tpl: -------------------------------------------------------------------------------- 1 | {% ifchanged var1_ok "invalid" %} 2 | 3 | {% endifchanged %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_invalid_blockname.tpl: -------------------------------------------------------------------------------- 1 | {% block invalid[blockname] %} 2 | 3 | {% endblock %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_invalid_tryinclude.tpl: -------------------------------------------------------------------------------- 1 | {% try_include "foobar.tpl" as foo %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_load1.tpl: -------------------------------------------------------------------------------- 1 | {% load "foobar.html" %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_load2.tpl: -------------------------------------------------------------------------------- 1 | {% load "../tests.sh" %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_loop_varname.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/base.tpl" %} 2 | 3 | {% block foo %} 4 | {% for i in block.super %} 5 | {% endfor %} 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_pluralize.tpl: -------------------------------------------------------------------------------- 1 | {{ var|pluralize:bar}} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_reverse.tpl: -------------------------------------------------------------------------------- 1 | {{ foo|reverse:"bar"}} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_templatetag1.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag invalid.name %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_templatetag2.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag invalid args count %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_templatetag3.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag unknown_arg %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/err_title.tpl: -------------------------------------------------------------------------------- 1 | {{ foo|title:"another useless param"}} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/exec_notallowed.tpl: -------------------------------------------------------------------------------- 1 | {% exec date %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/forloop.tpl: -------------------------------------------------------------------------------- 1 | {# Invalid forloop reference (outside of an loop) #} 2 | {{ forloop.last }} 3 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/forloop1.tpl: -------------------------------------------------------------------------------- 1 | {% for i in array %} 2 | {{ forloop.foobar }} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/ifchanged.tpl: -------------------------------------------------------------------------------- 1 | {% ifchanged var1_ok "invalid" %} 2 | 3 | {% endifchanged %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/inline1.tpl: -------------------------------------------------------------------------------- 1 | {% inline "inexistent.tpl" %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/inline2.tpl: -------------------------------------------------------------------------------- 1 | {% inline "assert_templates/partial.tpl" as foobar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/inline3.tpl: -------------------------------------------------------------------------------- 1 | {% inline foobar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/inline4.tpl: -------------------------------------------------------------------------------- 1 | {% inline foo bar %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/inline5.tpl: -------------------------------------------------------------------------------- 1 | {% inline "assert_templates/subtemplate.tpl" %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/invalid_blockname.tpl: -------------------------------------------------------------------------------- 1 | {% block invalid[blockname] %} 2 | 3 | {% endblock %} 4 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/loop_varname.tpl: -------------------------------------------------------------------------------- 1 | {% extends "assert_templates/base.tpl" %} 2 | 3 | {% block foo %} 4 | {% for i in block.super %} 5 | {% endfor %} 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/pluralize.tpl: -------------------------------------------------------------------------------- 1 | {{ var|pluralize:bar}} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/reverse.tpl: -------------------------------------------------------------------------------- 1 | {{ foo|reverse:"bar"}} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/templatetag1.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag invalid.name %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/templatetag2.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag invalid args count %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/templatetag3.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag unknown_arg %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/title.tpl: -------------------------------------------------------------------------------- 1 | {{ foo|title:"another useless param"}} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/tokenizer_1.tpl: -------------------------------------------------------------------------------- 1 | {{ foobar 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/tokenizer_2.tpl: -------------------------------------------------------------------------------- 1 | {{ 9foo }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/tokenizer_3.tpl: -------------------------------------------------------------------------------- 1 | {{ 5.9.9 }} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/tokenizer_4.tpl: -------------------------------------------------------------------------------- 1 | {# comment and no end :P 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/err_templates/tokenizer_5.tpl: -------------------------------------------------------------------------------- 1 | {% if 5.9 + 5. == 10.9 %}True{% endif %} 2 | -------------------------------------------------------------------------------- /lib/Haanga/tests/errorTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(FALSE); 19 | } Catch (Haanga_Compiler_Exception $e) { 20 | $i = preg_match("/in.*:[0-9]+/", $e->getMessage()); 21 | $this->assertEquals(1, $i); 22 | } 23 | } 24 | 25 | public function tplProvider() 26 | { 27 | $datas = array(); 28 | foreach (glob("err_templates/*.tpl") as $err_file) { 29 | $datas[] = array($err_file); 30 | } 31 | 32 | return $datas; 33 | } 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/autoescape.tpl.php: -------------------------------------------------------------------------------- 1 | = 1; $i += -2) { 12 | echo ' 13 | '.$i.' 14 | '; 15 | } 16 | echo ' 17 | '; 18 | if ($return == TRUE) { 19 | return ob_get_clean(); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/for_range3.tpl.php: -------------------------------------------------------------------------------- 1 | = 1; $i += -2) { 12 | echo ' 13 | '.$i.' 14 | '; 15 | } 16 | echo ' 17 | '; 18 | if ($return == TRUE) { 19 | return ob_get_clean(); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/for_range4.tpl.php: -------------------------------------------------------------------------------- 1 | = $max; $i += -2) { 12 | echo ' 13 | '.$i.' 14 | '; 15 | } 16 | echo ' 17 | '; 18 | if ($return == TRUE) { 19 | return ob_get_clean(); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/for_range5.tpl.php: -------------------------------------------------------------------------------- 1 | = $e['max']; $i += -2) { 12 | echo ' 13 | '.$i.' 14 | '; 15 | } 16 | echo ' 17 | '; 18 | if ($return == TRUE) { 19 | return ob_get_clean(); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/global.tpl.php: -------------------------------------------------------------------------------- 1 | foo['bar']).' '.(empty($global1['bar']->xxx->yyyy) == TRUE ? 'yyy' : $global1['bar']->xxx->yyyy).' 13 | '.htmlspecialchars($test_global['b']).' '.htmlspecialchars($global1['foo']->foo['bar']).' 14 | '.htmlspecialchars($global1['foo']->{$index['name']->str}['bar']).' 15 | '.htmlspecialchars($global1['foo']->{$indexstr}['bar']).' 16 | '; 17 | if ($return == TRUE) { 18 | return ob_get_clean(); 19 | } 20 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/ifequals.tpl.php: -------------------------------------------------------------------------------- 1 | text 18 | '; 19 | $html1 = $buffer2; 20 | $buffer1 .= ' 21 | '.$html1.' 22 | 23 | '; 24 | $html = $buffer1; 25 | echo ' 26 | '.$html.' 27 | '; 28 | if ($return == TRUE) { 29 | return ob_get_clean(); 30 | } 31 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/intval.tpl.php: -------------------------------------------------------------------------------- 1 | $value) { 13 | echo ' 14 | '.htmlspecialchars($prop).' '.htmlspecialchars($value).' 15 | '; 16 | } 17 | echo ' 18 | 19 | '; 20 | foreach ($objects as $i) { 21 | echo ' 22 | '.htmlspecialchars($i->foo).' 23 | '; 24 | } 25 | echo ' 26 | '; 27 | if ($return == TRUE) { 28 | return ob_get_clean(); 29 | } 30 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/method.tpl.php: -------------------------------------------------------------------------------- 1 | method()).' 12 | '.htmlspecialchars(strtoupper($Object->method())).' 13 | '.htmlspecialchars($Object->bar).' 14 | '.htmlspecialchars(strtoupper($Object->bar)).' 15 | '; 16 | if ($return == TRUE) { 17 | return ob_get_clean(); 18 | } 19 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/nested_block_second_parent_override.tpl.php: -------------------------------------------------------------------------------- 1 | name).' 12 | '.htmlspecialchars($obj->obj['name']).' 13 | '.htmlspecialchars($arr['obj']->name).' 14 | '.htmlspecialchars($arr['obj']->obj['name']).' 15 | '; 16 | if ($return == TRUE) { 17 | return ob_get_clean(); 18 | } 19 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/partial.tpl.php: -------------------------------------------------------------------------------- 1 | 13 | Foo 14 |

'; 15 | echo preg_replace(Array('/>[ \\t\\r\\n]+[ \\t\\r\\n]+$/sU'), Array('><', '<', '>'), $buffer1).' 16 | =========================== 17 | '; 18 | $buffer1 = ' 19 | 20 |
21 |     Something cool
22 | 
23 |     
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
'; 33 | echo preg_replace(Array('/>[ \\t\\r\\n]+[ \\t\\r\\n]+$/sU'), Array('><', '<', '>'), $buffer1).' 34 | '; 35 | if ($return == TRUE) { 36 | return ob_get_clean(); 37 | } 38 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/strip_whitespace.tpl.php: -------------------------------------------------------------------------------- 1 | Texto laargo
19 | Este es un texto 
20 | 
21 | con
22 |         espacios
23 | 
24 | 
Another text '; 25 | if ($return == TRUE) { 26 | return ob_get_clean(); 27 | } 28 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/sub_set.tpl.php: -------------------------------------------------------------------------------- 1 | exists) == TRUE ? '' : $var->exists)) { 12 | echo ' Yes '; 13 | } else { 14 | echo ' No '; 15 | } 16 | echo ' 17 | '; 18 | if ($return == TRUE) { 19 | return ob_get_clean(); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/Haanga/tests/tmp/assert_templates/with.tpl.php: -------------------------------------------------------------------------------- 1 | 8 | * @homepage 9 | * @package ARC2 10 | * @version 2010-11-16 11 | */ 12 | 13 | ARC2::inc('RDFXMLSerializer'); 14 | 15 | class ARC2_RSS10Serializer extends ARC2_RDFXMLSerializer { 16 | 17 | function __construct($a, &$caller) { 18 | parent::__construct($a, $caller); 19 | } 20 | 21 | function __init() { 22 | parent::__init(); 23 | $this->content_header = 'application/rss+xml'; 24 | $this->default_ns = 'http://purl.org/rss/1.0/'; 25 | $this->type_nodes = true; 26 | } 27 | 28 | /* */ 29 | 30 | } 31 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreAtomLoader.php: -------------------------------------------------------------------------------- 1 | caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'], $t['o_datatype'], $t['o_lang']); 27 | $this->t_count++; 28 | } 29 | 30 | /* */ 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreCBJSONLoader.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://arc.semsol.org/license 7 | * @homepage 8 | * @package ARC2 9 | * @version 2010-11-16 10 | */ 11 | 12 | ARC2::inc('CBJSONParser'); 13 | 14 | class ARC2_StoreCBJSONLoader extends ARC2_CBJSONParser { 15 | 16 | function __construct($a, &$caller) { 17 | parent::__construct($a, $caller); 18 | } 19 | 20 | function __init() { 21 | parent::__init(); 22 | } 23 | 24 | /* */ 25 | 26 | function done() { 27 | $this->extractRDF(); 28 | } 29 | 30 | function addT($s, $p, $o, $s_type, $o_type, $o_dt = '', $o_lang = '') { 31 | $o = $this->toUTF8($o); 32 | $this->caller->addT($s, $p, $o, $s_type, $o_type, $o_dt, $o_lang); 33 | $this->t_count++; 34 | } 35 | 36 | /* */ 37 | 38 | } 39 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreDumpQueryHandler.php: -------------------------------------------------------------------------------- 1 | store = $this->caller; 22 | } 23 | 24 | /* */ 25 | 26 | function runQuery($infos, $keep_bnode_ids = 0) { 27 | $this->infos = $infos; 28 | $con = $this->store->getDBCon(); 29 | ARC2::inc('StoreDumper'); 30 | $d = new ARC2_StoreDumper($this->a, $this->store); 31 | $d->dumpSPOG(); 32 | return 1; 33 | } 34 | 35 | /* */ 36 | 37 | } 38 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreRDFXMLLoader.php: -------------------------------------------------------------------------------- 1 | caller->addT($s, $p, $o, $s_type, $o_type, $o_dt, $o_lang); 27 | $this->t_count++; 28 | } 29 | 30 | /* */ 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreRSSLoader.php: -------------------------------------------------------------------------------- 1 | caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'], $t['o_datatype'], $t['o_lang']); 27 | $this->t_count++; 28 | } 29 | 30 | /* */ 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreSGAJSONLoader.php: -------------------------------------------------------------------------------- 1 | extractRDF(); 27 | } 28 | 29 | function addT($s, $p, $o, $s_type, $o_type, $o_dt = '', $o_lang = '') { 30 | $this->caller->addT($s, $p, $o, $s_type, $o_type, $o_dt, $o_lang); 31 | $this->t_count++; 32 | } 33 | 34 | /* */ 35 | 36 | } 37 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreSemHTMLLoader.php: -------------------------------------------------------------------------------- 1 | extractRDF(); 27 | } 28 | 29 | function addT($t) { 30 | $this->caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'], $t['o_datatype'], $t['o_lang']); 31 | $this->t_count++; 32 | } 33 | 34 | /* */ 35 | 36 | } 37 | -------------------------------------------------------------------------------- /lib/arc2/store/ARC2_StoreTurtleLoader.php: -------------------------------------------------------------------------------- 1 | caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'], $t['o_datatype'], $t['o_lang']); 27 | $this->t_count++; 28 | } 29 | 30 | /* */ 31 | 32 | } 33 | -------------------------------------------------------------------------------- /root.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteRule ^$ lodspeakr/index.php [L] 3 | 4 | RewriteCond %{REQUEST_FILENAME} !-f 5 | RewriteCond %{REQUEST_FILENAME} !-d 6 | RewriteCond %{SCRIPT_FILENAME} !.*/index.php$ 7 | 8 | -------------------------------------------------------------------------------- /utils/create_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$1" = "" ]]; then 4 | echo Usage: $0 sqliteFile 5 | exit 1 6 | fi 7 | 8 | mkdir -p meta 9 | cd meta 10 | if [ ! -e $1 ]; then 11 | SQLITE3=`which sqlite3` 12 | if [ -z "$SQLITE3" ]; then 13 | echo "SQLlite3 is required to continue installation. Please add it to your \$PATH." 14 | exit 1 15 | fi 16 | $SQLITE3 $1 'CREATE TABLE document (uri varcharg(1000), doc varchar(1000), format varchar(50));' 17 | $SQLITE3 $1 'CREATE INDEX IF NOT EXISTS document_uri ON document(uri);' 18 | $SQLITE3 $1 'CREATE INDEX IF NOT EXISTS document_uri_format ON document(uri, format);' 19 | $SQLITE3 $1 'CREATE INDEX IF NOT EXISTS document_doc ON document(doc);' 20 | else 21 | echo "WARNING: SQLite database already exists." 22 | fi 23 | cd .. 24 | -------------------------------------------------------------------------------- /utils/defaults/service/html.template: -------------------------------------------------------------------------------- 1 | {%include "../../includes/header.inc"%} 2 |
3 |

Classes available

4 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /utils/defaults/service/queries/main.query: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT ?resource WHERE { 2 | { 3 | GRAPH ?g { 4 | ?x a ?resource . 5 | } 6 | }UNION{ 7 | ?x a ?resource . 8 | } 9 | }order by ?resource 10 | LIMIT {{lodspk.maxResults}} 11 | -------------------------------------------------------------------------------- /utils/defaults/type/queries/po.query: -------------------------------------------------------------------------------- 1 | SELECT ?p ?o WHERE { 2 | { 3 | GRAPH ?g{ 4 | <{{uri}}> ?p ?o. 5 | } 6 | }UNION{ 7 | <{{uri}}> ?p ?o . 8 | } 9 | }LIMIT {{lodspk.maxResults}} 10 | -------------------------------------------------------------------------------- /utils/defaults/type/queries/sp.query: -------------------------------------------------------------------------------- 1 | SELECT ?s ?p WHERE { 2 | { 3 | GRAPH ?g{ 4 | ?s ?p <{{uri}}> . 5 | } 6 | }UNION{ 7 | ?s ?p <{{uri}}> . 8 | } 9 | }LIMIT {{lodspk.maxResults}} 10 | -------------------------------------------------------------------------------- /utils/install-dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Installation script for LODSPeaKr (http://lodspeakr.org) 4 | # Author: Alvaro Graves (alvaro@graves.cl) 5 | # Modified by: Tim Lebo (lebot@rpi.edu) 6 | # 7 | # The URL: 8 | # http://lodspeakr.org/install 9 | # 303 redirects to this script. 10 | 11 | lodspeakr_dir="lodspeakr" 12 | lodspeakr_repository="git@github.com:alangrafu/lodspeakr.git" # NOTE: the rest of this file should be identical to file 'install' 13 | home=`basename $lodspeakr_repository | sed 's/.git//'` 14 | 15 | source ~/.bashrc 16 | GIT=`which git` 17 | 18 | if [ -z "$GIT" ]; then 19 | echo "git is required to continue installation. Please add git to your \$PATH." 20 | exit 1 21 | fi 22 | 23 | if [ ! -e "$home" ]; then 24 | $GIT clone $lodspeakr_repository 25 | cd $home 26 | ./install.sh $lodspeakr_dir 27 | else 28 | echo "There is already an existing directory called '$home'. Installation cancelled. Remove it first and try again." 29 | fi 30 | -------------------------------------------------------------------------------- /utils/modules/add-endpoint.php: -------------------------------------------------------------------------------- 1 | $v){ 13 | if(preg_match("/\?>/", $v) == 0){ 14 | if(preg_match("/[\"']endpoint[\"']/", $v) == 0 || 15 | preg_match("/[\"']".$prefix."[\"']/", $v) == 0){ 16 | array_push($newLines,$v); 17 | }else{ 18 | exit(123); 19 | } 20 | } 21 | } 22 | $newEndpoint = "\$conf['endpoint']['".$prefix."'] = '".$url."';"; 23 | array_push($newLines,$newEndpoint); 24 | array_push($newLines,"?>"); 25 | 26 | $c = implode("\n", $newLines); 27 | file_put_contents($s, $c); 28 | ?> 29 | -------------------------------------------------------------------------------- /utils/modules/add-namespace.php: -------------------------------------------------------------------------------- 1 | $v){ 13 | if(preg_match("/\?>/", $v) == 0){ 14 | if(preg_match("/[\"']ns[\"']/", $v) == 0 || 15 | preg_match("/[\"']".$prefix."[\"']/", $v) == 0){ 16 | array_push($newLines,$v); 17 | }else{ 18 | exit(123); 19 | } 20 | } 21 | } 22 | $newNS = "\$conf['ns']['".$prefix."'] = '".$url."';"; 23 | array_push($newLines,$newNS); 24 | array_push($newLines,"?>"); 25 | 26 | $c = implode("\n", $newLines); 27 | file_put_contents($s, $c); 28 | ?> 29 | -------------------------------------------------------------------------------- /utils/modules/add-variable.php: -------------------------------------------------------------------------------- 1 | $v){ 18 | if(preg_match("/\?>/", $v) == 0){ 19 | if(strstr($v, $varString) === FALSE){ 20 | array_push($newLines,$v); 21 | } 22 | } 23 | } 24 | $newLine = "\$".$varString." = '".$varValue."';"; 25 | array_push($newLines,$newLine); 26 | array_push($newLines,"?>"); 27 | 28 | $c = implode("\n", $newLines); 29 | file_put_contents($s, $c); 30 | ?> 31 | -------------------------------------------------------------------------------- /utils/modules/backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | cd $DIR 6 | BASE=`php getvar.php basedir` 7 | NAME=`echo $BASE |sed -e 's/^http:\/\///g' -e 's/\/$//g' -e 's/\//_/g'` 8 | cd $DIR/../.. 9 | BACKUPDIR=$HOME/lodspeakr_backup 10 | if [[ ! -d $BACKUPDIR ]]; then 11 | echo "WARNING: No $BACKUPDIR dir. Creating it." >&2 12 | mkdir $BACKUPDIR 13 | fi 14 | 15 | if [[ ! -d $BACKUPDIR ]]; then 16 | echo "ERROR: Couldn't create $BACKUPDIR. Operation aborted" >&2 17 | exit 1 18 | fi 19 | 20 | tmpFile=$NAME"-backup-"`date +%Y%m%d%H%M%S`.tar.gz 21 | 22 | tar -czf $tmpFile settings.inc.php components 23 | 24 | mv $tmpFile $BACKUPDIR/ 25 | echo "New backup $tmpFile created" 26 | 27 | -------------------------------------------------------------------------------- /utils/modules/cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | cacheDir=$DIR/../../cache 6 | metaDir=$DIR/../../meta 7 | if [[ $1 == "clear" ]]; then 8 | if [ -d "$cacheDir" ]; then 9 | rm -f $cacheDir/* 10 | if [[ $2 != "nometa" ]]; then 11 | sqlite3 $metaDir/db.sqlite 'delete from document' 12 | fi 13 | else 14 | echo "ERROR: Couldn't find cache directory" >&2 15 | exit 1 16 | fi 17 | else 18 | echo "ERROR: Invalid command" >&2 19 | exit 1 20 | fi 21 | -------------------------------------------------------------------------------- /utils/modules/change-password.php: -------------------------------------------------------------------------------- 1 | $v){ 12 | if(preg_match("/\?>/", $v) == 0){ 13 | if(preg_match("/[\"']admin[\"']/", $v) == 0 || 14 | preg_match("/[\"']pass[\"']/", $v) == 0){ 15 | 16 | array_push($newLines,$v); 17 | } 18 | } 19 | } 20 | $newLine = "\$conf['admin']['pass'] = '".$newPass."';"; 21 | array_push($newLines,$newLine); 22 | array_push($newLines,"?>"); 23 | 24 | $c = implode("\n", $newLines); 25 | file_put_contents($s, $c); 26 | echo "Password changed successfully!\n\n"; 27 | ?> 28 | -------------------------------------------------------------------------------- /utils/modules/create-service.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | initToken='services' 6 | cd $DIR 7 | 8 | serviceName=`echo $1 |sed 's/\//%2F/g'` 9 | #Check models 10 | mainDir=$DIR/../../components/$initToken/$serviceName/ 11 | 12 | if [ -e "$mainDir" ] 13 | then 14 | echo "ERROR: This service $serviceName already exists." >&2 15 | exit 1 16 | else 17 | mkdir -p $mainDir 18 | fi 19 | 20 | cp -rf ../defaults/service/* $mainDir/ 21 | 22 | echo $initToken.$serviceName created/modified successfully! >&2 23 | -------------------------------------------------------------------------------- /utils/modules/create-type.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | initToken='types' 6 | 7 | cd $DIR 8 | componentName=${1/\:/__} 9 | #Check models 10 | mainDir=$DIR/../../components/$initToken/$componentName/ 11 | 12 | if [ -e "$mainDir" ] 13 | then 14 | echo "ERROR: This type $componentName already exists." >&2 15 | exit 1 16 | else 17 | mkdir -p $mainDir 18 | fi 19 | 20 | cp -rf ../defaults/type/* $mainDir/ 21 | 22 | echo $componentName created successfully! >&2 23 | -------------------------------------------------------------------------------- /utils/modules/create-uri.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | initToken='uris' 6 | 7 | cd $DIR 8 | 9 | #Check models 10 | mainDir=$DIR/../../components/$initToken/$1 11 | 12 | if [ -e "$mainDir" ] 13 | then 14 | echo "ERROR: Component for this URI $1 already exists." >&2 15 | else 16 | mkdir -p $mainDir 17 | fi 18 | 19 | #Create file structure 20 | 21 | cp -rf ../defaults/type/* $mainDir/ 22 | 23 | echo $initToken.$1 created/modified successfully! >&2 24 | -------------------------------------------------------------------------------- /utils/modules/debug.php: -------------------------------------------------------------------------------- 1 | 'true', '1' => 'true', 'off' => 'false', '0' =>'false'); 7 | $antiarray = Array('on' => 'false', '1' => 'false', 'off' => 'true', '0' =>'true'); 8 | $option = $optionarray[$argv[1]];; 9 | $newC = preg_replace('/debug(.+)'.$antiarray[$argv[1]].'/', "debug'] = ".$option, $c); 10 | if(file_put_contents($s, $newC) === FALSE){ 11 | echo "An error ocurred"; 12 | exit(1); 13 | }else{ 14 | include_once($s); 15 | echo "Debug mode turned ".$option."\n"; 16 | if($option == 'true'){ 17 | echo "Visit ".$conf['basedir']."logs to see logs of the different requests\n"; 18 | } 19 | } 20 | ?> 21 | -------------------------------------------------------------------------------- /utils/modules/default.php: -------------------------------------------------------------------------------- 1 | 'true', '1' => 'true', 'off' => 'false', '0' =>'false'); 7 | $antiarray = Array('on' => 'false', '1' => 'false', 'off' => 'true', '0' =>'true'); 8 | $option = $optionarray[$argv[1]]; 9 | if($option == "" || $option == null){ 10 | echo "Option not recognized. Aborting\n"; 11 | exit(1); 12 | } 13 | if(preg_match('/disableComponents(.+)'.$optionarray[$argv[1]].'/', $c)){ 14 | echo "Default already turned ".$option."\n"; 15 | exit(0); 16 | } 17 | $newC = preg_replace('/disableComponents(.+)'.$antiarray[$argv[1]].'/', "disableComponents'] = ".$option, $c); 18 | if($newC == $c){ 19 | echo "WARNING: Variable 'disableComponents' does not exist. Adding it.\n"; 20 | $newC = preg_replace("/\?>/", "\n\$conf['disableComponents'] = ".$option.";\n?>", $c); 21 | } 22 | if(file_put_contents($s, $newC) === FALSE){ 23 | echo "An error ocurred"; 24 | exit(1); 25 | }else{ 26 | echo "Default mode turned ".$option."\n"; 27 | } 28 | ?> 29 | -------------------------------------------------------------------------------- /utils/modules/delete-service.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | initToken='services' 6 | 7 | serviceName=`echo $1 |sed 's/\//%2F/g'` 8 | 9 | 10 | #Check models 11 | mainDir=$DIR/../../components/$initToken/$serviceName 12 | 13 | if [ ! -e "$mainDir" ] 14 | then 15 | echo "ERROR: $initToken/ $serviceName doesn't exist in models. Operation aborted" >&2 16 | exit 1 17 | fi 18 | 19 | rm -rf $mainDir 20 | 21 | echo Service $serviceName deleted >&2 22 | -------------------------------------------------------------------------------- /utils/modules/delete-type.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | initToken='types' 6 | 7 | 8 | #Check models 9 | mainDir=$DIR/../../components/$initToken/$1 10 | 11 | if [ ! -e "$mainDir" ] 12 | then 13 | echo "ERROR: $initToken/$1 doesn't exist in models. Operation aborted" >&2 14 | exit 1 15 | fi 16 | 17 | #Delete file structure 18 | 19 | rm -rf $mainDir 20 | echo $initToken.$1 deleted successfully! >&2 21 | -------------------------------------------------------------------------------- /utils/modules/delete-uri.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | initToken='uris' 6 | 7 | 8 | #Check models 9 | mainDir=$DIR/../../components/$initToken/$1 10 | 11 | if [ ! -e "$mainDir" ] 12 | then 13 | echo "ERROR: $mainDir doesn't exist in models. Operation aborted" >&2 14 | exit 1 15 | fi 16 | 17 | rm -rf $mainDir 18 | 19 | echo Uri $1 deleted >&2 20 | -------------------------------------------------------------------------------- /utils/modules/getvar.php: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /utils/modules/list-components.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | components=( types services uris ) 5 | cd $DIR 6 | 7 | #Components dir 8 | mainDir=$DIR/../../components/ 9 | 10 | if [ ! -d "$mainDir" ] 11 | then 12 | echo "ERROR: Components' dir doesn't exist." >&2 13 | exit 1 14 | fi 15 | 16 | cd $mainDir 17 | 18 | for i in "${components[@]}" 19 | do 20 | LIST="$i\n" 21 | for j in `ls $i` 22 | do 23 | if [[ -d "$i/$j" ]] 24 | then 25 | NEWLINE=`echo -e "\n\t$j"` 26 | LIST=$LIST$NEWLINE"\n" 27 | fi 28 | done 29 | echo -e $LIST 30 | done 31 | 32 | -------------------------------------------------------------------------------- /utils/modules/list-endpoints.php: -------------------------------------------------------------------------------- 1 | $v){ 6 | echo "$k: $v\n"; 7 | } 8 | ?> 9 | -------------------------------------------------------------------------------- /utils/modules/list-modules.php: -------------------------------------------------------------------------------- 1 | $v){ 6 | echo "$k) $v\n"; 7 | } 8 | ?> 9 | -------------------------------------------------------------------------------- /utils/modules/list-namespaces.php: -------------------------------------------------------------------------------- 1 | $v){ 6 | echo "$k: $v\n"; 7 | } 8 | ?> 9 | -------------------------------------------------------------------------------- /utils/modules/remove-endpoint.php: -------------------------------------------------------------------------------- 1 | $v){ 12 | if(preg_match("/[\"']endpoint[\"']/", $v) == 0 || 13 | preg_match("/[\"']".$prefix."[\"']/", $v) == 0){ 14 | array_push($newLines,$v); 15 | } 16 | } 17 | 18 | $c = implode("\n", $newLines); 19 | file_put_contents($s, $c); 20 | ?> 21 | -------------------------------------------------------------------------------- /utils/modules/remove-namespace.php: -------------------------------------------------------------------------------- 1 | $v){ 12 | if(preg_match("/[\"']ns[\"']/", $v) == 0 || 13 | preg_match("/[\"']".$prefix."[\"']/", $v) == 0){ 14 | array_push($newLines,$v); 15 | } 16 | } 17 | 18 | $c = implode("\n", $newLines); 19 | file_put_contents($s, $c); 20 | ?> 21 | -------------------------------------------------------------------------------- /utils/modules/remove-variable.php: -------------------------------------------------------------------------------- 1 | $v){ 18 | if(strstr($v, $varString) === FALSE){ 19 | array_push($newLines,$v); 20 | } 21 | } 22 | 23 | $c = implode("\n", $newLines); 24 | file_put_contents($s, $c); 25 | ?> 26 | -------------------------------------------------------------------------------- /utils/modules/start-endpoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PIDFILE=/tmp/fusekiPid 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | 7 | if [ -f $PIDFILE ] 8 | then 9 | exit 1 10 | fi 11 | fusekiDir=$DIR/../../lib/fuseki 12 | cacheDir=$DIR/../../cache 13 | cd $fusekiDir 14 | 15 | ./fuseki-server --loc data --update /ds &> /dev/null & 16 | echo $! > $PIDFILE 17 | 18 | exit 19 | -------------------------------------------------------------------------------- /utils/modules/stop-endpoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PIDFILE=/tmp/fusekiPid 4 | kill `cat $PIDFILE` 5 | rm $PIDFILE 6 | -------------------------------------------------------------------------------- /utils/modules/test-endpoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PIDFILE=/tmp/fusekiPid 4 | PID=`cat $PIDFILE` 5 | kill -0 $PID 6 | 7 | -------------------------------------------------------------------------------- /utils/modules/update-lodspeakr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Check git 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | cd $DIR/../.. 6 | GIT=`which git` 7 | if [ -z $GIT ];then 8 | echo "No git found. Aborting" 9 | exit 1 10 | fi 11 | 12 | #Ask for backup 13 | answer_backup="" 14 | while [ "$answer_backup" != "y" -a "$answer_backup" != "n" ]; do 15 | echo -n "Do you want to create a backup of the current installation? [y/n]: " 16 | read -u 1 answer_backup 17 | done 18 | 19 | if [ "$answer_backup" = "y" ]; then 20 | echo "Performing backup" 21 | utils/lodspk.sh backup 22 | fi 23 | 24 | #Perform git pull 25 | echo Updating LODSPeaKr 26 | $GIT pull -q 27 | if [ "$?" != 0 ];then 28 | echo "Update couldn't finish properly. Stopping further actions" 29 | exit 0 30 | fi 31 | 32 | 33 | #Update GUI 34 | echo Updating GUI elements 35 | cp -rf doc/examples/originalComponents/static/admin/* components/static/admin/ 36 | -------------------------------------------------------------------------------- /utils/modules/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | FILE=README.md 5 | cd $DIR/../.. 6 | grep -E "^version" $FILE |head -1 |sed -e 's/version: //' 7 | --------------------------------------------------------------------------------