-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more documentation and tutorials for every OS, make binaries more…
… user friendly
- Loading branch information
1 parent
f65e330
commit dc79a9e
Showing
10 changed files
with
407 additions
and
138 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 |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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. |
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,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. |
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,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 | ||
``` |
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
Oops, something went wrong.