-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
979 additions
and
1,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
# Setup Share | ||
# Setup Share 1.2 | ||
A simple App for sharing setups within Assetto Corsa sessions. | ||
|
||
## App | ||
|
||
The app works on saved Setups/Pit Strategies used by your car and track in the current session (online or single player). You can only download setups from other drivers in the session that are using the same car as you and already uploaded one setup. | ||
The app works on saved setups/pit strategyies used by your car and track in the current session (online or single player). You can only download setups from other drivers that already uploaded their setups for the same combo. | ||
![App screenshot.](https://raw.githubusercontent.com/albertowd/SetupShare/master/img/app.jpg) | ||
|
||
### App Install | ||
### App install | ||
|
||
First unzip the release content direct on your assetto corsa main folder (C:/Program Files (x86)/steam/steamapps/common/assettocorsa) and load the game. | ||
Select the option menu and the general sub menu. In the UI Module section will be listed this app to be checked. | ||
Last step is to enter a session and select it on the right app bar to see it on screen. | ||
Select the option menu and the general sub menu in-game to activate the SetupShare app. In the UI Module section will be listed this app to be checked. | ||
![Enabling the app in-game.](https://raw.githubusercontent.com/albertowd/SetupShare/master/img/menu.gif) | ||
Last step is to enter a session (online, practice, race..) and select it on the right app bar to see it on screen. | ||
|
||
### Downloading and uploading | ||
|
||
This app doesn't apply a downloaded setup automatically neither upload an unsaved one. | ||
The first line of the app contains the list of the users computer setups. The selected setup can be uploaded to the system, updating it if it's already in "the cloud". | ||
The rest of the view contains the list of uploaded setups groupped by users. Selecting one and downloading it will write or overwrite the setup on the users computer. | ||
![Using the app.](https://raw.githubusercontent.com/albertowd/SetupShare/master/img/app.gif) | ||
|
||
## Web | ||
|
||
The [page](http://albertowd.com.br/setupshare/) shows all the uploaded setups, use the search filter to find and download one (.ini and .sp, if available). Uploads are only allowed through the app. | ||
The [page](http://albertowd.com.br/setupshare/) shows all the uploaded setups, use the search filter to find and download one (.ini and .sp, if available). Uploads are only allowed through the app. | ||
|
||
## Changelog | ||
|
||
v 1.2: | ||
* App: adapted to the handle the new server. | ||
* Server: Chenged setups files to a database. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Setup Share Connection utils. | ||
""" | ||
from json import dumps | ||
from requests import get, post | ||
import sys | ||
|
||
SS_API_SERVER = "http://albertowd.com.br/setupshare/api" | ||
|
||
def combo_list(car, track): | ||
""" Gets the list os available setups of the car/track. """ | ||
global SS_API_SERVER | ||
response = get("{}/list.php?app&car={}&track={}".format(SS_API_SERVER, car, track), timeout=5) | ||
return response.json() if response.status_code == 200 else [] | ||
|
||
|
||
def download(setup_id, ext="ini"): | ||
""" Downloads a specific setup. """ | ||
global SS_API_SERVER | ||
response = get("{}/download.php?id={}&ext={}".format(SS_API_SERVER, setup_id, ext), timeout=5) | ||
return response.text if response.status_code == 200 else None | ||
|
||
|
||
def upload(setup): | ||
""" Uploads the user setup. """ | ||
global SS_API_SERVER | ||
return post("{}/upload.php".format(SS_API_SERVER), data=dumps(setup), timeout=5).text | ||
|
||
|
||
def verify_server(): | ||
""" Verify the server connection. """ | ||
global SS_API_SERVER | ||
return get("{}/download.php".format(SS_API_SERVER), timeout=5).status_code == 403 | ||
|
||
|
||
if __name__ == "__main__": | ||
print("Server status: {}".format("on" if verify_server() else "off")) | ||
CAR = "bmw_m3_gt2" | ||
DRIVER = "Alberto Dietrich" | ||
SETUP = "test" | ||
TRACK = "spa" | ||
#print(upload(CAR, DRIVER, "my ini content", SETUP, "my sp content", TRACK)) | ||
print(combo_list(CAR, TRACK)) | ||
print(download(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
app/apps/python/SetupShare/sslog.py → app/apps/python/SetupShare/lib/ss_log.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Setup Share Log utils. | ||
""" | ||
|
Oops, something went wrong.