Skip to content

Commit 1047056

Browse files
committed
added artifact for html.dat
1 parent db06448 commit 1047056

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

Artifacts.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[htmlnames]
2+
git-tree-sha1 = "813db2bcdc4c5c4cc1cdbd6583e6c6bd7eaca024"

Project.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ keywords = ["Entities", "HTML"]
44
license = "MIT"
55
desc = "Entities from HTML data tables"
66
authors = ["ScottPJones <[email protected]>"]
7-
version = "1.0.2"
7+
version = "1.0.3"
88

99
[deps]
10+
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
1011
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
1112
StrTables = "9700d1a9-a7c8-5760-9816-a99fda30bb8f"
1213

1314
[compat]
15+
Artifacts = "1"
1416
RelocatableFolders = "1"
1517
StrTables = "1"
16-
julia = "1"
18+
julia = "1.6"
1719

1820
[extras]
1921
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

deps/build.jl

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
println("Running HTML entity build in ", pwd())
66

7+
using Artifacts
8+
using Base.Filesystem
79
using StrTables
810

911
VER = UInt32(1)
@@ -99,3 +101,13 @@ else
99101
println(sprint(showerror, ex, catch_backtrace()))
100102
end
101103
end
104+
105+
if isfile(savfile)
106+
artifact_toml = joinpath(@__DIR__, "..", "Artifacts.toml")
107+
hash = artifact_hash("htmlnames", artifact_toml)
108+
path = artifact_path(hash)
109+
isdir(path) || mkpath(path)
110+
cp(savfile, joinpath(path, basename(savfile)), force=true)
111+
112+
println("Artifact had created at ", path)
113+
end

src/HTML_Entities.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __precompile__()
99
"""
1010
module HTML_Entities
1111
using StrTables, RelocatableFolders
12+
using Artifacts
1213

1314
VER = UInt32(1)
1415

@@ -28,7 +29,7 @@ struct HTML_Table{T} <: AbstractEntityTable
2829
ind2c::Vector{UInt16}
2930
end
3031

31-
const DATA_PATH = @path joinpath(@__DIR__, "../data", "html.dat")
32+
const DATA_PATH = @path joinpath(artifact"htmlnames", "html.dat")
3233

3334
function __init__()
3435
global default = HTML_Table(StrTables.load(DATA_PATH)...)

0 commit comments

Comments
 (0)