Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7a998d66

Přidáno uživatelem Eliška Mourycová před více než 3 roky(ů)

Re #8691. Big refactor + config file added + working on providing methods for Parser.

Zobrazit rozdíly:

Server/ServerApp/Connection/SocketListener.cs
8 8
using System.Text;
9 9
using System.Threading;
10 10

  
11
namespace Connection
11
namespace ServerApp.Connection
12 12
{
13 13
    /// <summary>
14 14
    /// State object for reading client data asynchronously
Server/ServerApp/DataDownload/DataDownloader.cs
8 8
using System.IO.Compression;
9 9
using System.Net;
10 10

  
11
namespace DataDownload
11
namespace ServerApp.DataDownload
12 12
{
13 13
	/// <summary>
14 14
	/// Enum representing all of the available data types (not all will be used in this project)
......
28 28
		XML, JSON, CSV
29 29
	}
30 30

  
31
	public enum TimeSpan
32
	{
33

  
34
	}
35

  
31 36
	/// <summary>
32 37
	/// This class takes care of downloading of data. Download happens from http://openstore.zcu.cz/.
33 38
	/// </summary>
......
36 41
		/// <summary>
37 42
		/// The root directory containing all downloaded data
38 43
		/// </summary>
39
		public string DataDirectory { get; }
44
		public string RootDataDirectory { get; }
45

  
46
		/// <summary>
47
		/// For a DataType key returns full (absolute) path to a direcotry, where this type of data is stored
48
		/// </summary>
49
		public Dictionary<DataType, string> DataSubDirectories { get; }
40 50

  
41 51
		/// <summary>
42 52
		/// Flag stating whether files which already exist should be overwritten when downloaded again
......
55 65
		// a shortcut to writing Path.DirectorySeparatorChar
56 66
		private char sep = Path.DirectorySeparatorChar;
57 67

  
58
		public DataDownloader()
68
		public DataDownloader(string rootDataDir, string website, string namingConvention) // todo take naming conventons specifiaction into account
59 69
		{
60 70
			// initialize all needed variables:
61 71

  
72
			DataSubDirectories = new Dictionary<DataType, string>();
73

  
62 74
			Console.WriteLine(Directory.GetCurrentDirectory());
63
			site = "http://openstore.zcu.cz/";
75
			site = website;//"http://openstore.zcu.cz/";
64 76
			dataStr = "OD_ZCU_";
65 77

  
66
			DataDirectory = $"..{sep}..{sep}data{sep}auto";
78
			RootDataDirectory = rootDataDir;//$"..{sep}..{sep}..{sep}data{sep}auto";
67 79
			OverwriteExisting = false;
68 80

  
69 81
			webClient = new WebClient();
......
89 101
			string monthYr = monthStr + "_" + yearStr;
90 102
			string url = site + "/" + dataStr + monthYr + "/" + dataStr + type + "_" + monthYr + "_" + format + ".zip";
91 103
			string nameZip = dataStr + type + "_" + monthYr + "_" + format + ".zip";
92
			string nameFolder = DataDirectory + sep + type + sep; //+ dataStr + type + "_" + monthYr + "_" + format;
104
			string nameFolder = RootDataDirectory + sep + type + sep; //+ dataStr + type + "_" + monthYr + "_" + format;
93 105

  
94 106
			try
95 107
			{
96
				Console.WriteLine("Downloading .zip to " + Path.GetFullPath(nameZip) + "...");
108
				//Console.WriteLine("Downloading .zip to " + Path.GetFullPath(nameZip) + "...");
97 109

  
98 110
				// Download the zip file:
99 111
				webClient.DownloadFile(url, nameZip);
......
134 146
				// dispose of the archive:
135 147
				zipArchive.Dispose();
136 148

  
137
				Console.WriteLine("Extracted to " + Path.GetFullPath(nameFolder));
138
				Console.WriteLine("Deleting .zip from " + Path.GetFullPath(nameZip) + "...");
139
				Console.WriteLine("Finished downloading " + nameZip);
149
				//Console.WriteLine("Extracted to " + Path.GetFullPath(nameFolder));
150
				//Console.WriteLine("Deleting .zip from " + Path.GetFullPath(nameZip) + "...");
151
				//Console.WriteLine("Finished downloading " + nameZip);
140 152

  
141 153
				// delete the previously downloaded zip file, files contained in it have been extracted:
142 154
				File.Delete(nameZip); // todo check?
......
145 157
			catch(System.Net.WebException we)
146 158
			{
147 159
				// download fails, if the specified url is invalid
148
				Console.WriteLine("Download from " + url + " failed.");
149
				Console.WriteLine(we.Message);
160
				//Console.WriteLine("Download from " + url + " failed.");
161
				//Console.WriteLine(we.Message);
150 162
			}
151 163

  
152 164

  
......
160 172
		/// Downloads selected type and time span of data in the desired format, returns a list of full paths to all successfully saved files. 
161 173
		/// If some of the files already existed and were not overwritten, then the returned List contains paths to these files also.
162 174
		/// </summary>
163
		/// <param name="type">The type of data, e.g. the jis data</param>
164
		/// <param name="format">The desired format of data files, available are CSV, XML and JSON formats</param>
165
		/// <param name="startYear">The start year to start the download from, inclusive</param>
166
		/// <param name="endYear">The end year to start the download from, inclusive</param>
167
		/// <param name="startMonth">The start month to start the download from, inclusive</param>
168
		/// <param name="endMonth">The end month to start the download from, inclusive</param>
169
		/// <returns>A list of full paths to all successfully saved files</returns>
170
		public List<string> DownloadData(DataType type, DataFormat format, int startYear, int endYear, int startMonth, int endMonth)
175
		public List<string> DownloadData(DataType type, DataFormat format, Date startDate, Date endDate/*int startYear, int endYear, int startMonth, int endMonth*/)
171 176
		{
177
			if (startDate > endDate)
178
				throw new ArgumentException("startDate must be the same as or before the endDate.");
179

  
180
			// initialize:
172 181
			List<string> savedFiles = new List<string>();
173
			DirectoryInfo di = Directory.CreateDirectory(DataDirectory + sep + type);
182
			string subDirectory = RootDataDirectory + sep + type;
183
			DirectoryInfo di = Directory.CreateDirectory(subDirectory);
184

  
185
			// create subdirectory record if it doesn't exist:
186
			if (!DataSubDirectories.ContainsKey(type))
187
				DataSubDirectories.Add(type, Path.GetFullPath(subDirectory));
174 188

  
175
			for (int y = startYear; y <= endYear; y++)
189

  
190
			Date currentDate = startDate;
191
			bool firstLoop = true;
192
			do
176 193
			{
177
				for (int m = startMonth; m <= endMonth; m++)
194
				Console.WriteLine("current date: " + currentDate);
195
				savedFiles.AddRange(DownloadData(type, format, (int)currentDate.Year, (int)currentDate.Month));
196
				Date nextDate = currentDate.IncreaseMonthByOne();
197

  
198
				// also try to find the 00 file for each year:
199
				if(nextDate.Year > currentDate.Year || firstLoop)
178 200
				{
179
					savedFiles.AddRange(DownloadData(type, format, y, m));
201
					savedFiles.AddRange(DownloadData(type, format, (int)currentDate.Year, 0));
202
					if (firstLoop)
203
						firstLoop = false; // so that we don't download the same thing all the time
204
					
180 205
				}
181
			}
206

  
207
				// assign the increased date to the current date:
208
				currentDate = nextDate;
209

  
210

  
211
			} while (currentDate != endDate);
212

  
213

  
214
			
215

  
216
			//for (int y = startYear; y <= endYear; y++)
217
			//{
218
			//	for (int m = startMonth; m <= endMonth; m++)
219
			//	{
220
			//		savedFiles.AddRange(DownloadData(type, format, y, m));
221
			//	}
222
			//}
182 223

  
183 224
			return savedFiles;
184 225
		}
185 226

  
227
		public bool CheckForNewData()
228
		{
229
			throw new NotImplementedException();
230
		}
231

  
232
		public List<string> GetData(string subDirectory, int startYear, int endYear, int startMonth, int endMonth)
233
		{
234
			throw new NotImplementedException();
235
		}
236

  
186 237

  
187 238
		#region UNUSED
188 239
		//public string GetDirectoryListingRegexForUrl(string url)
Server/ServerApp/DataDownload/Date.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace ServerApp.DataDownload
8
{
9
	public class Date
10
	{
11
		public uint Month { get; }
12
		public uint Year { get; }
13
		public Date(uint month, uint year)
14
		{
15
			if (month == 0)
16
				throw new ArgumentOutOfRangeException("month", "Month must be positive and not zero.");
17
			this.Month = month;
18
			this.Year = year;
19
		}
20

  
21

  
22

  
23
		public Date IncreaseMonthByOne()
24
		{
25
			uint newMonth = Month;
26
			newMonth++;
27
			uint newYear = Year;
28
			if (newMonth > 12)
29
			{
30
				// newMonth must be 13
31
				newMonth = 1;
32
				newYear++;
33
			}
34

  
35
			return new Date(newMonth, newYear);
36
		}
37

  
38

  
39
		#region OVERRIDEN METHODS FOR OF THE OBJECT CLASS
40
		public override bool Equals(object obj)
41
		{
42
			if (obj.GetType() != typeof(Date))
43
				return false;
44

  
45
			Date other = obj as Date;
46
			if (other.Month == this.Month && other.Year == this.Year)
47
				return true;
48
			return false;
49
		}
50

  
51
		public override int GetHashCode()
52
		{
53
			int hashCode = -994906903;
54
			hashCode = hashCode * -1521134295 + Month.GetHashCode();
55
			hashCode = hashCode * -1521134295 + Year.GetHashCode();
56
			return hashCode;
57
		}
58

  
59
		public override string ToString()
60
		{
61
			string mon = Month > 9 ? $"{Month}" : "0" + Month;
62
			return $"{mon}-{Year}";
63
		}
64

  
65
		#endregion
66

  
67
		#region OVERLOADED OPERATORS
68
		public static bool operator >(Date d1, Date d2)
69
		{
70
			if (d1.Year > d2.Year)
71
				return true;
72
			else if (d1.Year < d2.Year)
73
				return false;
74
			else
75
			{
76
				// the years are equal
77
				if (d1.Month > d2.Month)
78
					return true;
79
				else return false;
80
			}
81

  
82
		}
83

  
84
		public static bool operator <(Date d1, Date d2)
85
		{
86
			return !(d1 >= d2);
87
		}
88

  
89

  
90
		public static bool operator >=(Date d1, Date d2)
91
		{
92
			if (d1.Year > d2.Year)
93
				return true;
94
			else if (d1.Year < d2.Year)
95
				return false;
96
			else
97
			{
98
				// the years are equal
99
				if (d1.Month > d2.Month)
100
					return true;
101
				else if (d1.Month == d2.Month)
102
					return true;
103
				else return false;
104
			}
105
		}
106

  
107
		public static bool operator <=(Date d1, Date d2)
108
		{
109
			return !(d1 > d2);
110
		}
111

  
112
		public static bool operator ==(Date d1, Date d2)
113
		{
114
			return d1.Equals(d2);
115
		}
116

  
117
		public static bool operator !=(Date d1, Date d2)
118
		{
119
			return !d1.Equals(d2);
120
		}
121

  
122
		#endregion
123
	}
124
}
Server/ServerApp/Program.cs
1
using Connection;
1
using ServerApp.Connection;
2
using ServerApp.DataDownload;
2 3
using ServerApp.Parser.Parsers;
3 4
using ServerApp.Predictor;
4 5
using System;
5 6
using System.Collections.Generic;
7
using System.IO;
6 8

  
7 9
namespace ServerApp
8 10
{
11

  
12
	class Config // TBD where this should go
13
	{
14
		public string DataWebsite { get; set; }
15
		public string DownloadedFilesNaming { get; set; }
16
		public string DataRootDir { get; set; }
17
		public string Port { get; set; }
18
	}
19

  
9 20
    class Program
10 21
    {
22

  
23

  
24

  
11 25
        static void Main(string[] args)
12 26
        {
13
            DataParser p = new DataParser("data/");
14 27

  
15
            //p.Parse();
28
            Config config = FillConfigInfo(args);
29
			if (config == null)
30
			{
31
				Console.ReadLine();
32
				return;
33
			}
34

  
35

  
36

  
37
			//DataParser p = new DataParser("data/");
38

  
39
			//p.Parse();
40

  
41

  
42
			// test scenario - data download:
43
			DataDownloader dd = new DataDownloader(config.DataRootDir, config.DataWebsite, config.DownloadedFilesNaming);
44
			dd.OverwriteExisting = false;
45
			List<string> savedFiles = new List<string>();
46
			savedFiles.AddRange(dd.DownloadData(DataType.JIS, DataFormat.CSV, new Date(1, 2017), new Date(12, 2020)));
47
			savedFiles.AddRange(dd.DownloadData(DataType.STROJE, DataFormat.CSV, new Date(1, 2017), new Date(12, 2020)));
48
			savedFiles.AddRange(dd.DownloadData(DataType.POCASI, DataFormat.CSV, new Date(1, 2017), new Date(12, 2020)));
49

  
16 50

  
17 51

  
18
            // test scenario - data download:
19
            //DataDownloader dd = new DataDownloader();
20
            //         List<string> savedFiles = new List<string>();
21
            //         savedFiles.AddRange(dd.DownloadData(DataType.JIS, DataFormat.CSV, 2017, 2021, 0, 13));
22
            //         savedFiles.AddRange(dd.DownloadData(DataType.POCASI, DataFormat.CSV, 2017, 2021, 0, 13));
23
            //         savedFiles.AddRange(dd.DownloadData(DataType.STROJE, DataFormat.CSV, 2017, 2021, 0, 13));
52
			Console.WriteLine("Saved files: ");
53
			foreach (string s in savedFiles)
54
			{
55
				Console.WriteLine(s);
56
			}
24 57

  
58
			Console.WriteLine("subdirectories: ");
59
			foreach (KeyValuePair<DataType, string> kvp in dd.DataSubDirectories)
60
			{
61
				Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
62
			}
25 63

  
26
            //         Console.WriteLine("Saved files: ");
27
            //         foreach(string s in savedFiles)
28
            //{
29
            //             Console.WriteLine(s);
30
            //}
31 64

  
32 65

  
66
			// date testing
67
			//Date d1 = new Date(2, 2020);
68
			//Date d2 = new Date(1, 2019);
33 69

  
34
            // test - connection:
35
            AsynchronousSocketListener asl = new AsynchronousSocketListener();
36
            asl.StartListening();
37
           
70
			//Console.WriteLine("equals" + d1.Equals(d2));
71
			//Console.WriteLine("==" + (d1 == d2));
72
			//Console.WriteLine("!=" + (d1 != d2));
73
			//Console.WriteLine(">" + (d1 > d2));
74
			//Console.WriteLine("<" + (d1 < d2));
75
			//Console.WriteLine(">=" + (d1 >= d2));
76
			//Console.WriteLine("<=" + (d1 <= d2));
38 77

  
39
            NaiveBayesClassifier naiveBayesClassifier = new NaiveBayesClassifier();
40
            IEnumerable<ModelInput> modelInput = naiveBayesClassifier.ExtractModelInput(p.weatherList, p.jisList);
41
            naiveBayesClassifier.Fit(modelInput);
42
            List<ModelInput> dataList = new List<ModelInput>()
43
            {
44
                new ModelInput()
45
                {
46
                    Temp = -40,
47
                }
48
            };
49
            var result = naiveBayesClassifier.Predict(dataList);
50 78

  
51
            Console.WriteLine($"Predictions: ");
52
            foreach(var item in result)
53
            {
54
                Console.WriteLine(item.ToString());
55
            }
56 79

  
57
            Console.ReadLine();
80

  
81
			// test - connection:
82
			//AsynchronousSocketListener asl = new AsynchronousSocketListener();
83
			//         asl.StartListening();
84

  
85

  
86
			//NaiveBayesClassifier naiveBayesClassifier = new NaiveBayesClassifier();
87
			//IEnumerable<ModelInput> modelInput = naiveBayesClassifier.ExtractModelInput(p.weatherList, p.jisList);
88
			//naiveBayesClassifier.Fit(modelInput);
89
			//List<ModelInput> dataList = new List<ModelInput>()
90
			//{
91
			//    new ModelInput()
92
			//    {
93
			//        Temp = -40,
94
			//    }
95
			//};
96
			//var result = naiveBayesClassifier.Predict(dataList);
97

  
98
			//Console.WriteLine($"Predictions: ");
99
			//foreach(var item in result)
100
			//{
101
			//    Console.WriteLine(item.ToString());
102
			//}
103

  
104
			Console.ReadLine();
58 105
        }
106

  
107

  
108
        private static Config FillConfigInfo(string[] args)
109
		{
110

  
111
			Config extractedConfigInfo = new Config();
112

  
113
			Console.WriteLine(Directory.GetCurrentDirectory());
114
			
115
			if (args.Length != 1)
116
				Console.WriteLine("Wrong usage of parameters, pass the path to a config file."); // todo better explanation?
117

  
118
			string fullPathConfig = Path.GetFullPath(args[0]);
119
			string[] lines = null;
120
			try {
121
				lines = File.ReadAllLines(fullPathConfig);
122
			}
123
			catch(Exception ex)
124
			{
125
				Console.WriteLine("Could not open " + fullPathConfig);
126
				return null;
127
			}
128
			
129
			for (var i = 0; i < lines.Length; i += 1)
130
			{
131
				string line = lines[i];
132
				Console.WriteLine(line);
133
				if (line.Length == 0 || line == null || line.StartsWith("#"))
134
					continue;
135

  
136
				switch (line)
137
				{
138
					case "!site!":
139
						extractedConfigInfo.DataWebsite = lines[++i].Trim();
140
						break;
141
					case "!naming_convention!":
142
						extractedConfigInfo.DownloadedFilesNaming = lines[++i].Trim();
143
						break;
144
					case "!data_root_dir!":
145
						string dirWithConfig = Path.GetDirectoryName(fullPathConfig);
146
						string rootPath = dirWithConfig + Path.DirectorySeparatorChar + lines[++i].Trim();
147
						extractedConfigInfo.DataRootDir = rootPath;
148
						
149
						break;
150
					case "!port!":
151
						extractedConfigInfo.Port = lines[++i].Trim();
152
						break;
153
					default: break;
154
				}
155
			}
156

  
157
			return extractedConfigInfo;
158
		}
59 159
    }
60 160
}
Server/ServerApp/ServerApp.csproj
131 131
  <ItemGroup>
132 132
    <Compile Include="Connection\SocketListener.cs" />
133 133
    <Compile Include="DataDownload\DataDownloader.cs" />
134
    <Compile Include="DataDownload\Date.cs" />
134 135
    <Compile Include="Parser\InputData\CsvDataLoader.cs" />
135 136
    <Compile Include="Parser\InputData\DataLoader.cs" />
136 137
    <Compile Include="Parser\InputData\JisInstance.cs" />
......
160 161
  </ItemGroup>
161 162
  <ItemGroup>
162 163
    <None Include="App.config" />
163
    <None Include="data\auto\JIS\OD_ZCU_JIS_00_2019.CSV" />
164
    <None Include="data\auto\JIS\OD_ZCU_JIS_01_2020.CSV" />
165
    <None Include="data\auto\JIS\OD_ZCU_JIS_02_2020.CSV" />
166
    <None Include="data\auto\JIS\OD_ZCU_JIS_03_2020.CSV" />
167
    <None Include="data\auto\JIS\OD_ZCU_JIS_04_2020.CSV" />
168
    <None Include="data\auto\JIS\OD_ZCU_JIS_05_2020.CSV" />
169
    <None Include="data\auto\JIS\OD_ZCU_JIS_06_2019.CSV" />
170
    <None Include="data\auto\JIS\OD_ZCU_JIS_06_2020.CSV" />
171
    <None Include="data\auto\JIS\OD_ZCU_JIS_07_2019.CSV" />
172
    <None Include="data\auto\JIS\OD_ZCU_JIS_07_2020.CSV" />
173
    <None Include="data\auto\JIS\OD_ZCU_JIS_08_2019.CSV" />
174
    <None Include="data\auto\JIS\OD_ZCU_JIS_08_2020.CSV" />
175
    <None Include="data\auto\JIS\OD_ZCU_JIS_09_2019.CSV" />
176
    <None Include="data\auto\JIS\OD_ZCU_JIS_09_2020.CSV" />
177
    <None Include="data\auto\JIS\OD_ZCU_JIS_10_2019.CSV" />
178
    <None Include="data\auto\JIS\OD_ZCU_JIS_10_2020.CSV" />
179
    <None Include="data\auto\JIS\OD_ZCU_JIS_11_2019.CSV" />
180
    <None Include="data\auto\JIS\OD_ZCU_JIS_11_2020.CSV" />
181
    <None Include="data\auto\JIS\OD_ZCU_JIS_12_2019.CSV" />
182
    <None Include="data\auto\JIS\OD_ZCU_JIS_12_2020.CSV" />
183
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_00_2019.CSV" />
184
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_01_2020.CSV" />
185
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_02_2020.CSV" />
186
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_03_2020.CSV" />
187
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_04_2020.CSV" />
188
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_05_2020.CSV" />
189
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_06_2019.CSV" />
190
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_06_2020.CSV" />
191
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_07_2019.CSV" />
192
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_07_2020.CSV" />
193
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_08_2019.CSV" />
194
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_08_2020.CSV" />
195
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_09_2019.CSV" />
196
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_09_2020.CSV" />
197
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_10_2019.CSV" />
198
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_10_2020.CSV" />
199
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_11_2019.CSV" />
200
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_11_2020.CSV" />
201
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_12_2019.CSV" />
202
    <None Include="data\auto\POCASI\OD_ZCU_POCASI_12_2020.CSV" />
203
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_00_2019.CSV" />
204
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_01_2020.CSV" />
205
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_02_2020.CSV" />
206
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_03_2020.CSV" />
207
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_04_2020.CSV" />
208
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_05_2020.CSV" />
209
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_06_2019.CSV" />
210
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_06_2020.CSV" />
211
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_07_2019.CSV" />
212
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_07_2020.CSV" />
213
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_08_2019.CSV" />
214
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_08_2020.CSV" />
215
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_09_2019.CSV" />
216
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_09_2020.CSV" />
217
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_10_2019.CSV" />
218
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_10_2020.CSV" />
219
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_11_2019.CSV" />
220
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_11_2020.CSV" />
221
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_12_2019.CSV" />
222
    <None Include="data\auto\STROJE\OD_ZCU_STROJE_12_2020.CSV" />
223 164
    <None Include="data\jis\OD_ZCU_JIS_06_2019.CSV" />
224 165
    <None Include="data\jis\OD_ZCU_JIS_09_2019.CSV" />
225 166
    <None Include="data\jis\OD_ZCU_JIS_10_2019.CSV" />
......
240 181
    <None Include="data\weather\OD_ZCU_POCASI_13_2019.CSV" />
241 182
    <None Include="packages.config" />
242 183
  </ItemGroup>
184
  <ItemGroup>
185
    <Folder Include="data\auto\" />
186
  </ItemGroup>
243 187
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
244 188
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
245 189
    <PropertyGroup>
Server/ServerApp/server_config
1

  
2
#
3
# This is the server configuration file. See [wiki_site] for detailed information about its structure.
4
# Pass this file as an argument to the server program when launching it.
5
#
6

  
7
# --- DATA DOWNLOADING CONFIGURATION ---
8

  
9
# the main website containing all data:
10
!site!
11
http://openstore.zcu.cz/
12

  
13
# the naming convention for files stored at the site to download from:
14
!naming_convention!
15
OD_ZCU_{type}_{month}_{year}_{format}.zip
16

  
17
# the root directory where all data will be stored (subdirectories will be created when data is downloaded)
18
# enter path relative to this file or an absolute path
19
!data_root_dir!
20
.\data\auto
21

  
22

  
23
# --- CONNECTION CONFIGURATION ---
24

  
25
# port configuration
26
!port!
27
10000

Také k dispozici: Unified diff