Advertisement
Andy73

AndyCode Dictionary App v.0.2

Apr 18th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.92 KB | None | 0 0
  1. --[[
  2. Dictionary app for AndyCode archiver
  3. WARNING: NOT DESIGNED FOR COMPUTERCRAFT
  4.  
  5. note:add those l00ps!
  6. note:check letter 'printability'
  7.  
  8. 17/1219
  9. ]]
  10. d=io.open("storage/sdcard0/DWorkspace/ACOS Archiver/dev/asd","w")
  11. d:write("")
  12. d:close()
  13. local function addCom(txt,tr)
  14. out=io.open("storage/sdcard0/DWorkspace/ACOS Archiver/dev/asd","a")
  15. out:write("r('"..txt.."','"..tr.."')\n")
  16. out:close()
  17. end
  18. local function addExt(tr,txt)
  19. out=io.open("storage/sdcard0/DWorkspace/ACOS Archiver/dev/asd","a")
  20. out:write("r('"..txt.."','"..tr.."')\n")
  21. out:close()
  22. end
  23.  
  24. local tOrigin={}
  25. local iorg=0
  26. for line in io.lines("storage/sdcard0/DWorkspace/ACOS Archiver/dev/org") do
  27. iorg=iorg+1
  28. table.insert(tOrigin,iorg,line)
  29. end
  30.  
  31. local tDictionaryA={
  32. "@",
  33. "#",
  34. "$",
  35. "*",
  36. "&",
  37. "/",
  38. "~",
  39. "|",
  40. "!",
  41. "•",
  42. "√",
  43. "π",
  44. "÷",
  45. "×",
  46. "£",
  47. "¢",
  48. "€",
  49. "°",
  50. "_",
  51. "™",
  52. "®",
  53. "©",
  54. "¶",
  55. "^", }
  56. local tDictionaryB={
  57. "á",
  58. "à",
  59. "â",
  60. "ä",
  61. "æ",
  62. "ã",
  63. "å",
  64. "ā",
  65. "ě",
  66. "é",
  67. "è",
  68. "ê",
  69. "ë",
  70. "ę",
  71. "ė",
  72. "ē",
  73. "ï",
  74. "î",
  75. "í",
  76. "ī",
  77. "ì",
  78. "į",
  79. "ò",
  80. "ô",
  81. "ö",
  82. "ó",
  83. "ō",
  84. "ø",
  85. "œ",
  86. "õ",
  87. "ů",
  88. "ú",
  89. "û",
  90. "ü",
  91. "ù",
  92. "ū",
  93. "ý",
  94. "ÿ",
  95.  
  96. "ř",
  97. "ť",
  98. "ź",
  99. "ž",
  100. "ż",
  101. "š",
  102. "ß",
  103. "ś",
  104. "ď",
  105. "ć",
  106. "č",
  107. "ç",
  108. "ń",
  109. "ň",
  110. "ñ",
  111. "`", }
  112. local function main()
  113. local b=0
  114. local count=0
  115. for a=1,#tDictionaryA do
  116. for index=1,#tDictionaryB do
  117. b=b+1
  118. if b>#tOrigin then break end
  119. count=count+1
  120. addCom(tostring(tOrigin[b]),tostring(tDictionaryA[a])..tostring(tDictionaryB[index]))
  121. end
  122. end
  123. b=0
  124. for a=1,#tDictionaryA do
  125. for index=1,#tDictionaryB do
  126. b=b+1
  127. if b>#tOrigin then break end
  128. addExt(tostring(tOrigin[b]),tostring(tDictionaryA[a])..tostring(tDictionaryB[index]))
  129. end
  130. end
  131. print(count)
  132. end
  133. --[[
  134. "",
  135. "",
  136. "",
  137. "",
  138.  
  139. ]]
  140. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement