Skip to content

Commit 1ff3529

Browse files
committed
working basic bptf support
2 parents 7a2c8c3 + 768b161 commit 1ff3529

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1331
-35385
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: documentation
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v3
14+
- name: Install dependencies
15+
run: |
16+
pip install sphinx furo
17+
- name: Sphinx build
18+
run: |
19+
sphinx-build docs _build
20+
- name: Deploy to GitHub Pages
21+
uses: peaceiris/actions-gh-pages@v3
22+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23+
with:
24+
publish_branch: gh-pages
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: _build/
27+
force_orphan: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.vscode
22
__pycache__
3-
jsons
3+
jsons
4+
config.py
5+
_build

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2023 offish
3+
Copyright (c) 2019-2024 offish
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 131 deletions
This file was deleted.

README.rst

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
tf2-utils
2+
=========
3+
4+
.. image:: https://img.shields.io/github/license/offish/tf2-utils.svg
5+
:target: https://github.com/offish/tf2-utils/blob/master/LICENSE
6+
:alt: License
7+
8+
.. image:: https://img.shields.io/github/stars/offish/tf2-utils.svg
9+
:target: https://github.com/offish/tf2-utils/stargazers
10+
:alt: Stars
11+
12+
.. image:: https://img.shields.io/github/issues/offish/tf2-utils.svg
13+
:target: https://github.com/offish/tf2-utils/issues
14+
:alt: Issues
15+
16+
.. image:: https://img.shields.io/github/repo-size/offish/tf2-utils.svg
17+
:target: https://github.com/offish/tf2-utils
18+
:alt: Size
19+
20+
.. image:: https://img.shields.io/discord/467040686982692865?color=7289da&label=Discord&logo=discord
21+
:target: https://discord.gg/t8nHSvA
22+
:alt: Discord
23+
24+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
25+
:target: https://github.com/psf/black
26+
:alt: Code style
27+
28+
.. image:: https://img.shields.io/pypi/dm/tf2-utils
29+
:target: https://pypi.org/project/tf2-utils/
30+
:alt: Downloads
31+
32+
``tf2-utils`` is a collection of tools and utilities for TF2 trading.
33+
Use 3rd party inventory providers, SKUs formatting, interact with various APIs, websockets and more.
34+
``tf2-utils`` is built on top of `tf2-sku <https://github.com/offish/tf2-sku>`_ and `tf2-data <https://github.com/offish/tf2-data>`_.
35+
``tf2-utils`` is a key dependency of `tf2-express <https://github.com/offish/tf2-express>`_.
36+
37+
Donate
38+
------
39+
40+
- BTC: ``bc1qntlxs7v76j0zpgkwm62f6z0spsvyezhcmsp0z2``
41+
- `Steam Trade Offer <https://steamcommunity.com/tradeoffer/new/?partner=293059984&token=0-l_idZR>`_
42+
43+
You can reach me at `Steam <https://steamcommunity.com/id/confern>`_,
44+
my `Discord server <https://discord.gg/t8nHSvA>`_
45+
or `Discord profile <https://discord.com/users/252183247843229696>`_.
46+
47+
Features
48+
--------
49+
50+
- Built-in currency picking (metal + keys) for sending offers
51+
- Interact with BackpackTF's API
52+
- Interact with PricesTF's API
53+
- Get MarketplaceTF item prices and stocks
54+
- Get SKUs directly from inventories/offers
55+
- Convert names to SKUs and vice versa
56+
- Fetch inventories using 3rd party providers or your own (avoid being rate-limited)
57+
- Listen for Backpack.TF websocket events
58+
- Listen for Prices.TF websocket events
59+
- Get item properties (``is_craft_hat``, ``get_paint``, ``get_effect`` and more)
60+
- Fetch TF2 Schema data
61+
- Convert SKU/defindex to item image URL
62+
- Calculate scrap and refined prices
63+
- Convert SteamIDs
64+
- and more...
65+
66+
Documentation
67+
-------------
68+
Documentation including usage and examples can be found `here <https://offish.github.io/tf2-utils/>`_.
69+
70+
Installing
71+
----------
72+
73+
.. code-block:: bash
74+
75+
pip install tf2-utils
76+
# or
77+
python -m pip install tf2-utils
78+
79+
Updating
80+
~~~~~~~~
81+
82+
.. code-block:: bash
83+
84+
pip install --upgrade tf2-utils tf2-sku tf2-data
85+
# or
86+
python -m pip install --upgrade tf2-utils tf2-sku tf2-data
87+
88+
89+
Development
90+
-----------
91+
92+
Testing
93+
~~~~~~~
94+
.. code-block:: bash
95+
96+
# tf2-utils/
97+
python -m unittest
98+
99+
Documentation
100+
~~~~~~~~~~~~~
101+
.. code-block:: bash
102+
103+
# tf2-utils/docs/
104+
pip install sphinx furo
105+
make clean # .\make.bat <command> on windows
106+
make html
107+
108+
When submitting a pull request, please make sure to run the tests (+ make new ones if applicable)
109+
and update the documentation. Run the code through ``black`` and ``flake8`` before submitting.
110+
111+
License
112+
-------
113+
MIT License
114+
115+
Copyright (c) 2019-2024 offish (`confern <https://steamcommunity.com/id/confern>`_)
116+
117+
Permission is hereby granted, free of charge, to any person obtaining a copy
118+
of this software and associated documentation files (the "Software"), to deal
119+
in the Software without restriction, including without limitation the rights
120+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
121+
copies of the Software, and to permit persons to whom the Software is
122+
furnished to do so, subject to the following conditions:
123+
124+
The above copyright notice and this permission notice shall be included in all
125+
copies or substantial portions of the Software.
126+
127+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
128+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
129+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
130+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
131+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
132+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
133+
SOFTWARE.
134+

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 commit comments

Comments
 (0)