Skip to content

Commit

Permalink
Add more documentation and tutorials for every OS, make binaries more…
Browse files Browse the repository at this point in the history
… user friendly
  • Loading branch information
axelberardino committed Aug 15, 2019
1 parent f65e330 commit dc79a9e
Show file tree
Hide file tree
Showing 10 changed files with 407 additions and 138 deletions.
158 changes: 60 additions & 98 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,132 +2,90 @@

Share your stuff with others!

Scrap stash from the official **Path of Exile** website
(http://pathofexile.com) and generate a sharable file.
Scrap stash from the official **Path of Exile** website (http://pathofexile.com)
and generate a sharable file.

Main website here: https://cptpingu.github.io/poe-stash

### Goal

Share a stash with a friend:
* Easily
* Nothing to install (if hosted)
* Portable (should be compatible with everything)
* Simple to use

### Demo

I put some files online, to show what the generated files look like:
http://0217021.free.fr/poe-stash/

### Project history

This project has been created because I wanted to show what I got to a
friend. I was astonished there was no way to share stash and didn't
find any tool to do that. I needed a tool which was simple to use and
which generate a sharable portable file. That's why I choose a single
html file (css and javascript are embeded).
This project has been created because I wanted to show what I got to a friend. I
was astonished there was no way to share stash and didn't find any tool to do
that. I needed a tool which was simple to use and which generate a sharable
portable file. That's why I choose a single html file (css and javascript are
embeded).

The initial tool was a CLI which fetch the official API, and generated
this html file. Issue is, it's not easy for everyone to use the
command line. So, I created a simple http server to serve this file
and remember the poe sessid. By hosting this project, there is nothing
to install! A simple browser is enough.
The initial tool was a CLI which fetch the official API, and generated this html
file. Issue is, it's not easy for everyone to use the command line. So, I
created a simple http server to serve this file and remember the poe sessid. By
hosting this project, there is nothing to install! A simple browser is enough.

Then, I wanted to handle item selling. I didn't like existing tool
(even if there are more advanced). I wanted something like the
premium tab stash in game. I handled that using browser local storage
(keep in mind that file are not necessarily hosted online, so it has
to work as a single html file open on a device).
Then, I wanted to handle item selling. I didn't like existing tool (even if
there are more advanced). I wanted something like the premium tab stash in game.
I handled that using browser local storage (keep in mind that file are not
necessarily hosted online, so it has to work as a single html file open on a
device).

I'm heavily using this tool and satisfied with that. I often read
online that people wanted to share what they got, but have no way to
do that. So I decided to clean this project, and share it online.
I'm heavily using this tool and satisfied with that. I often read online that
people wanted to share what they got, but have no way to do that. So I decided
to clean this project, and share it online.

### Generate a file with the CLI
### Getting started

Build the binaries:
```
./gen_bin.sh
```
or
```
win_gen_bin.bat
```
For a quick start, read the tutorials:
* [Windows tutorial](docs/tutorial_windows.md)
* [MacOS tutorial](docs/tutorial_mac.md)
* [Linux tutorial](docs/tutorial_linux.md)

You can use the generated binary or directly `go run cmd/cli/main.go`.
I will use the later in my example.
### Using the generated file

```
go run cmd/cli/main.go --account <YOUR_ACCOUNT> --poesessid <YOUR_POESESSID> --league <YOUR_LEAGUE>
```
Viewing items should be pretty intuitive as it works exactly like in the game.
To price an item, left click on it. To remove a price, just set an empty price.
When all prices are set, just click on "generate items shop", it will copy in
your clipboard what you need to paste on the trade forum.

Account is your account name (not your character name)
Poesessid is the token id used after log in on the official website (in storage > cookie)
League, the league name (standard, legion, ...)
More information on pricing [here](docs/prices.md)

