GithubHelp home page GithubHelp logo

hermantenuki / ascii-generator.site Goto Github PK

View Code? Open in Web Editor NEW
267.0 267.0 30.0 19.55 MB

Django website for generating ASCII-arts out of images or text ๐ŸŽจ

Home Page: https://ascii-generator.site

License: MIT License

Python 96.10% Less 1.19% JavaScript 1.34% HTML 1.37%
ascii ascii-art ascii-generator ascii-graphics django python website

ascii-generator.site's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar hermantenuki avatar sujaldev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ascii-generator.site's Issues

Handle image deletion in "_images/temporary" folder

For now, if image is deleted on server in "_images/temporary/" folder, but user still have it opened, settings will no more work and all will be frozen without any errors displaying. This looks not right.
(Images are auto-deleting in 24-25 hours after upload).

FR: Add color

Color output would be useful, especially if it enables copying shell formatting.

Can't change website's language when on url with language code

If user is on page with language code in url, like ascii-generator.site/ru/about/ - he can't change language manually with buttons in lower right corner.

P.S. Also when submitting ascii-generator.site/ru link with language code - it's working, but there is no / slash at the end.

Broken link to Feedback page on About page

{% url 'feedback_url' as URL_feedback_url %}
...
<a href="{{ URL_feedback_url }}">Feedback</a>

Leads to "About" page.

Maybe it's because first line out of {% block content %}, when last ins't.

Twitch mode

Additional "Twitch mode" checkbox under image and text generators, so output arts can perfectly fill twitch chat (for the pastas).

Numba is slow on single core CPU

In #39 numba was added to img2ascii generators.

On 4 cores system it is improving speed by 100%-300%, while on single-core system it actually works with 70%-100% speed.

Numba is disabled by default in project/settings.py, can be enabled with environment variable NUMBA = "True".

Need to improve this situation and make a project faster with numba on different configs without getting a lot of unstable problems and warnings.

Cache is not working properly

Image to ASCII generator is working with caching to optimize "share" functionality and overall generator's usage.

On a server, for some unknown reason, it's working randomly and it can sometimes don't write in cache and can sometimes don't read from cache.

Locally it works fine.

Possible reasons:

  • Default locmem cache - maybe should try memcached;
  • Low amount of memory on a server - 512mb.

Reorganize requirements.txt

requirements.txt needs to contain only minimal-needed modules to run website locally, the other file requirements_dev.txt needs to contain all modules.

Cache is not working properly

Image to ASCII generator is working with caching to optimize "share" functionality and overall generator's usage.

On a server, for some unknown reason, it's working randomly and it can sometimes don't write in cache and can sometimes don't read from cache.

Locally it works fine.

Possible reasons:

  • Default locmem cache - maybe should try memcached;
  • Low amount of memory on a server - 512mb.

Issue with Chromium browsers displaying Unicode-blocks poorly

For some reason, chromium rendering Unicode-blocks poorly regardless of what font is used.

If we try to create art with Unicode-blocks in a monospace font, chromium will always leave some weird lines between symbols.

For example, let's compare Google Chrome and Firefox browsers:

Screenshot_4
Google Chrome

Screenshot_5
Firefox Browser

I improved this issue by detecting Chromium in JavaScript and applying some styling:

if (window.chrome) {
    art_div.css({
        'letter-spacing': '-0.1em',
        'line-height': '1.2em',
        'transform': 'scale(1.2, 1) translateX(8%)'
    });
}

Let's look again at the examples:

Screenshot_6
Google Chrome (with styling fixes)

Screenshot_5
Firefox Browser again

Now you can see that situation is a lot better, but Chromium still displaying art differently. If you look at the letters in both arts (especially "b"), Chromium's blocks are blurring or, like, floating to the upper side.

Optimize database savings/calls for ASCII arts

For now, when arts is being saved, all the generated ASCII results is being saved separately in different row in database. So, for the Text to ASCII generator we need to save 300+ different rows separately, so as when we need to load them - we need to request 300+ different rows.

That's not optimized at all, need to migrate to some new DB structure, where all arts is saved in one row in some array or JSON form.

Minify css static

Due to LESS being used, there is no reason to keep not-minified compiled CSS code

Can't reupload same image in "Image to ASCII"

Steps:

  1. Upload some picture.png to "Image to ASCII";
  2. Press "New Image" button;
  3. Try to upload same picture.png.

In these steps, nothing will happen at the end. Image won't be uploaded.
If you will try to upload other_picture.png at the step 3, it will work normally.

Need to fix it by re-uploading image or just opening last already rendered result (maybe it would be better).

Website is down?

I have loved using the generator but it seems like for the last two days the site is down?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.