This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CalcMonthly() { | |
let database = SpreadsheetApp.getActive(); | |
let sfTable = database.getSheetByName("SketchFabTable"); | |
var sfMonthly = database.getSheetByName("Dashboard"); | |
sfMonthly.clear(); | |
sfMonthly.appendRow(["Month", "Earnings", "Number of Sales"]); | |
var count = sfTable.getLastRow(); | |
var currMonth = -1; | |
var currYear = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
#function to fix the new CSV format coming from TurboSquid in order work with the old statistics application: https://www.turbosquid.com/FullPreview/Index.cfm/ID/1002949 | |
#by Denys Almaral (https://twitter.com/denysalmaral) | |
def fixCSV(fileName): | |
newLines=[] | |
newLines.append('\n') | |
newLines.append('"Sales Monthly Details"\n') | |
newLines.append('"Filter: Year,Month,"\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Dirty trick to detect if Corona SDK or Love ;) | |
-- first time we require this module it will be inialized with the current detected SDK | |
if display~=nil then | |
-- maybe is corona sdk | |
if display.newImage~=nil then | |
-- pretty sure it is | |
print "Running: Corona SDK" | |
api = require('code.coronaapi') | |
end | |
elseif love~=nil then |