Example:
```
go run cmd/cli/main.go --account cptpingu --poesessid ef87f9320ba7428149fe562236e32 --league standard
```
A file "cptpingu-standard.html" should be created
(do not worry, it's a fake poe sessid :p).
### Hosting this tool online

[Show this explanation](/docs/hosting.md)

Type --help for a description of all other existing options.
### Building and releasing (technical stuff!)

### Launch the server (graphical interface)
To release new version, I'm using two scripts which generate the archives.

If you don't like the command line, you can launch the server locally:
For MacOS and Linux:
```
go run cmd/server/main.go
./gen_bin.sh
```

Then, go to: `http://localhost:2121` with your browser. That's all!

## Passwords

You can run a server without any securities, but if you want to host
this tool publicly, it is advised to enable some safeguards.
With the *--passwords* option, you can choose a file containing a set
of allowed users. These users are allow to generate new users or
refresh existing ones.
Usually, creating a `pass.txt` file containing `login:password` lines is
enough (passwords are in plain text for now).

Example:
For Windows:
```
mylogin:mypassword
malachai:immortality
user:35*rfs
win_gen_bin.bat
```

### Note about the POE sessid

Never ever share your POE sessid! This token is used to identify you
on the official website. This tool need it to fetch all information
about your account, but you should not share it. If a website ask your
poesessid (and it's not launched by you locally), you should not trust
it!
Then I attached the generated archives to a new release.

### Using the generated file
### Working and debugging (more technical stuff!)

Viewing items should be pretty intuitive as it works exactly like in
the game. To price an item, left click on it. To remove a price, just
set an empty price. When all prices are set, just click on "generate
items shop", it will copy in your clipboard what you need to paste on
the trade forum.
If you want to work on this project or just change or improve something, you
need to know some little debug things which will help you!

Note that every prices are store locally in your browser, and the
storage is associated with the exact url name. It means all prices
will be lost if you:
* Rename the file
* Use another browser
* Clear the browser cache
* Reinstall your browser
* Open the file on another device
To avoid fetching many urls (making many http request is quite slow if you have
a lot of stash tabs!), just enable the `--cache` option. It will store all the
resulting json reponses from the server in files. The next time you will call
it, it will use the local version (much much faster). It's particularly useful
when working on the template for html, js and css generation.

To avoid that, there are an `import shop` and an `export shop` buttons,
which allows you to save and reload the prices you set.
Example:
```
go run cmd/cli/main.go --account cptpingu --poesessid 87f93201234f1234f --output data/cptpingu.html --cache && open data/cptpingu.html
```

### Dependencies

Expand All @@ -144,7 +102,11 @@ which allows you to save and reload the prices you set.
* Remove only stash tab
* Too much jewels on the character will overflow

### TODO
* More rigourous item description generation
* Shop id for the link after shop generation
* Search bar? (lot of works)
### FAQ

Check the FAQ: [Here](/docs/faq.md)

### Contact

To contact me, either send a mail at [email protected], or open an issue on
this github.
4 changes: 0 additions & 4 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
Real issues
* New release needed
* How to use the generated file (What to do with the generated file), where to host?
* Support ("I need your help" section)
* Contact
* FAQ
* Regenerate demo files to add download button

Ideas
Expand Down
21 changes: 21 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# POE STASH

## Frequently asked questions

### Your currencies are not up to date

Yes, it's hard coded, not live. They will never be exact, or intended to be.
It's just a way to see how your general wealth is.

### There are already some better tools to price items

I'm not concurrencing acquisition or procurement, it's just a small feature I'm
using, because, why not :). Of course there are more advanced tools, which are
making a better job than this tool.

This tool is mainly to share stash with others.

### How can I support this project?

Just use it and share it! I will never ask for tips, or any kind of donation. No
need to send anything.
50 changes: 50 additions & 0 deletions docs/hosting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# POE STASH

## Host your own instance of this tool as a website

It could be useful for you to host this tool as a website to ease usage. For
example if you have a guild with trusted members, you may want to provide them
an online tool.

Follow these steps!

### Step 1: securing (at least a bit)

You can run a server without any securities, but if you want to host this tool
publicly, it is advised to enable some safeguards. With the *--passwords*
option, you can choose a file containing a set of allowed users. These users are
allow to generate new profile or refresh existing ones.

Usually, creating a `pass.txt` file containing `login:password` lines is enough
(passwords are in plain text for now).

Example:
```
mylogin:mypassword
malachai:immortality
user:35*rfs
```

### Step 2: Redirecting logs in a file

When launching this server, redirect everything in a file, like
`/var/log/poe-stash/logs.txt`. You can use logrotate tool if needed.

### Step 3: Launch as a daemon

A simple trick to do that, is by using `screen`.
Either directly by using `screen <command>` or by using:
```
screen
<your command>
ctrl+a, then d
```

You can got the instance back by typing `screen -r`

### Launch the server: an example

This how the final command line could looks like:
```
screen ./poe-stash-server --passwords pass.txt --port 2121 > /var/log/poe-stash/poestash.log
```
70 changes: 34 additions & 36 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

Share your stuff with others in Path of Exile!

Tired of not be able to show what you have to others?
This tool is for you!
Tired of not be able to show what you have to others? This tool is for you!

This project let you fetch your whole account and generate an html
file with all your stuff, browsable as if you were in game.
This project let you fetch your whole account and generate an html file with all
your stuff, browsable as if you were in game.

### Goal

Expand All @@ -15,32 +14,36 @@ Share a stash with a friend:
* Nothing to install (if hosted)
* Portable (should be compatible with everything)
* Simple to use
* Intuitive (very similar as the in-game interface)

## Download

Released versions are available here:
* [Windows v0.1](https://github.com/cptpingu/poe-stash/releases/download/v0.1/poe-stash-windows-amd64.zip)
* [Linux v0.1](https://github.com/cptpingu/poe-stash/releases/download/v0.1/poe-stash-linux-x86_64.tar.gz)
* [MacOS v0.1](https://github.com/cptpingu/poe-stash/releases/download/v0.1/poe-stash-darwin-x86_64.tar.gz)
* [Windows](https://github.com/cptpingu/poe-stash/releases/download/v0.1/poe-stash-windows-amd64.zip)
* [Linux](https://github.com/cptpingu/poe-stash/releases/download/v0.1/poe-stash-linux-x86_64.tar.gz)
* [MacOS](https://github.com/cptpingu/poe-stash/releases/download/v0.1/poe-stash-darwin-x86_64.tar.gz)

## Getting started

Launch the downloaded executable:
* **Windows**: Extract the archive and double click on `poe-stash-server.exe`.
A command line window will appear, it's the local server, do not close it!
* **Linux/MacOS**: Extract the archive and execute the binary `./poe-stash-server`.
Download archive, extract executable, launch it, and then go to:
[http://localhost:2121](http://localhost:2121) with your browser. That's all!

Then, go to: [http://localhost:2121](http://localhost:2121) with your browser. That's all!
More detailed instructions for your system here:
* [Windows tutorial](tutorial_windows.md)
* [MacOS tutorial](tutorial_mac.md)
* [Linux tutorial](tutorial_linux.md)

## Demo

[Try it yourself!](http://0217021.free.fr/poe-stash/demo/cptpingu-standard.html)
Want to see what generated files look like?

You can find more demo here: [Demo and screenshots](http://0217021.free.fr/poe-stash)
[See this one for example](http://0217021.free.fr/poe-stash/demo/cptpingu-standard-pc-2019-08-15.html)

I generated some more here: [Demo and screenshots](http://0217021.free.fr/poe-stash)

## Screenshots

Here is what this tool looks like:
Here is what the files generated by this tool looks like:

**MainScreen**
![MainScreen](http://0217021.free.fr/poe-stash/screenshots/MainScreen.png)
Expand Down Expand Up @@ -74,30 +77,25 @@ Here is what this tool looks like:

## Items pricing

This project also allows you to manage your item prices easily.
Read the whole doc here: [https://github.com/cptpingu/poe-stash](https://github.com/cptpingu/poe-stash)
This project also allows you to manage your item prices easily. It's not its
main feature, and will not replace more advanced dedicated tool, but it's still
useful (at least for me!).

## Tools
Read some explanation here: [Pricing items](prices.md)

This project contains two binaries: one for generating stash as an htlm
file and a web interface to help generating files.
## I need your help!

### Generate a file with the CLI
```
go run cmd/cli/main.go --account <YOUR_ACCOUNT> --poesessid <YOUR_POESESSID> --league <YOUR_LEAGUE>
```
Example:
```
go run cmd/cli/main.go --account cptpingu --poesessid ef87f9320ba7428149fe562236e32 --league standard
```
A file "cptpingu-standard.html" should be created.
I'm facing some issues, I could use a hand:
* English is not my first language, thus checking this documentation is
correctly written would be great!
* I don't have some premium stash type. So I don't know how to handle them. If
you have special stash tabs, send me the generated json, so I can start to
support them.
* I don't know how a *remove stash only* behave. Would be interesed as well.
* Do you have a character with a lot of jewels? Would like to know how it
behave in my tools.

### Launch the server
Thanks you!

If you don't like the command line, you can launch the server locally:
```
go run cmd/server/main.go
```
# Contact

Then, go to: `http://localhost:2121` with your browser.
For more details, visits: [https://github.com/cptpingu/poe-stash](https://github.com/cptpingu/poe-stash)
Loading

0 comments on commit dc79a9e

Please sign in to comment.