Skip to content
Snippets Groups Projects
Commit 6f9d4b93 authored by Andrew Maclean's avatar Andrew Maclean
Browse files

Renaming trame to Trame to make it more consistent

parent c70f68b9
No related branches found
No related tags found
1 merge request!252Add structure for trame examples
Showing
with 30 additions and 26 deletions
......@@ -599,7 +599,7 @@ def fill_qt_cmake_lists(cmake_contents, example_name, vtk_modules, web_repo_url)
def fill_trame_instructions(trame_contents, relative_path, web_repo_url):
"""
Fill in the template parameters for the trame template file.
Fill in the template parameters for the Trame template file.
:param trame_contents: The template file.
:param relative_path: The relative path to the tarfile.
......@@ -1305,7 +1305,7 @@ def get_statistics(stats):
"""
totals = list()
for k, v in stats.items():
if k in ['cxx_count', 'cs_count', 'py_count', 'java_count', 'trame count']:
if k in ['cxx_count', 'cs_count', 'py_count', 'java_count', 'trame_count']:
totals.append(v)
res = list()
res.append('ScrapeRepo Summary')
......@@ -1314,10 +1314,10 @@ def get_statistics(stats):
res.append(' CSharp examples: ' + str(stats['cs_count']))
res.append(' Python examples: ' + str(stats['py_count']))
res.append(' Java examples: ' + str(stats['java_count']))
res.append(' trame examples: ' + str(stats['trame_count']))
res.append(' Trame examples: ' + str(stats['trame_count']))
res.append(' Total examples: ' + str(sum(totals)))
res.append(' Tarballs C++: ' + str(stats['cxx_tar_count']))
res.append(' Tarballs trame: ' + str(stats['trame_tar_count']))
res.append(' Tarballs Trame: ' + str(stats['trame_tar_count']))
res.append(' Doxygen added: ' + str(stats['doxy_count']))
res.append(' Thumbnails added: ' + str(stats['thumb_count']))
res.append(' Test Image Cache hits: ' + str(stats['test_image_hits']))
......@@ -1383,7 +1383,7 @@ def main():
ref_stat1 = os.stat(src_path / 'Admin/VTKQtCMakeLists')
ref_stat2 = os.stat(src_path / 'Admin/VTKCMakeLists')
ref_stat3 = os.stat(src_path / 'Admin/trame_template')
ref_stat3 = os.stat(src_path / 'Admin/Trame_template')
ref_mtime = ref_stat1.st_mtime
if ref_stat2.st_mtime > ref_stat1.st_mtime:
ref_mtime = ref_stat2.st_mtime
......@@ -1525,19 +1525,19 @@ def main():
folder_paths = dict()
# The structure is:
# {t: v, ...}
# t = example type e.g trame
# t = example type e.g Trame
# v = a list of dictionaries containing the paths,
# the first element is always the path to the
# language page e.g. trame.md.
# language page e.g. Trame.md.
# A list is used because it may be that there is an example
# of the same name in a different topic (not recommended)
extract_paths(web_repo_dir, src_path, folder_paths, 'trame')
copy_images(web_repo_dir, folder_paths, 'trame')
insert_thumbnails_and_links(web_repo_url, web_repo_path, folder_paths, 'trame', vtk_classes, stats)
make_md_example_page(folder_paths, 'trame', src_path, doc_path, repo_name, web_repo_url, vtk_classes, stats)
extract_paths(web_repo_dir, src_path, folder_paths, 'Trame')
copy_images(web_repo_dir, folder_paths, 'Trame')
insert_thumbnails_and_links(web_repo_url, web_repo_path, folder_paths, 'Trame', vtk_classes, stats)
make_md_example_page(folder_paths, 'Trame', src_path, doc_path, repo_name, web_repo_url, vtk_classes, stats)
# Create tarballs for each example
make_tarballs(folder_paths, 'trame', ref_mtime, stats)
make_tarballs(folder_paths, 'Trame', ref_mtime, stats)
make_cxx_tarballs(web_repo_dir, example_paths, example_to_cmake, ref_mtime, stats)
# Update the test image cache file if necessary
......
File moved
......@@ -26,6 +26,7 @@ The major elements of the tree are:
| |-- ScrapeRepo.py # script to create docs/ in the web site folder
| |-- VTKCMakeLists # template for Cxx examples
| |-- VTKQtCMakeLists # template for Cxx Qt
| |-- Trame_template # template for Trame
|-- Artifacts # Additional images, docs, etc.
|-- Images # Images used in creating the static web pages.
|-- Instructions # Documentation
......@@ -55,12 +56,15 @@ This repository is separate from the vtk examples source files. It contains the
|-- Cache # Stores cache files used by ScrapeRepo.py.
|-- Coverage # Stores VTK classes used and classes used by language.
|-- Images # Images used in creating the static web pages.
|-- Trame # Additional files specific to this topic.
|-- VTKBook # Additional files specific to this topic.
|-- VTKFileFormats # Additional files specific to this topic.
|-- Testing
| |-- Baseline # Baselines for examples
| | |-- LANGUAGE
| | | |-- TOPIC
| |-- Data # Data for examples
|-- Tarballs # Tar files for each Cxx example
|-- Tarballs # Tar files for each Cxx and Trame example
```
## Look and Feel
......
......@@ -2,7 +2,7 @@
The success of the VTK Examples depends on the contributions from the VTK user community. If you wish to contribute to this valuable resource, please follow these guidelines. If you are a VTK Example User, [go here](../ForUsers) or an Example Administrator [go here](../ForAdministrators).
**C++, C#, Python, Java** and **trame** examples are welcome! Examples should illustrate a single concept.
**C++, C#, Python, Java** and **Trame** examples are welcome! Examples should illustrate a single concept.
## Follow the Coding Guidelines
......@@ -92,7 +92,7 @@ The examples are organized by topic.
* For **C++, Python Java, C#**, current topics include Animation,
DataStructures, Filters, GeometricObjects, Image, Meshes etc.
* For **trame**, current topics include Advanced, Applications, MiniApps etc.
* For **Trame**, current topics include Advanced, Applications, MiniApps etc.
### Write the source
......@@ -106,7 +106,7 @@ DataStructures, Filters, GeometricObjects, Image, Meshes etc.
Where **LANGUAGE** is Cxx, Python, CSharp or Java and **TOPIC** is the topic that you have chosen.
* trame examples are a single folder and these are saved in __REPO_NAME__/src/trame/**TOPIC**/
* Trame examples are a single folder and these are saved in __REPO_NAME__/src/Trame/**TOPIC**/
### C++
......@@ -149,9 +149,9 @@ Keep the same directory structure as that in Cxx.
* [WriteImage](../../Python/Snippets/WriteImage/) for Python
* [WriteImage](../../Java/Snippets/WriteImage/) for Java
### trame
### Trame
Create a folder called **MyNewExample** in **vtk-examples/**src**/**trame**/**TOPIC**/**MyNewExample**
Create a folder called **MyNewExample** in **vtk-examples/**src**/**Trame**/**TOPIC**/**MyNewExample**
If you have an image, either jpg or png, it must be named ****MyNewExample.jpg** or **MyNewExample.png**. If both images exist the jpg one will be used.
......@@ -164,14 +164,14 @@ If you want a description it must be named **MyNewExample.md** with the first tw
Use [markdown](https://guides.github.com/features/mastering-markdown/) to format the description. Also look at existing files for layout ideas.
Then add your trame file(s) to the folder.
Then add your Trame file(s) to the folder.
!!! note
All Python files will be picked up and rendered on the web page. A tarball will be automatically generated and a link for downloading will be provided.
## Add the example to the language page
Depending on the language of your example, edit the file *Cxx.md*, *Python.md*, *CSharp.md*, *Java.md* or *trame.md*.
Depending on the language of your example, edit the file *Cxx.md*, *Python.md*, *CSharp.md*, *Java.md* or *Trame.md*.
Find the section for your topic and add a line for your new example. The format of the line is:
......@@ -179,7 +179,7 @@ Find the section for your topic and add a line for your new example. The format
[MyNewExample](LANG/TOPIC/MyNewExample) | short description
```
where **LANG** is one of Cxx, Python, CSharp, Java or trame.
where **LANG** is one of Cxx, Python, CSharp, Java or Trame.
If an image exists, it will be automatically picked up.
......
# trame Examples
# Trame Examples
[trame](https://kitware.github.io/trame/docs/index.html) is a web framework that weaves together open source components into customized visual analytics easily. it uses VTK and ParaView platforms at its core, **trame** provides complete control of 3D visualizations and data movements.
......@@ -16,15 +16,15 @@ If you are new to **trame** then this [tutorial](https://kitware.github.io/trame
| Example Name | Description | Image |
| -------------- | ------------- | ------- |
[FiniteElementAnalysis](/trame/Applications/FiniteElementAnalysis) | Finite element analysis.
[Multi Filter](/trame/Applications/MultiFilter) | A multi filter example using VTK.
[RemoteSelection](/trame/Applications/RemoteSelection) | How to select a data file remotely.
[FiniteElementAnalysis](/Trame/Applications/FiniteElementAnalysis) | Finite element analysis.
[Multi Filter](/Trame/Applications/MultiFilter) | A multi filter example using VTK.
[RemoteSelection](/Trame/Applications/RemoteSelection) | How to select a data file remotely.
### MiniApps
| Example Name | Description | Image |
| -------------- | ------------- | ------- |
[SimpleCone](/trame/MiniApps/SimpleCone) | Demonstrate basic usage of trame with VTK.
[SimpleCone](/Trame/MiniApps/SimpleCone) | Demonstrate basic usage of trame with VTK.
### Advanced
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment