* /trunk/src/gpstools/doc/gnuplot.txt
[gpstools.git] / Patch / suuid.patch
blob29e4bf372dea2df69292b9dc71b54facfc2600b0
1 Index: addpoints
2 ===================================================================
3 --- addpoints (revision 2897)
4 +++ addpoints (working copy)
5 @@ -109,6 +109,93 @@
6 system($exec_str);
9 + if ($Opt{'type'} =~ /suuid/) {
10 + if (open(FromFP, "<$Currfile")) {
11 + while (my $Line = <FromFP>) {
12 + # Version description from suuid r2886 (04c64336-f744-11dd-bddd-000475e441b9):
13 + # Version 1 (same as above, but with version field):
14 + # 1 \t
15 + # uuid \t
16 + # curr_time \t
17 + # tag \t
18 + # comment \n
19 + # Version 2
20 + # 2 \t
21 + # uuid \t
22 + # curr_time \t
23 + # tag \t
24 + # comment \t
25 + # current_dir \n
26 + # Version 3
27 + # 3 \t
28 + # uuid \t
29 + # curr_time \t
30 + # tag \t
31 + # comment \t
32 + # current_dir \t
33 + # username \n
35 + my %Data = ();
36 + if ($Line =~ # Version 1
37 + /^
38 + (1)\t # version
39 + (.*?)\t # uuid
40 + (.*?)\t # date
41 + (.*?)\t # tag
42 + (.*?)\n # comment
43 + /x
44 + ) {
45 + $Data{'version'} = $1;
46 + $Data{'uuid'} = $2;
47 + $Data{'date'} = $3;
48 + $Data{'tag'} = $4;
49 + $Data{'comment'} = $5;
50 + }
51 + elsif ($Line =~ # Version 2
52 + /^
53 + (2)\t # version
54 + (.*?)\t # uuid
55 + (.*?)\t # date
56 + (.*?)\t # tag
57 + (.*?)\n # comment
58 + (.*?)\n # currdir
59 + /x
60 + ) {
61 + $Data{'version'} = $1;
62 + $Data{'uuid'} = $2;
63 + $Data{'date'} = $3;
64 + $Data{'tag'} = $4;
65 + $Data{'comment'} = $5;
66 + $Data{'currdir'} = $5;
67 + }
68 + elsif ($Line =~ # Version 3
69 + /^
70 + (3)\t # version
71 + (.*?)\t # uuid
72 + (.*?)\t # date
73 + (.*?)\t # tag
74 + (.*?)\n # comment
75 + (.*?)\n # currdir
76 + (.*?)\n # username
77 + /x
78 + ) {
79 + $Data{'version'} = $1;
80 + $Data{'uuid'} = $2;
81 + $Data{'date'} = $3;
82 + $Data{'tag'} = $4;
83 + $Data{'comment'} = $5;
84 + $Data{'currdir'} = $5;
85 + $Data{'username'} = $5;
86 + }
87 + }
88 + print(
89 +INSERT INTO suuid (version, suuid, date, tag, comment, currdir, username) VALUES (
90 + '$Data{'version'}',
91 + close(FromFP);
92 + } else {
93 + warn("$progname: $Currfile: Cannot open file for read: $!\n");
94 + }
95 + }
96 if ($Opt{'type'} =~ /track/) {
97 my $exec_str =
98 "gpst -o pgtab -d -rpt $Currfile | " .
99 Index: postgres/create_table.sql
100 ===================================================================
101 --- postgres/create_table.sql (revision 2897)
102 +++ postgres/create_table.sql (working copy)
103 @@ -81,3 +81,14 @@
104 lastupdate timestamptz,
105 lastname timestamptz
108 +CREATE TABLE suuid (
109 + version smallint,
110 + suuid uuid,
111 + date timestamptz,
112 + tag varchar,
113 + comment varchar.
114 + currdir varchar,
115 + username varchar,
116 + id serial