fix: relese regen
All checks were successful
gitea-sync/antosdk-apps/pipeline/head This commit looks good

This commit is contained in:
Dany LE 2023-06-07 15:04:55 +02:00
parent d70391c7ba
commit 4c86a315dd
90 changed files with 122 additions and 468 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 12: support send mail via SSL
* Patch 11: Add TFIDF analyse functionality
* Patch 10: Migrate code to typescript, use SQLiteDB lib for database access
* Patch 9: Update to use the new MDE library

View File

@ -1,37 +1,65 @@
local data = ...
-- load the smtp support
local smtp = require("socket.smtp")
local from = string.format("<%s@iohub.dev>", data.user);
local mesgt = {
headers = {
from = string.format("Dany <%s@iohub.dev>", data.user),
to = "",
subject = data.title
},
body = data.content
}
-- Michal Kottman, 2011, public domain
local socket = require 'socket'
local smtp = require 'socket.smtp'
local ssl = require 'ssl'
local https = require 'ssl.https'
local ltn12 = require 'ltn12'
function sslCreate()
local sock = socket.tcp()
return setmetatable({
connect = function(_, host, port)
local r, e = sock:connect(host, port)
if not r then return r, e end
sock = ssl.wrap(sock, {mode='client', protocol='tlsv1_2'})
return sock:dohandshake()
end
}, {
__index = function(t,n)
return function(_, ...)
return sock[n](sock, ...)
end
end
})
end
function sendMail(user, password, to,subject, body)
local msg = {
headers = {
from = string.format("%s <%s@iohub.dev>", user, user),
to = string.format("%s <%s>",to.text, to.email),
subject = subject
},
body = body
}
local ok, err = smtp.send {
from = string.format('<%s@iohub.dev>', user),
rcpt = string.format('<%s>', to.email),
source = smtp.message(msg),
user = string.format('%s@iohub.dev', user),
password = password,
server = 'iohub.dev',
port = 465,
create = sslCreate
}
if not ok then
return false, error
else
return true
end
end
local error_msg = {}
local iserror = false
for k,v in pairs(data.to) do
LOG_DEBUG("Send email to:"..v.email)
local rcpt = string.format("<%s>",v.email)
mesgt.headers.to = string.format("%s <%s>",v.text, v.email)
local r, e = smtp.send{
from = from,
rcpt = rcpt,
server = "iohub.dev",
domain = "iohub.dev",
user = data.user,
password = data.password,
source = smtp.message(mesgt)
}
local r = os.execute(cmd)
local r,e = sendMail(data.user, data.password, v, data.title, data.content)
if not r then
iserror = true
table.insert(error_msg, v.email)

View File

@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 12: support send mail via SSL
* Patch 11: Add TFIDF analyse functionality
* Patch 10: Migrate code to typescript, use SQLiteDB lib for database access
* Patch 9: Update to use the new MDE library

View File

@ -1,37 +1,65 @@
local data = ...
-- load the smtp support
local smtp = require("socket.smtp")
local from = string.format("<%s@iohub.dev>", data.user);
local mesgt = {
headers = {
from = string.format("Dany <%s@iohub.dev>", data.user),
to = "",
subject = data.title
},
body = data.content
}
-- Michal Kottman, 2011, public domain
local socket = require 'socket'
local smtp = require 'socket.smtp'
local ssl = require 'ssl'
local https = require 'ssl.https'
local ltn12 = require 'ltn12'
function sslCreate()
local sock = socket.tcp()
return setmetatable({
connect = function(_, host, port)
local r, e = sock:connect(host, port)
if not r then return r, e end
sock = ssl.wrap(sock, {mode='client', protocol='tlsv1_2'})
return sock:dohandshake()
end
}, {
__index = function(t,n)
return function(_, ...)
return sock[n](sock, ...)
end
end
})
end
function sendMail(user, password, to,subject, body)
local msg = {
headers = {
from = string.format("%s <%s@iohub.dev>", user, user),
to = string.format("%s <%s>",to.text, to.email),
subject = subject
},
body = body
}
local ok, err = smtp.send {
from = string.format('<%s@iohub.dev>', user),
rcpt = string.format('<%s>', to.email),
source = smtp.message(msg),
user = string.format('%s@iohub.dev', user),
password = password,
server = 'iohub.dev',
port = 465,
create = sslCreate
}
if not ok then
return false, error
else
return true
end
end
local error_msg = {}
local iserror = false
for k,v in pairs(data.to) do
LOG_DEBUG("Send email to:"..v.email)
local rcpt = string.format("<%s>",v.email)
mesgt.headers.to = string.format("%s <%s>",v.text, v.email)
local r, e = smtp.send{
from = from,
rcpt = rcpt,
server = "iohub.dev",
domain = "iohub.dev",
user = data.user,
password = data.password,
source = smtp.message(mesgt)
}
local r = os.execute(cmd)
local r,e = sendMail(data.user, data.password, v, data.title, data.content)
if not r then
iserror = true
table.insert(error_msg, v.email)

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version": "0.2.11-a",
"version": "0.2.12-a",
"category": "Internet",
"iconclass": "fa fa-book",
"dependencies": [

Binary file not shown.

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version": "0.2.11-a",
"version": "0.2.12-a",
"category": "Internet",
"iconclass": "fa fa-book",
"dependencies": [

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,16 @@
{
"targets" : {
"Build single package" :{
"jobs": [
{
"name": "batch",
"data": {
"target": "release",
"modules": ["About"]
}
}
]
},
"Build all" :{
"jobs": [
{

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 12: support send mail via SSL
* Patch 11: Add TFIDF analyse functionality
* Patch 10: Migrate code to typescript, use SQLiteDB lib for database access
* Patch 9: Update to use the new MDE library

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.