Zontroy Repeating File (zref)

This file type is used to generate separate code files with lines of code in them. Our code files use the same extension which is zref for different languages, but before zref extension we should also use the original file extension as below:

Syntax

[file_name].[file_extension].zref

Example 1
Assume that we use a database with tables : TableA, TableB, TableC, …, TableZ

Input

// My[[[table.name]]].java.zref
public class My[[[table.name]]] {

}

Output

// MyTableA.java
public class MyTableA {

}

// MyTableB.java
public class MyTableB {

}

// MyTableC.java
public class MyTableC {

}

// MyTableZ.java
public class MyTableZ {

}

Input

// My[[[table.name]]].cs.zref
public class My[[[table.name]]] {

}

Output

// MyTableA.cs
public class MyTableA {

}

// MyTableB.cs
public class MyTableB {

}

// MyTableC.cs
public class MyTableC {

}

// MyTableZ.cs
public class MyTableZ {

}

Input

# My[[[table.name]]].py.zref
class My[[[table.name]]]:

Output

# MyTableA.py
class MyTableA:

# MyTableB.py
class MyTableB:

# MyTableC.py
class MyTableC:

# MyTableZ.py
class MyTableZ:

Example 2

Assume that we use a database with tables : Table1, Table2, Table3, …, Table100 and each table has an id column and name column that has a name ending with its number.

Input

// Your[[[table.name]]]Class.java.zref
public class Your[[[table.name]]]Class {
// Columns :
for(((item:table.columns))){{{
// [[[item.name]]]
}}}
}

Output

// YourTable1Class.java
public class YourTable1Class {
// Columns :
// Id
// Name1
}

// YourTable2Class.java
public class YourTable2Class {
// Columns :
// Id
// Name2
}

// YourTable3Class.java
public class YourTable3Class {
// Columns :
// Id
// Name3
}

// YourTable100Class.java
public class YourTable100Class {
// Columns :
// Id
// Name100
}

Input

// Your[[[table.name]]]Class.cs.zref
public class Your[[[table.name]]]Class {
// Columns :
for(((item:table.columns))){{{
// [[[item.name]]]
}}}
}

Output

// YourTable1Class.cs
public class YourTable1Class {
// Columns :
// Id
// Name1
}

// YourTable2Class.cs
public class YourTable2Class {
// Columns :
// Id
// Name2
}

// YourTable3Class.cs
public class YourTable3Class {
// Columns :
// Id
// Name3
}

// YourTable100Class.cs
public class YourTable100Class {
// Columns :
// Id
// Name100
}

Input

# Your[[[table.name]]]Class.py.zref
class Your[[[table.name]]]Class:
# Columns :
for(((item:table.columns))){{{
# [[[item.name]]]
}}}

Output

# YourTable1Class.py
class YourTable1Class:
# Columns :
# Id
# Name1

# YourTable2Class.py
class YourTable2Class:
# Columns :
# Id
# Name2

# YourTable3Class.py
class YourTable3Class:
# Columns :
# Id
# Name3

# YourTable100Class.py
class YourTable100Class:
# Columns :
# Id
# Name100