Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions combogen/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

class Config(object):
def __init__(self, path):
with open(path) as f:
with open(path, encoding="utf-8") as f:
self._config = json.load(f)

self._translations = dict()
for file in os.listdir(TRANSLATIONS_DIR):
if (file.endswith(".json")):
lang = file.split(".")[0].lower()

with open(os.path.join(TRANSLATIONS_DIR, file)) as f:
with open(os.path.join(TRANSLATIONS_DIR, file), encoding="utf-8") as f:
self._translations[lang] = json.load(f)

@property
Expand Down Expand Up @@ -110,4 +110,4 @@ def translate_interaction(self, lang, interaction):
return self._translations[lang.lower()]['interactions'][interaction.lower()]
except KeyError:
print("{} translation for {} not found".format(lang, interaction))
return interaction
return interaction
4 changes: 2 additions & 2 deletions combogen/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from combogen.ChartGenerator import ChartGenerator, PROJECT_ROOT, TEMPLATE_ROOT, TRANSLATIONS_ROOT, TOOLS_ROOT
from combogen.ChartGenerator import ChartGenerator, PROJECT_ROOT, TEMPLATE_ROOT, TRANSLATIONS_ROOT, TOOLS_ROOT
from combogen.Config import Config

import os
Expand Down Expand Up @@ -37,7 +37,7 @@

htmlChartPath = os.path.join(HTML_PATH, 'drug-combinations-{}.html'.format(lang))

with open(htmlChartPath, 'w+') as f:
with open(htmlChartPath, 'w+', encoding='utf-8') as f:
f.write(chart)

print('Generating PNG for {}'.format(lang))
Expand Down
4 changes: 2 additions & 2 deletions combogen/templates/combo-chart-full.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ <h1 id="title">{{ cfg.translate(lang, "title") }}</h1>
{% include "combo-table.html" %}
<footer>
<div class="qr">
<img src="{{ cfg.rel_resources_path }}/img/mobile_combo_app_qr.svg" alt="app">
<img src="{{ cfg.rel_resources_path }}/img/website_qr.svg" alt="app">
<h3>{{ cfg.translate(lang, "app") }}</h3>
</div>
<div id="disclaimer">{% include "disclaimer-" + lang + ".html" %}</div>
<div id="legend">
{% include "legend.html" %}
</div>
<div class="qr">
<img src="{{ cfg.rel_resources_path }}/img/support_qr.svg" alt="support">
<img src="{{ cfg.rel_resources_path }}/img/app_qr.svg" alt="support">
<h3>{{ cfg.translate(lang, "support") }}</h3>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Marihuana",
"ketamine": "Ketamin",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Oxid dusný",
"amphetamines": "Amfetaminy",
"mdma": "MDMA",
Expand Down
13 changes: 6 additions & 7 deletions combogen/translations/disclaimer-en.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<h4>For further information and live help, visit <a href="https://www.tripsit.me">www.TripSit.Me</a></h4>

This table was compiled by TripSit using the best information available. <b>Accuracy is not guaranteed.</b>
This table is only as valid as the labels on your drugs: <b>Always use a test kit.</b>
Absence of a warning does not imply an absence of danger. <b>Further research is necessary.</b>
This chart has been developed by the TripSit.me team and is based on the best available scientific research and experience reports. It is intended to serve as a <b>quick reference guide, and further research is always recommended</b>, especially for individuals with medical conditions, taking medications, or with related predispositions. When mixing substances, it is important to remember that many of them can have additive effects and it is best to start with lower doses.

Do not rely solely on this chart. <b>While taking certain medications,</b> your risk is higher.
Do your homework now to avoid problems later. <b>Be safe out there.</b> No one is invincible.
Interactions for DXM, DPH, and pregabalin are presented in the context of recreational use, and some <b>interactions may differ when taken at therapeutic doses.</b>

For detailed descriptions, sources, and further information, visit https://combo.tripsit.me/

For additional harm reduction information, including dosages, durations, and drug information, visit https://drugs.tripsit.me/
9 changes: 6 additions & 3 deletions combogen/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Guide to Drug Combinations",
"app": "www.TripSit.Me",
"support": "Support Us",
"support": "Android App",
"drugs": {
"lsd": "LSD",
"mushrooms": "Mushrooms",
Expand All @@ -15,17 +15,20 @@
"cannabis": "Cannabis",
"ketamine": "Ketamine",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"diphenhydramine": "DPH",
"nitrous": "Nitrous",
"amphetamines": "Amphetamines",
"mephedrone": "4-MMC",
"mdma": "MDMA",
"cocaine": "Cocaine",
"caffeine": "Caffeine",
"alcohol": "Alcohol",
"ghb/gbl": "GHB/GBL",
"opioids": "Opioids",
"tramadol": "Tramadol",
"benzodiazepines": "Benzos",
"benzodiazepines": "Benzodiazepines",
"lithium": "Lithium",
"maois": "MAOIs",
"ssris": "SSRIs"
},
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Cannabis",
"ketamine": "Ketamine",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Nitrous",
"amphetamines": "Amphetamines",
"mdma": "MDMA",
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Cannabis",
"ketamine": "Ketamina",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Oxido Nitroso",
"amphetamines": "Anfetaminas",
"mdma": "MDMA",
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Cannabis",
"ketamine": "Kétamine",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Gaz hilarant",
"amphetamines": "Amphétamines",
"mdma": "MDMA",
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Cannabis",
"ketamine": "Ketamina",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Nitroso",
"amphetamines": "Anfetamine",
"mdma": "MDMA",
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Konopie indyjskie",
"ketamine": "Ketamina",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Podtlenek azotu",
"amphetamines": "Amfetaminy",
"mdma": "MDMA",
Expand Down
2 changes: 1 addition & 1 deletion combogen/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cannabis": "Марихуана",
"ketamine": "Кетамин",
"mxe": "MXE",
"dxm": "DXM",
"dextromethorphan": "DXM",
"nitrous": "Веселящий газ",
"amphetamines": "Амфетамины",
"mdma": "MDMA",
Expand Down
12 changes: 8 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"url": "https://github.com/TripSit/drugs/blob/main/combos.json",
"version": "5.0.0",
"url": "https://raw.githubusercontent.com/TripSit/drugs/main/combos.json",
"version": "5.0.1",
"tableOrder": [
[
"LSD",
Expand All @@ -17,11 +17,13 @@
[
"Ketamine",
"MXE",
"DXM",
"Dextromethorphan",
"Diphenhydramine",
"Nitrous"
],
[
"Amphetamines",
"Mephedrone",
"MDMA",
"Cocaine",
"Caffeine"
Expand All @@ -34,6 +36,8 @@
"Benzodiazepines"
],
[
"Pregabalin",
"Lithium",
"MAOIs",
"SSRIs"
]
Expand All @@ -60,7 +64,7 @@
},
"chart": {
"width": 3910,
"height": 1730,
"height": 1675,
"htmlRelativeResources": "../../resources"
}
}
Loading