Skip to content
Snippets Groups Projects
Commit 210ab2fe authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] Rename plantuml generation file

parent 0c93e571
No related branches found
No related tags found
1 merge request!3WIP: RFC 3 : GraphQL API for Duniter Client
@startuml
class BlockNumberAndHash {
number: Int!
hash: String!
}
class Block {
version: Int!
type: String!
currency: String!
issuer: String!
number: Int!
powMin: Int!
time: String!
mediantime: String!
membersCount: Int!
monetaryMass: Int!
unitBase: Int!
issuersCount: Int!
issuersFrame: Int!
issuersFrameVar: Int!
parameters: String
previousHash: String
dividend: Int
identities: [Identity!]!
joiners: [Membership!]!
actives: [Membership!]!
leavers: [Membership!]!
revoked: [CompactRevocation!]!
excluded: [String!]!
certifications: [CompactCertification!]!
transactions: [Transaction!]!
innerHash: String!
nonce: String!
signature: String!
hash: String!
raw: String!
}
class Transaction {
version: Int!
type: String!
currency: String!
issuers: [String!]!
blockNumberAndHash: BlockNumberAndHash!
locktime: Int!
inputs: [CoinSource!]!
unlocks: [TxUnlock!]!
outputs: [TxOuput!]!
comment: String!
signatures: [String!]!
hash: String!
raw: String!
written_on: BlockNumberAndHash
}
Block --> Transaction
@enduml
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="738px" preserveAspectRatio="none" style="width:471px;height:738px;" version="1.1" viewBox="0 0 471 738" width="471px" zoomAndPan="magnify"><defs><filter height="300%" id="fazfupi8xi3y6" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--MD5=[16c9258650544c9cdb2e9eaca0c8f7b8]
class BlockNumberAndHash--><rect fill="#FEFECE" filter="url(#fazfupi8xi3y6)" height="73.6094" id="BlockNumberAndHash" style="stroke: #A80036; stroke-width: 1.5;" width="170" x="6" y="187"/><ellipse cx="21" cy="203" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M23.9688,208.6406 Q23.3906,208.9375 22.75,209.0859 Q22.1094,209.2344 21.4063,209.2344 Q18.9063,209.2344 17.5859,207.5859 Q16.2656,205.9375 16.2656,202.8125 Q16.2656,199.6875 17.5859,198.0313 Q18.9063,196.375 21.4063,196.375 Q22.1094,196.375 22.7578,196.5313 Q23.4063,196.6875 23.9688,196.9844 L23.9688,199.7031 Q23.3438,199.125 22.75,198.8516 Q22.1563,198.5781 21.5313,198.5781 Q20.1875,198.5781 19.5,199.6484 Q18.8125,200.7188 18.8125,202.8125 Q18.8125,204.9063 19.5,205.9766 Q20.1875,207.0469 21.5313,207.0469 Q22.1563,207.0469 22.75,206.7734 Q23.3438,206.5 23.9688,205.9219 L23.9688,208.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="138" x="35" y="207.1543">BlockNumberAndHash</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="175" y1="219" y2="219"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="69" x="12" y="233.2104">number: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="12" y="246.0151">hash: String!</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="175" y1="252.6094" y2="252.6094"/><!--MD5=[68a0c021ad4fbab63794e91c3c368f48]
class Block--><rect fill="#FEFECE" filter="url(#fazfupi8xi3y6)" height="432.1406" id="Block" style="stroke: #A80036; stroke-width: 1.5;" width="225" x="211.5" y="8"/><ellipse cx="303.25" cy="24" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M306.2188,29.6406 Q305.6406,29.9375 305,30.0859 Q304.3594,30.2344 303.6563,30.2344 Q301.1563,30.2344 299.8359,28.5859 Q298.5156,26.9375 298.5156,23.8125 Q298.5156,20.6875 299.8359,19.0313 Q301.1563,17.375 303.6563,17.375 Q304.3594,17.375 305.0078,17.5313 Q305.6563,17.6875 306.2188,17.9844 L306.2188,20.7031 Q305.5938,20.125 305,19.8516 Q304.4063,19.5781 303.7813,19.5781 Q302.4375,19.5781 301.75,20.6484 Q301.0625,21.7188 301.0625,23.8125 Q301.0625,25.9063 301.75,26.9766 Q302.4375,28.0469 303.7813,28.0469 Q304.4063,28.0469 305,27.7734 Q305.5938,27.5 306.2188,26.9219 L306.2188,29.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="33" x="323.75" y="28.1543">Block</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="212.5" x2="435.5" y1="40" y2="40"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="217.5" y="54.2104">version: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="69" x="217.5" y="67.0151">type: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="94" x="217.5" y="79.8198">currency: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="81" x="217.5" y="92.6245">issuer: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="69" x="217.5" y="105.4292">number: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="217.5" y="118.2339">powMin: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="70" x="217.5" y="131.0386">time: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="112" x="217.5" y="143.8433">mediantime: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="113" x="217.5" y="156.6479">membersCount: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="109" x="217.5" y="169.4526">monetaryMass: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="75" x="217.5" y="182.2573">unitBase: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="217.5" y="195.062">issuersCount: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="104" x="217.5" y="207.8667">issuersFrame: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="123" x="217.5" y="220.6714">issuersFrameVar: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="109" x="217.5" y="233.4761">parameters: String</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="120" x="217.5" y="246.2808">previousHash: String</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="69" x="217.5" y="259.0854">dividend: Int</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="217.5" y="271.8901">identities: [Identity!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="131" x="217.5" y="284.6948">joiners: [Membership!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="132" x="217.5" y="297.4995">actives: [Membership!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="134" x="217.5" y="310.3042">leavers: [Membership!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="178" x="217.5" y="323.1089">revoked: [CompactRevocation!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="106" x="217.5" y="335.9136">excluded: [String!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="213" x="217.5" y="348.7183">certifications: [CompactCertification!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="160" x="217.5" y="361.5229">transactions: [Transaction!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="103" x="217.5" y="374.3276">innerHash: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="79" x="217.5" y="387.1323">nonce: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="99" x="217.5" y="399.937">signature: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="217.5" y="412.7417">hash: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="66" x="217.5" y="425.5464">raw: String!</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="212.5" x2="435.5" y1="432.1406" y2="432.1406"/><!--MD5=[4555bb1b0911a5adf28ce6dbe60fed2e]
class Transaction--><rect fill="#FEFECE" filter="url(#fazfupi8xi3y6)" height="227.2656" id="Transaction" style="stroke: #A80036; stroke-width: 1.5;" width="272" x="188" y="500"/><ellipse cx="282.75" cy="516" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M285.7188,521.6406 Q285.1406,521.9375 284.5,522.0859 Q283.8594,522.2344 283.1563,522.2344 Q280.6563,522.2344 279.3359,520.5859 Q278.0156,518.9375 278.0156,515.8125 Q278.0156,512.6875 279.3359,511.0313 Q280.6563,509.375 283.1563,509.375 Q283.8594,509.375 284.5078,509.5313 Q285.1563,509.6875 285.7188,509.9844 L285.7188,512.7031 Q285.0938,512.125 284.5,511.8516 Q283.9063,511.5781 283.2813,511.5781 Q281.9375,511.5781 281.25,512.6484 Q280.5625,513.7188 280.5625,515.8125 Q280.5625,517.9063 281.25,518.9766 Q281.9375,520.0469 283.2813,520.0469 Q283.9063,520.0469 284.5,519.7734 Q285.0938,519.5 285.7188,518.9219 L285.7188,521.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="74" x="303.25" y="520.1543">Transaction</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="189" x2="459" y1="532" y2="532"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="194" y="546.2104">version: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="69" x="194" y="559.0151">type: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="94" x="194" y="571.8198">currency: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="99" x="194" y="584.6245">issuers: [String!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="260" x="194" y="597.4292">blockNumberAndHash: BlockNumberAndHash!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="72" x="194" y="610.2339">locktime: Int!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="122" x="194" y="623.0386">inputs: [CoinSource!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="194" y="635.8433">unlocks: [TxUnlock!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="112" x="194" y="648.6479">outputs: [TxOuput!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="98" x="194" y="661.4526">comment: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="117" x="194" y="674.2573">signatures: [String!]!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="194" y="687.062">hash: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="66" x="194" y="699.8667">raw: String!</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="192" x="194" y="712.6714">written_on: BlockNumberAndHash</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="189" x2="459" y1="719.2656" y2="719.2656"/><!--MD5=[b056b54640e8d43cd87144fcc6474095]
link Block to Transaction--><path d="M324,440.1076 C324,458.696 324,477.0217 324,494.3963 " fill="none" id="Block-&gt;Transaction" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="324,499.7571,328,490.7571,324,494.7571,320,490.7571,324,499.7571" style="stroke: #A80036; stroke-width: 1.0;"/></g></svg>
\ No newline at end of file
#!/bin/bash
PROJECT_DIR=`pwd`
JAR_DIR="${PROJECT_DIR}/.local"
JAR_VERSION="1.2019.12"
JAR_FILE="${JAR_DIR}/plantuml-${JAR_VERSION}.jar"
JAR_URL="https://repo1.maven.org/maven2/net/sourceforge/plantuml/plantuml/${JAR_VERSION}/plantuml-${JAR_VERSION}.jar"
# Make sure jar exists
checkJarExists() {
# Download the jar if need
if [[ ! -f "${JAR_FILE}" ]]; then
echo "Downloading PlantUML jar file: ${JAR_URL}..."
mkdir -p $JAR_DIR
wget -O $JAR_FILE ${JAR_URL}
if [[ $? -ne 0 ]]; then
echo "ERROR - Missing PlantUML JAR file at: $JAR_FILE"
echo " Please download it manually: ${JAR_URL}"
echo " and save it into the directory: ${JAR_DIR}"
exit 1
fi
fi;
}
generateSvg() {
echo Converting all PlatUML files from `pwd` into SVG...
java -jar ${JAR_FILE} -tsvg "./**.puml" -charset UTF-8 -progress -duration -nometadata
echo "Done"
}
generatePng() {
echo Converting all PlatUML files from `pwd` into PNG...
java -jar ${JAR_FILE} -tpng "./**.puml" -charset UTF-8 -progress -duration -nometadata
echo "Done"
}
case "$1" in
svg)
checkJarExists
generateSvg
exit 0
;;
png)
checkJarExists
generatePng
exit 0
;;
version)
java -jar ${JAR_FILE} -version
exit 0
;;
help)
echo "Usage: $0 {svg|png|version|help}"
exit 0
;;
*)
$0 help
exit 0
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment