This is a program which allows uploading a Steam guide from text files on the command line.
Useful for anyone who would prefer to use their favorite text editor or other tools for authoring their guides.
Get D and run dub build
in the program directory to build the upload
program.
You must first export your cookies to a text file to allow the program to upload the guide under your account. To do so:
- Visit https://steamcommunity.com/ in your web browser of choice.
- Ensure that you are logged in. If you aren't, log in now.
- Open the Developer Console or equivalent (usually done by pressing F12).
- Open the "Network" tab in the Developer Console (or equivalent).
- Reload the page.
- Click on the very first request added to the request list, which should be for the https://steamcommunity.com/ page.
- Find the "Request headers" pane in the Developer Console or equivalent.
- Find the "Cookie" header within.
- Copy the value of the cookie header.
- Navigate to your user app settings directory:
- Windows:
%USERPROFILE%\AppData\Roaming
- POSIX (Linux/Mac):
$XDG_CONFIG_HOME
or~/.config
- Windows:
- Create the directory
cookies
. - Create the text file
steamcommunity.com
(no additional extension like.txt
). - Paste the value of the cookie header.
- Create the guide on Steam as usual - fill in the name, description, categories, and branding image.
- Find your guide ID in the URL bar. E.g. for https://steamcommunity.com/sharedfiles/manageguide/?id=1234567890, the guide ID is 1234567890.
- Create a new directory for your guide.
- In the directory, create a text file, called
guideid.txt
, which contains the ID (and nothing else).
Although you can use this software with existing guides, note that it will irreversibly overwrite the entire guide while uploading.
The same warning applies if you intend to make edits through Steam's web interface.
In your guide directory, create one text file per section, with the extension .steamguide
.
The format is as follows:
- The first line is the section title.
- The second line should be blank.
- The third and following lines are the section body.
The section ordering is defined by the lexicographical ordering of the .steamguide
file names, therefore the author recommends using filenames such as 00-introduction.steamguide
, 01-how-to-use-this-guide.steamguide
, 02-chapter-one.steamguide
etc.
The author recommends placing the .steamguide
files under version control (i.e. Git), and publishing it on GitHub, so that editing history is recorded and contributions to the guide can be easily accepted using GitHub pull requests.
Aside from what is described here, the guide text is uploaded as-is, and is formatted according to Steam's guide/comment formatting syntax.
Compile and run the upload
program to overwrite the online version of the guide with that in your .steamguide
files.
The program will attempt to preserve section IDs (so as to not break links to individual guide sections). This is done by maintaining a mapping from each .steamguide
file name to a Steam subsection ID in the file sections.txt
. If you decide to rename some sections' .steamguide
files, you may want to update the file names in sections.txt
as well.
An additional syntax is provided for linking to sections: [section-link=SECTION-NAME-OR-ID]LINK-TEXT[/section-link]
. The [section-link]
tag allows creating a link to a specific section within the same guide, and will be rewritten to an [url]
tag with an anchor to the corresponding section. SECTION-NAME-OR-ID
can be either the file name of a .steamguide
section file (extension is optional), or the numeric section ID.
If you create a directory called images
in your guide directory, the program will also upload any image files placed there.
You can then reference them in your guide using the usual [previewimg]
and [previewicon]
tags, however, instead of the numeric ID, you can specify an image file name. For example: [previewicon=smiley.png;sizeOriginal,inline][/previewicon]