Coder Social home page Coder Social logo

aacircuit's Introduction

    _        _    ____ _                _ _     ____        
   / \      / \  / ___(_)_ __ ___ _   _(_) |_  |  _ \ _   _ 
  / _ \    / _ \| |   | | '__/ __| | | | | __| | |_) | | | |
 / ___ \  / ___ \ |___| | | | (__| |_| | | |_  |  __/| |_| |
/_/   \_\/_/   \_\____|_|_|  \___|\__,_|_|\__| |_|    \__, |
                                                      |___/ 
                                            

Draw electronic circuits with ASCII characters.
                                                                        
                                                                        
         .---------------------o--------------o---o +1.5V               
         |                     |              |                         
         |                     |              |                         
        .-.         ||100n     |             .-.                        
        | |    .----||----.    |             | |                        
       100k    |    ||    |    |             | |1k                      
        '-'    |    ___   |  |<              '-'                        
         |     o---|___|--o--|                |                         
         |     |    1k       |\               |                         
         |   |/                |              |                         
         o---|                 |              |                         
    L    |   |>                |              |                         
    E    |     |               |              |                         
    D    |     |    \]         |     \]       |                         
         '-----)----|]---------o-----|]-------o                         
    B          |    /]+        |     /]+      |                         
    l          |    10µ       .-.    100µ     |                         
    i          |              | |             |                         
    n          |              | |47Ω          V ->                      
    k          |              '-'             -                         
    e          |               |              |                         
    r          '---------------o--------------o---o GND                 
                                                                        

This is a pythonized version of (Borland Delphi) AACircuit (by Andreas Weber).
A kind of reverse engineered version, where the idea and GUI layout are taken from the original.

For the ASCII representation, use copy or "Save ASCII". Use a monospaced font in your document, news- or mailclient!

Component library: User components are read from optional file components/user_component_x.json (x=1..5)
Every symbol has to be created for all four directions (N/E/S/W).


Usage
=====
Download the zip-file, unzip, go to the AACircuit directory and run: python aacircuit.py


Dependencies
============
Python3
xerox
pypubsub
bresenham
Gtk+ 3


Windows
============
use pacman if prefer to list full architecture
package explicitly (e.g. i686, x86_64 on msys2)

pacboy -S gtk3 python-pywin32 python-gobject
pip install xerox pypubsub bresenham

Original: https://github.com/Andy1978/AACircuit

aacircuit's People

Contributors

blokkendoos avatar mightymos 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

aacircuit's Issues

Dockerize for portability

I love this project. I love how pleasant Python can make life. I have strong negative feelings against Python dependency/package/version management. Docker is a wonderful technology. Docker and Python belong together. This project deserves to be run on all machines regardless of how badly pip has made a mess of things :)

I am working on a container now. Will make Pull request with Dockerfile when ready

use auto-display features like asciigrid

Hi,

I was wondering if there was any interest in generating more appealing circuit representations as they are shown in the asciigrid application. Please see the example:

image

It shows

  • left: the original ASCII text (blocks and other elements made from plain ascii characters)
  • right: the resulting circuit as an SVG image (dynamically rendered from the original ASCII)

Under the hood, asciigrid uses Svgbob to render the ASCII structures.

asciigrid provides a nice text editor within the web. But for display of electronics it is lacking the ability to pre-create and use dedicated circuit elements (resistors, capacitors, ... within an element library) as aacircuitpy does. So, in order to connect aacircuitpy with asciigrid, either side would have to modify its code base. The easiest would be if within aacircuitpy a modified element library would be created / provided. This modified library would have to fit to the format specifications which allow asciigrid to render the ascii elements into correct SVG.

What do you think? Would a connection to asciigrid be interesting to the developers, here?

Of course,,there are many other technical requirements which would have to be implemented in order for the connection to become smooth. This is just an idea... ;-) are there plans to improve aacircuitpy?

structural information about aacircuitpy

Hi,

I would be interested in the structure of aacircuitpy. Are there any structural diagrams, concept maps, ... which could be read in order to quicker understand the application structure?

  • overview about what is done in which code module
  • connections between code modules
  • usage of external functionalities
  • ...

of course, a real software developer would read the code modules and build something like this within his head, but maybe there are some structure sketches you could provide?

Can't get it to run on Windows 10

I'm eager to try this, but after installing the latest Python (3.11) and trying to run it, I get the following error. Am I doing something wrong?

C:\PortableApps\AACircuit-master>python aacircuit.py Traceback (most recent call last): File "C:\PortableApps\AACircuit-master\aacircuit.py", line 11, in <module> from application.controller import Controller File "C:\PortableApps\AACircuit-master\application\controller.py", line 9, in <module> import xerox ModuleNotFoundError: No module named 'xerox'

Thanks!

architecture overview for easier contribution

Hi @Blokkendoos,

this application is still very interesting, although there will be more modern approaches to electronics design and management. For minimalists and ASCII lovers within this domain, AACircuit and AACircuitPy could do a great job. Only, there is this great difficulty when trying to provide a working installation on Windows OS.

In order to more easily be able to understand this Python code base and possibly be able to identify parts which could be replaced by the usage of more unproblematic packages, a system overview would be great. This overview would have to show which package is used at which point within the application to do what task. So, other developers would have a chance to more easily grasp the system architecture and apply valuable changes by replacing parts.

What do you think?

I would love to help creating such an overview, if necessary, but finding my way through the code base myself (without support from the maintainer) is too time consuming.

Trying to run on Windows

I'm attempting to run on windows. I believe I have all the dependencies installed but when I try running
python AACircuit.py
I get the following:
Traceback (most recent call last): File "C:\Users\mitch\Documents\GitHub\AACircuit\AACircuit.py", line 11, in <module> from application.controller import Controller File "C:\Users\mitch\Documents\GitHub\AACircuit\application\controller.py", line 13, in <module> from locale import gettext as _ ImportError: cannot import name 'gettext' from 'locale' (C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\locale.py)

dependencies to make aacircuitpy run on Linux

Hi,

I'd love to try AACircuitPy on Linux. I learned that installing and running it on Windows seems to be too difficult (at least for a "normal" person without extensive system knowledge). But on Linux, I thought, this would be easier...

This is what I've tried so far:

# prepare the virtual environment
cd ~
python3 -m venv ENV__aacircuit__py37
source ENV__aacircuit__py37/bin/activate

# install dependencies
pip install xerox      # v0.4.1 gets installed
pip install pypubsub   # v4.0.3 gets installed
pip install bresenham  # v0.2.1 gets installed

# get the sources
git clone https://github.com/Blokkendoos/AACircuit.git APP__aacircuit

# walk into project folder and try it
cd APP__aacircuit
python aacircuit.py

unfortunately, this seems to lead to a missing module "gi", so ...

# install further dependency
pip install gi   # results in installation of
                 # certifi v2022.12.7
                 # charset-normalizer v2.1.1
                 # gi v1.2
                 # idna v3.4
                 # requests v2.28.1
                 # urllib3 v1.26.13

# try to execute
python aacircuit.py

now, the newly installed gi package shows an error which stems from a Python v2 statement print url (missing parentheses). Before I try to re-work the gi source code, I'd rather like to ask a question, here ;-) .

could someone drop some lines of bash commands in order for others to be successful? I tried on a RaspberryPi, using Python v3.7 . Can anybody help me?

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.