https://github.com/phaticusthiccy/carbon-api
Unofficial API For carbon.now.sh
https://github.com/phaticusthiccy/carbon-api
carbon carbon-api
Last synced: 11 months ago
JSON representation
Unofficial API For carbon.now.sh
- Host: GitHub
- URL: https://github.com/phaticusthiccy/carbon-api
- Owner: phaticusthiccy
- License: bsd-3-clause
- Created: 2021-02-26T00:41:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-06T20:21:22.000Z (about 5 years ago)
- Last Synced: 2025-05-18T06:36:04.719Z (about 1 year ago)
- Topics: carbon, carbon-api
- Language: Python
- Homepage: https://thiccyscarbonapi.herokuapp.com/?code=Thiccy's+Carbon+API&language=Bash&theme=panda&exportSize=3x
- Size: 39.1 KB
- Stars: 11
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Carbon-API
---
[](https://t.me/phaticusthiccy)
> Carbon, girdiğiniz metni kod fotoğrafına dönüştürür.
#### Kullanımı
| Parametre | Varsayılan | Tür | Açıklama |
| ---------------------- | -------------------------- | ------- | ------------------------------------------------------------ |
| `code` (Gerekli) | `hernangi bir metin` | string | Fotoğrafın içindeki yazıyı belirler. |
| `backgroundColor` | `"rgba(171, 184, 195, 1)"` | string | Arkaplan RGB rengi. |
| `dropShadow` | `true` | boolean | Gölge Detayı. |
| `dropShadowBlurRadius` | `"68px"` | string | Gölge Alanı. |
| `dropShadowOffsetY` | `"20px"` | string | Gölgenin Y (Yukarı Aşağı) Konumu. |
| `exportSize` | `"2x"` | string | Fotoğrafın Kalitesini Ayarlar. `"1x"` | `"2x"` | `"3x"` |
| `fontSize` | `"14px"` | string | Yazı Boyutu |
| `fontFamily` | `"Hack"` | string | Yazı Ailesi |
| `firstLineNumber` | `1` | number | İlk Kodun Sayısı (Ayarlamak için Kod Sıra Göstergesini aç) |
| `language` | `"auto"` | string | Programlama Dili |
| `lineNumbers` | `false` | boolean | Kod Sıra Göstergesi |
| `paddingHorizontal` | `"56px"` | string | Dikey Genişlik |
| `paddingVertical` | `"56px"` | string | Yatay Genişlik |
| `theme` | `"seti"` | string | Kod Teması |
| `watermark` | `false` | boolean | Filigran Aç/Kapa |
| `widthAdjustment` | `true` | boolean | Otomatik Çözünürlüğü Aç/Kapa |
| `windowControls` | `true` | boolean | Çerçeve Görüntüsünü Aç/Kapa |
| `windowTheme` | `"none"` | string | Çerçeve Teması |
##
## Parametre Değerleri
| Parametre | Değerler |
| ---------------------- | -------------------------------|
| `backgroundColor` | `"rgba(0, 0, 0, 1)"` ile `"rgba(255, 255, 255, 1)"` arasında olabilir. |
| `dropShadow` | `true` veya `false` olabilir. |
| `dropShadowBlurRadius` | `"10px"` ile `"400px"` arasında olabilir. |
| `dropShadowOffsetY` | `"1px"` ile `"100px"` arasında olabilir. |
| `exportSize` | `"1x"` ile `"3x"` arasında olabilir. |
| `fontSize` | `"Hack"`, `"JetBrains Mono"`, `"Fira Code"`, `"Inconsolata"` vs. |
| `firstLineNumber` | Sınırı yoktur. |
| `language` | `JavaScript`, `Python`, `C`, `Go`, `Bash`, `Swift` vs. |
| `lineNumbers` | `true` veya `false` olabilir. |
| `paddingHorizontal` | `"10px"` ile `"3000px"` arasında olabilir. |
| `paddingVertical` | `"10px"` ile `"3000px"` arasında olabilir. |
| `theme` | `seti`, `blackboard`, `panda`, `twilight`, `verminal` vs. |
| `watermark` | `true` veya `false` olabilir. |
| `widthAdjustment` | `true` veya `false` olabilir. |
| `windowControls` | `true` veya `false` olabilir. |
| `windowTheme` | `none`, `sharp` ve `bw` olabilir. |
### GET `/`
Değerler Encoded Şeklinde olmalıdır. Mümkünüse HTML Encoder kullanın.
```bash
https://thiccyscarbonapi.herokuapp.com/?code=Phaticusthiccy&language=Bash&theme=darcula&backgroundColor=rgba(144,%2019,%20254,%20100)&exportSize=3x&paddingVertical=50px&paddingHorizontal=300px
https://thiccyscarbonapi.herokuapp.com/?code=Phaticusthiccy&language=JavaScript&lineNumbers=true&theme=panda&exportSize=3x&paddingVertical=50px&paddingHorizontal=300px&windowTheme=bw&dropShadowBlurRadius=200px
```

### POST `/`
Json
```json
{
"backgroundColor": "rgba(144, 19, 254, 100)",
"code": "Phaticusthiccy",
"theme": "dracula"
}
```
#### Deploy Ayarları
* **[Heroku](https://www.heroku.com/) Method**
[](https://heroku.com/deploy?template=https://github.com/phaticusthiccy/Carbon-API/tree/main)
* **Diğer Method**
```bash
# Repoyu Klonla
git clone https://github.com/phaticusthiccy/Carbon-API
cd Carbon-API
# 2
virtualenv -p /usr/bin/python3 venv
../venv/bin/activate
# 3
pip3 install -r requirements.txt
# Çalıştır
python3 app.py
```