1 """
2 Module for definition of shared constants between the modules.
3
4 This file is part of Pisi.
5
6 Pisi is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 Pisi is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Pisi. If not, see <http://www.gnu.org/licenses/>
18 """
19
20 PISI_NAME = 'PISI'
21 """'About'-information for user - program name"""
22 PISI_COMMENTS = "PISI is synchronizing information"
23 """'About'-information for user - comments / explainations"""
24 PISI_VERSION = '0.5'
25 """'About'-information for user - current version"""
26 FILEPATH_COPYING = "/opt/pisi/COPYING"
27 """'About'-information for user - where to find the 'licence' file"""
28 PISI_AUTHORS = ["Esben Damgaard","Michael Pilgermann"]
29 """'About'-information for user - list of programmers"""
30 PISI_HOMEPAGE = "http://freshmeat.net/projects/pisiom"
31 """'About'-information for user - program home page"""
32 PISI_TRANSLATOR_CREDITS = None
33 """'About'-information for user - list of translators"""
34 PISI_DOCUMENTERS = ['Michael Pilgermann']
35 """'About'-information for user - list of documenters"""
36
37 CONSOLE_PROGRESSBAR_WIDTH = 80
38 """Length of progress bar in CLI mode"""
39
40 MODE_CALENDAR = 0
41 """Type of sources to deal with are calendars"""
42 MODE_CONTACTS = 1
43 """Type of sources to deal with are contacts"""
44 MODE_STRINGS = ['calendar', 'contacts']
45 """Names for the types of sources in order"""
46
47 MERGEMODE_SKIP = 0
48 """Resolve conflicts between two entries from two sources by skipping the entry"""
49 MERGEMODE_FLUSH_A = 1
50 """Resolve conflicts between two entries from two sources by flushing the entire data repository for the first data source"""
51 MERGEMODE_FLUSH_B = 2
52 """Resolve conflicts between two entries from two sources by flushing the entire data repository for the second data source"""
53 MERGEMODE_OVERWRITE_A = 3
54 """Resolve conflicts between two entries from two sources by overwriting the single entry on the first data source"""
55 MERGEMODE_OVERWRITE_B = 4
56 """Resolve conflicts between two entries from two sources by overwriting the single entry on the second data source"""
57 MERGEMODE_MANUALCONFIRM = 5
58 """Resolve conflicts between two entries from two sources by asking the user for decision for every single entry"""
59 MERGEMODE_STRINGS = ["Skip", "Flush source 1", "Flush source 2", "Overwrite entry in source 1", "Overwrite entry in source 2", "Manual confirmation"]
60 """Names of merge modes in order"""
61
62 ACTIONID_ADD = 0
63 """Entry in the history of activities for synchronization modules - here for ADD"""
64 ACTIONID_DELETE = 1
65 """Entry in the history of activities for synchronization modules - here for DELETE"""
66 ACTIONID_MODIFY = 2
67 """Entry in the history of activities for synchronization modules - here for MODIFY"""
68
69 GOOGLE_CONTACTS_APPNAME = "pisi" + PISI_VERSION
70 """application name to use for connecting against google contacts services"""
71 GOOGLE_CONTACTS_MAXRESULTS = 1000
72 """upper limit of result set when querying google contacts api"""
73 GOOGLE_CALENDAR_APPNAME = "pisi" + PISI_VERSION
74 """application name to use for connecting against google calendar services"""
75 GOOGLE_CALENDAR_MAXRESULTS = GOOGLE_CONTACTS_MAXRESULTS
76 """upper limit of result set when querying google calendar api"""
77
78 FILEDOWNLOAD_TIMEOUT = 10
79 """Timeout for socket opeations (e.g. http download) in seconds - None for disable"""
80 FILEDOWNLOAD_TMPFILE = "/tmp/pisi-remotebuffer.data"
81 """Temporary file for buffering information from remote file sources"""
82
83 VCF_BYTES_PER_ENTRY = 200
84 """For guessing the number of entries inside a VCF file by evaluating its size we need an estimation of the size for a single entry - for the purpose of showing some progress"""
85 ICS_BYTES_PER_ENTRY = 200
86 """For guessing the number of entries inside an ICS file by evaluating its size we need an estimation of the size for a single entry - for the purpose of showing some progress"""
87