Skip to content

Commit

Permalink
Update path config
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomn86 committed Dec 8, 2023
1 parent ff92161 commit c057f79
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Publish
run: dotnet publish TLEGenerator -c Release -f net5.0 --no-restore --output linux-x64
run: dotnet publish TLEGenerator -c Release --no-restore --output linux-x64
- uses: actions/upload-artifact@v3
with:
name: tlegenerator-linux-x64
Expand All @@ -31,11 +31,11 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Publish
run: dotnet publish TLEGenerator -c Release -f net5.0 --no-restore --output windows-x64
run: dotnet publish TLEGenerator -c Release --no-restore --output windows-x64
- uses: actions/upload-artifact@v3
with:
name: tlegenerator-windows-x64
Expand All @@ -49,11 +49,11 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Publish
run: dotnet publish TLEGenerator -c Release -f net5.0 --no-restore --output osx-x64
run: dotnet publish TLEGenerator -c Release --no-restore --output osx-x64
- uses: actions/upload-artifact@v3
with:
name: tlegenerator-osx-x64
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ Custom TLE file generator.

## Configuration file (config.json):

| Value | Default | Description |
| Value | Default value | Description |
|-|-|-|
| NoradUrl | https://celestrak.com/NORAD/elements/gp.php | NORAD API URL. |
| Groups | weather, amateur | Groups to retrieve the TLE data. Consider add or remove groups to reduce the number of API requests and increase performace. |
| Groups | None | Groups to retrieve the TLE data. Consider add or remove groups to reduce the number of API requests and increase the performace. |
| SatellitesListPath | satellites.json | File containing the NORAD catalog numbers for the tracked satellites. Get more catalog numbers at https://www.celestrak.com/satcat/search.php |
| OutputFilePath | custom_TLE.txt | Generated file. |
| TempFolder | /tmp | Folder where downloaded files are stored. |
| TempFolder | System user temp folder | Folder where temporary downloaded files are stored. |
| TempFilesDays | 1 | Number of days that the temporary files are valid before downloading them again. |


## Requirements:
This application needs the .NET 8.0 Runtime. You can download it here: [Download .NET 8.0 Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/8.0/runtime)

## Examples:

Generate a TLE file with the NORAD catalog numbers included in the file `satellites.txt`:
Expand Down
8 changes: 4 additions & 4 deletions TLEGenerator/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ public class Config
{
public string NoradUrl { get; set; } = "https://celestrak.com/NORAD/elements/gp.php";
public List<string> Groups { get; set; } = [];
public string SatellitesListPath { get; set; } = "./satellites.json";
public string OutputFilePath { get; set; } = "./custom_TLE.txt";
public string TempFolder { get; set; } = "/tmp";
public string SatellitesListPath { get; set; } = "satellites.json";
public string OutputFilePath { get; set; } = "custom_TLE.txt";
public string TempFolder { get; set; } = Path.GetTempPath();
public int TempFilesDays { get; set; } = 1;

public void ReadConfigFile(string configFile = "./config.json")
public void ReadConfigFile(string configFile = "config.json")
{
if (File.Exists(configFile))
{
Expand Down
7 changes: 1 addition & 6 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"NoradUrl" : "https://celestrak.com/NORAD/elements/gp.php",
"Groups" : [ "weather", "amateur" ],
"SatellitesListPath" : "./satellites.json",
"OutputFilePath" : "./custom_TLE.txt",
"TempFolder" : "/tmp",
"TempFilesDays" : 1
"Groups" : [ "weather", "amateur" ]
}

0 comments on commit c057f79

Please sign in to comment.