File: README

package info (click to toggle)
nutsqlite 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 752 kB
  • sloc: sh: 5,631; makefile: 2
file content (75 lines) | stat: -rw-r--r-- 4,183 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<PRE>
NUT nutrition software
Copyright (C) 1996-2018 by Jim Jozwiak.

   NUT is nutrition software to record what you eat and analyze your meals for
   nutrient composition.  Besides the usual features of nutrition software, NUT
   includes a novel automatic portion control feature that allows you to plan
   nutritious meals when experimenting with different calorie levels, different
   levels of protein, carbohydate, and fat, and different food exclusions.  NUT
   also offers a well-organized presentation of the nutrients that can help you
   learn human nutrition by simply playing with the software.

   NUTsqlite-2.x offers better performance with a newly structured SQLite 
   database that features fully normalized relational tables.  In addition,
   the database itself is functional even without the graphical user interface,
   so it can be used on any device that presents a shell and has sqlite3
   installed.

INSTALLATION of NUTsqlite

1) Determine if you have Tcl available.  If not, check www.activestate.com for
   free (community) versions of Tcl available for desktop operating systems.

2) Download and unzip the full ascii version of the USDA Nutrient Database in
   the same directory where you unzipped the NUTsqlite files "nut.tcl" and
   "updateNUT.tcl".  The NUT homepage at http://nut.sourceforge.net will have
   the USDA zipfile you need or you can get it from the USDA.  The procedure
   will be the same when the USDA releases a new database and you want to
   upgrade your NUTsqlite database while preserving your personal data.
   On the Mac, unzipping a zip file with multiple files in it results in a
   separate directory, so you need to move all these files to the single 
   directory you are going to use.

3) Run "./updateNUT.tcl" to create or upgrade the NUT code in the SQLite
   database that runs the application.  If upgrading, you have to be in the same
   directory as the "nut.db" file, or else you have to modify
   "updateNUT.tcl" on line 24 to provide the full path to the "nut.db" file.
   After this step, "updateNUT.tcl" is not required for anything and can be
   deleted.  Updating the NUT code with "updateNUT.tcl" is independent of
   updating the USDA database, although it is certainly possible that the USDA
   could change the format of their tables so that a later version of
   "updateNUT.tcl" would be required in order to read their tables or display
   new nutrients.  The main idea is that your personal data is permanent even
   though the application code and USDA tables can change as necessary.

   Mac users should do this step from "Terminal" or else modify "updateNUT.tcl"
   adding a line to "cd" to the directory to be used.

4) If you are using a launcher and cannot specify the working directory, you
   will have to modify "nut.tcl" on line 27 to specify the full path to
   "nut.db".  This is especially important for Mac users.

   Another easy change to "nut.tcl" is the location of the SQLite database file.
   There is also a variable "appSize" that can control the size of the window
   and fonts for Linux users when set between approximately 0.7 to 1.3.  
   Windows and Mac users should leave the value of appSize at 0.0 unless they
   have determined the Linux GUI can work well with their system.

5) Run "nut.tcl" to run NUT.  When "nut.tcl" runs initially, it will load
   the USDA files and any personal data that exists in the NUTsqlite version 1
   database, nut.sqlite.  After NUT performs the initial database load, the USDA
   files can be deleted and NUT will not load any more files until it detects a
   new USDA database in the directory from which NUT is running.  All "nut.tcl"
   really does is to start Tcl and cause Tcl to run the code in the SQLite 
   database.  Because the code in the database does not have to be interpreted
   until required, there may also be better performance from the application.

6) The legacy file "nut.sqlite" will no longer be used.  The new database name
   is "nut.db" and often has two auxiliary files that must not be deleted
   because to do so corrupts the database.

Jim Jozwiak
http://nut.sourceforge.net
jozwiak@gmail.com
</PRE>