This tool will automagically convert a table with information about a celestial body to a plain text table in a Google Document.
- AWS account and credentials for use of AWS Textract
- Google Developer app with Google Sheets API enabled and OAuth configured
- Redirect URL of the app should point to the
GET /access
endpoint of the configured server
- Redirect URL of the app should point to the
- Dedicated Google Spreadsheet for writing
- Docker (optionally with docker-compose) installed and working
- Download the application code and build the container with
docker build -t dsp-textract .
- Create a persistent local directory to be mounted to the container.
- For docker-compose, this directory must be named
config.local/
, this name is recommended
- For docker-compose, this directory must be named
- Optionally create a persistent log directory which will be mapped to
log
directory in the container- For docker-compose, this directory is named
log
- For docker-compose, this directory is named
- Copy
config/config.local.neon.template
from the source code toconfig.local.neon
in the local config directory - Point
sheet_client_config
andsheet_token_config
parameters inconfig.local.neon
to files inconfig.local/
directory - Set up remaining parameters in
config.local.neon
file - Start the container
- Either with
docker-compose
- The application will be exposed on port
8080
- The application will be exposed on port
- Or with
docker run
where you point your local config directory toconfig.local
in the container.- The server in the container runs on port
8080
, point wherever you like
- The server in the container runs on port
- Either with
- A server capable of serving PHP pages, PHP 8, composer
- Install composer dependencies
- Create
log
,temp/cache
directories - Set up the server to point to the
public
directory of the app - Copy
config/config.local.neon.template
toconfig/config.local.neon
and fill with informationsheet_client_config
is a path to Google app config json.- Example value can be
%root_dir%/config/credentials.json
- Example value can be
- Other options should be self-explanatory
%root_dir%
can be used to point to the root directory of the app
- Set up Google Docs access token by visiting the
GET /access
endpoint on the configured server - Send your screenshots to the
POST /document
endpoint of the configured server- The endpoint expects a single POST field of name
dataurl
with Base64-encoded data-url of the image
- The endpoint expects a single POST field of name
- It is necessary to provide just a cropped screenshot of the details table, otherwise the result is uncertain
- Very useful tool for this can be CloudShot along with my Generic API Upload Plugin which send exactly the data the app expects
- Each solar system will have a separate sheet in the document
- Each star and planet of the system will take two columns with two empty columns on the right for notes
- The order of bodies on the sheet is Star/Giant/Black hole and then orbiting bodies I-V
- On subsequent screenshots of the same object table, the data of the object will be overwritten
Example Google Spreadsheet from my current playthrough.
- The app is configured for production mode
- To switch the app to a development mode, create a
.dev
file in the local config directory - Warning: development mode may leak source code and credentials. Only local use is encouraged. Use lvh.me domain which points to 127.0.0.1 for oauth redirect url and/or the whole app.