تولید اسم های رندوم فینگیلیش

Overview

karafs کرفس

تولید اسم های رندوم فینگیلیش

installation

➜ pip install karafs

usage

دو زبانه

➜ karafs -n 10
توت فرنگی بی ناموس
toot farangi-ye bi_namoos
غورهٔ خسته
ghoore-ye khaste
انار زره پوش
anaar-e zereh push
انگور سر سپرده
angoor-e sar sepordeh
زلزلک نادان
zalzalak-e naadaan
سیب ورپریده
sib-e varparideh
فندق عقدهای
fandogh-e oghde_ee
گریپ فروت قزمیت
grip froot-e ghozmit
نارگیل پرورده
nargil-e parvardeh
تن ماهی تافته
ton maahi-ye tafteh

فقط انگلیسی

➜ karafs -n 10 -en
shaftaaloo-ye boland parvaz
baalang-e khoshhal
porteghal-e foroo_heshteh
piyaz-e oghde_ee
fandogh-e afsordeh
gheisi-e kar azmoodeh
piyaz-e gomashteh
limoo shirin-e zhoolideh
senjed-e tafteh
ananas-e khafan

فقط فارسی

➜ karafs -n 10 -fa

کیوی شارلاتان
لوبیا چیتی چابک
نوشابهٔ مفلس
تن ماهی اسکل
انار آلوده
انجیر پرورده
توت خسته
خیار رهیده
کمبوزهٔ شراب زده
گلابی فرسوده

option -n

با این آپشن میتونید تعداد دفعات تولید اسم رندوم رو مشخص کنید. اگر تنظیمش نکنید به طور پیشفرض تعداد 1 در نظر گرفته میشه.

➜ karafs -n 5

option --no-space

با این آپشن میتونید خروجی رو بدون فاصله بین کلمات بگیرین:

➜ karafs --no-space -n 10

use as library

شما میتونید کرفس رو به عنوان یک کتابخانه توی برنامه هاتون استفاده کنید.

import karafs

print(karafs.gen_str()) # generate a random name (finglish)
print(karafs.gen_str('fa')) # generate a random name (persian)

print(karafs.gen_str_without_space()) # generate a random name without whitespace (finglish)
print(karafs.gen_str_without_space('fa')) # generate a random name without whitespace (persian)
Comments
  • استفاده به عنوان کتابخانه

    استفاده به عنوان کتابخانه

    در حال حاضر میشه این ابزار رو فقط توی خط فرمان استفاده کرد. @iamvee ایده ای برای اینکه مثلا بشه ایمپورتش کرد و اسم های رندوم رو تو برنامه استفاده کرد نداری؟

    enhancement 
    opened by parsampsh 2
  • Some cleanups

    Some cleanups

    Hi there. I maked this changes:

    • added docstring for main
    • removed from secrets import choice because function choice is declared
    • added docstring for function choice
    • fixed some trailing whitespaces
    • cleanup function gen
    • added .gitignore
    opened by parsampsh 2
  • Use as library

    Use as library

    فایل bin/karafs رو به karafs/karafs.py منتقل کردم. و توی bin/karafs هم کرفس رو ایمپورت کردم و اجراش کردم. اینجوری بقیه هم میتونن خارج از خط فرمان تو کدشون استفادش کنن. تست مست و داکیمونت هم براش اضافه کردم. (#9)

    همچنین میتونن اینجوری هم رانش کنن:

    $ python3 -m karafs
    
    opened by parsampsh 1
  • Add GitHub workflow

    Add GitHub workflow

    I Added github workflow for running the tests. But there is a problem in Windows (I think its related to printing persian letters in the terminal). I disabled windows.

    opened by parsampsh 0
  • Cleanup

    Cleanup

    • removed unused random import
    • added docstrings
    • fix some trailing whitespaces
    • handle using function gen
    • some small refactors
    • downgrade python version to 3.6 in setup.py (this also works in 3.6)
    opened by parsampsh 0
  • Update karafs.py - replace some underlines with dashes

    Update karafs.py - replace some underlines with dashes

    Hi, I replaced some underlines in adjectives with dashes, because it was returning some names containing both underline and dash and it was not beautiful. (for example: hendoone-ye-afsordeh_sima)

    opened by erfansaberi 0
Releases(v0.1)
Owner
Vaheed NÆINI (9E)
جالینوکس   𝚊𝚕𝚒𝚊𝚜 𝚎="𝚎𝚖𝚊𝚌𝚜 -𝚗𝚠"
Vaheed NÆINI (9E)