Install/upgrade support for flat-file translators and styles

Files are copied from translators.zip and styles.zip (or, for SVN installs, 'translators' and (for now) 'csl' directories) in the installation directory to 'translators' and 'styles' directories in the data directory. A build_zip file is provided for testing translators.zip (which will take precedence over a 'translators' directory) but isn't required.

The timestamp stored in repotime.txt is stored in the database and is sent to the server for updates since that time.

Updating a file in [install-dir]/translators or [install-dir]/styles automatically copies all files in that directory to the data directory.
This commit is contained in:
Dan Stillman 2008-09-12 22:09:54 +00:00
parent ee9aff0a0f
commit 86678aba27
8 changed files with 448 additions and 183 deletions

View file

@ -1,4 +1,4 @@
-- 40
-- 41
-- This file creates tables containing user-specific data -- any changes made
-- here must be mirrored in transition steps in schema.js::_migrateSchema()
@ -211,29 +211,6 @@ CREATE TABLE storageDeleteLog (
);
CREATE INDEX storageDeleteLog_timestamp ON storageDeleteLog(timestamp);
CREATE TABLE translators (
translatorID TEXT PRIMARY KEY,
minVersion TEXT,
maxVersion TEXT,
lastUpdated DATETIME,
inRepository INT,
priority INT,
translatorType INT,
label TEXT,
creator TEXT,
target TEXT,
detectCode TEXT,
code TEXT
);
CREATE INDEX translators_type ON translators(translatorType);
CREATE TABLE csl (
cslID TEXT PRIMARY KEY,
updated DATETIME,
title TEXT,
csl TEXT
);
CREATE TABLE annotations (
annotationID INTEGER PRIMARY KEY,
itemID INT,