GithubHelp home page GithubHelp logo

huytd / ascii-d Goto Github PK

View Code? Open in Web Editor NEW
263.0 6.0 14.0 7.04 MB

A cross-platform ASCII diagram drawing app https://web.ascii-draw.com

Home Page: https://ascii-draw.com

License: BSD 3-Clause "New" or "Revised" License

Rust 99.87% Makefile 0.10% Shell 0.03%
ascii cross-platform diagrams hacktoberfest

ascii-d's Introduction

ASCII-d

ASCII-d is a cross-platform ASCII diagram drawing application, with focus on minimal UI.

Still heavily WIP.

How to install

To install from source, you can do the following steps.

  1. Make sure you have the latest Rust compiler (stable version), and install the cargo bundle tool:
$ cargo install cargo-bundle
  1. Clone the ASCII-d source code
$ git clone https://github.com/huytd/ascii-d && cd ascii-d
  1. Run the bundle command
$ cargo bundle --release

After this step, you'll have the ASCII-d.app file inside target/release/bundle/osx folder (if you're on macOS). Just copy this file to your /Applications folder and you're done!

Development progress

See DEVLOG.md for the development progress. Or ARCHITECT.md for architecture and technical details.

Want to support this project?

It would be much appreciated if you want to make a small donation to support my work!

ko-fi

ascii-d's People

Contributors

dependabot[bot] avatar huytd avatar widcardw 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

ascii-d's Issues

Issue installing in Ubuntu 22.04

Hello,

I ran the following command in the ascii-d top directory and got the following error

cargo bundle --release

Error

Click to expand!
    Updating git repository `https://github.com/linebender/druid`
  Downloaded nu-ansi-term v0.46.0
  Downloaded once_cell v1.17.1
  Downloaded proc-macro-hack v0.5.20+deprecated
  Downloaded semver v0.11.0
  Downloaded proc-macro-nested v0.1.7
  Downloaded pest v2.1.3
  Downloaded proc-macro-crate v1.1.0
  Downloaded syn v1.0.107
  Downloaded autocfg v1.0.1
  Downloaded piet-common v0.6.2
  Downloaded pangocairo v0.16.3
  Downloaded overload v0.1.1
  Downloaded intl-memoizer v0.5.1
  Downloaded anyhow v1.0.69
  Downloaded tracing-attributes v0.1.23
  Downloaded time v0.3.19
  Downloaded slab v0.4.5
  Downloaded type-map v0.4.0
  Downloaded unic-bidi v0.9.0
  Downloaded unic-ucd-bidi v0.9.0
  Downloaded bytemuck v1.7.2
  Downloaded atk v0.16.0
  Downloaded rustc-hash v1.1.0
  Downloaded instant v0.1.12
  Downloaded libc v0.2.104
  Downloaded crc32fast v1.3.0
  Downloaded heck v0.4.1
  Downloaded futures-core v0.3.17
  Downloaded glib-macros v0.16.3
  Downloaded gtk-sys v0.16.0
  Downloaded piet v0.6.2
  Downloaded pangocairo-sys v0.16.3
  Downloaded gdk-pixbuf-sys v0.16.3
  Downloaded pango v0.16.5
  Downloaded futures-executor v0.3.17
  Downloaded gdk-pixbuf v0.16.7
  Downloaded pango-sys v0.16.3
  Downloaded gio v0.16.7
  Downloaded gdk-sys v0.16.0
  Downloaded image v0.24.5
  Downloaded glib-sys v0.16.3
  Downloaded futures-macro v0.3.17
  Downloaded futures-io v0.3.17
  Downloaded cfg-expr v0.11.0
  Downloaded atk-sys v0.16.0
  Downloaded fluent-syntax v0.11.0
  Downloaded cairo-sys-rs v0.16.3
  Downloaded cairo-rs v0.16.7
  Downloaded futures-channel v0.3.17
  Downloaded memoffset v0.6.4
  Downloaded gio-sys v0.16.3
  Downloaded sharded-slab v0.1.4
  Downloaded gtk3-macros v0.16.0
  Downloaded unic-common v0.9.0
  Downloaded toml v0.5.8
  Downloaded fnv v1.0.7
  Downloaded thiserror-impl v1.0.30
  Downloaded pin-project-lite v0.2.9
  Downloaded tracing-subscriber v0.3.16
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded unic-langid-impl v0.9.0
  Downloaded smallvec v1.10.0
  Downloaded pin-utils v0.1.0
  Downloaded png v0.17.7
  Downloaded ucd-trie v0.1.3
  Downloaded unic-char-range v0.9.0
  Downloaded thiserror v1.0.30
  Downloaded intl_pluralrules v7.0.1
  Downloaded serde v1.0.130
  Downloaded system-deps v6.0.3
  Downloaded semver-parser v0.10.2
  Downloaded unicode-segmentation v1.10.1
  Downloaded unic-langid v0.9.1
  Downloaded kurbo v0.9.0
  Downloaded version_check v0.9.3
  Downloaded xi-unicode v0.3.0
  Downloaded num-traits v0.2.14
  Downloaded unic-ucd-version v0.9.0
  Downloaded field-offset v0.3.4
  Downloaded rustc_version v0.3.3
  Downloaded lazy_static v1.4.0
  Downloaded unic-char-property v0.9.0
  Downloaded piet-cairo v0.6.2
  Downloaded num-rational v0.4.1
  Downloaded tracing v0.1.37
  Downloaded futures-util v0.3.17
  Downloaded futures-task v0.3.17
  Downloaded arrayvec v0.7.1
  Downloaded tracing-core v0.1.30
  Downloaded tinystr v0.3.4
  Downloaded time-core v0.1.0
  Downloaded proc-macro-error v1.0.4
  Downloaded num-integer v0.1.44
  Downloaded glib v0.16.7
  Downloaded matches v0.1.9
  Downloaded gdk v0.16.2
  Downloaded pkg-config v0.3.20
  Downloaded gtk v0.16.2
  Downloaded thread_local v1.1.7
  Downloaded keyboard-types v0.6.2
  Downloaded gobject-sys v0.16.3
  Downloaded self_cell v0.10.2
  Downloaded fluent-langneg v0.13.0
  Downloaded fluent-bundle v0.15.2
  Downloaded version-compare v0.1.1
  Downloaded 105 crates (5.5 MB) in 1.49s
error: package `glib-sys v0.16.3` cannot be built because it requires rustc 1.63 or newer, while the currently active rustc version is 1.61.0
error: Result of `cargo build` operation was unsuccessful: exit status: 101

System details

Click to expand!

Ubuntu Version

PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

</details>

Failed to create icon files during installation

Hello,

I ran the cargo bundle command as follows

cargo bundle --release

Which generated the following logs and exited with exit code 1

Details
$ cargo bundle --release
   Compiling glib-sys v0.16.3
   Compiling gobject-sys v0.16.3
   Compiling gio-sys v0.16.3
   Compiling proc-macro-crate v1.1.0
   Compiling futures-macro v0.3.17
   Compiling proc-macro-error v1.0.4
   Compiling thiserror v1.0.30
   Compiling futures-channel v0.3.17
   Compiling smallvec v1.10.0
   Compiling glib-macros v0.16.3
   Compiling pango-sys v0.16.3
   Compiling futures-util v0.3.17
   Compiling cairo-sys-rs v0.16.3
   Compiling cfg-if v1.0.0
   Compiling gio v0.16.7
   Compiling gdk-sys v0.16.0
   Compiling futures-executor v0.3.17
   Compiling atk-sys v0.16.0
   Compiling num-traits v0.2.14
   Compiling ucd-trie v0.1.3
   Compiling futures-io v0.3.17
   Compiling crc32fast v1.3.0
   Compiling glib v0.16.7
   Compiling pest v2.1.3
   Compiling gdk-pixbuf-sys v0.16.3
   Compiling num-integer v0.1.44
   Compiling adler v1.0.2
   Compiling miniz_oxide v0.6.2
   Compiling semver-parser v0.10.2
   Compiling num-rational v0.4.1
   Compiling unic-char-range v0.9.0
   Compiling unic-common v0.9.0
   Compiling unic-ucd-version v0.9.0
   Compiling unic-char-property v0.9.0
   Compiling flate2 v1.0.25
   Compiling semver v0.11.0
   Compiling pangocairo-sys v0.16.3
   Compiling gtk-sys v0.16.0
   Compiling tinystr v0.3.4
   Compiling unic-langid-impl v0.9.0
   Compiling rustc_version v0.3.3
   Compiling png v0.17.7
   Compiling unic-ucd-bidi v0.9.0
   Compiling memoffset v0.6.4
   Compiling color_quant v1.1.0
   Compiling byteorder v1.4.3
   Compiling bytemuck v1.7.2
   Compiling arrayvec v0.7.1
   Compiling matches v0.1.9
   Compiling cairo-rs v0.16.7
   Compiling kurbo v0.9.0
   Compiling unic-bidi v0.9.0
   Compiling image v0.24.5
   Compiling field-offset v0.3.4
   Compiling unic-langid v0.9.1
   Compiling piet v0.6.2
   Compiling tracing-core v0.1.30
   Compiling gtk v0.16.2
   Compiling unicode-segmentation v1.10.1
   Compiling rustc-hash v1.1.0
   Compiling xi-unicode v0.3.0
   Compiling type-map v0.4.0
   Compiling pango v0.16.5
   Compiling gdk-pixbuf v0.16.7
   Compiling atk v0.16.0
   Compiling pangocairo v0.16.3
   Compiling piet-cairo v0.6.2
   Compiling gdk v0.16.2
   Compiling gtk3-macros v0.16.0
   Compiling anyhow v1.0.69
   Compiling tracing-attributes v0.1.23
   Compiling time-core v0.1.0
   Compiling overload v0.1.1
   Compiling lazy_static v1.4.0
   Compiling druid-shell v0.8.0 (https://github.com/linebender/druid#115e46c5)
   Compiling sharded-slab v0.1.4
   Compiling tracing v0.1.37
   Compiling nu-ansi-term v0.46.0
   Compiling time v0.3.19
   Compiling piet-common v0.6.2
   Compiling intl-memoizer v0.5.1
   Compiling intl_pluralrules v7.0.1
   Compiling fluent-langneg v0.13.0
   Compiling instant v0.1.12
   Compiling thread_local v1.1.7
   Compiling fluent-syntax v0.11.0
   Compiling keyboard-types v0.6.2
   Compiling self_cell v0.10.2
   Compiling fluent-bundle v0.15.2
   Compiling tracing-subscriber v0.3.16
   Compiling druid-derive v0.5.0 (https://github.com/linebender/druid#115e46c5)
   Compiling fnv v1.0.7
   Compiling druid v0.8.2 (https://github.com/linebender/druid#115e46c5)
   Compiling ascii-d v0.2.0 (/home/alexiswl/GitHub/HUYTD/ascii-d)
warning: unused imports: `Code`, `Event`
 --> src/main.rs:4:44
  |
4 |     AppDelegate, AppLauncher, Application, Code, Command, DelegateCtx, Env, Event, Handled,
  |                                            ^^^^                             ^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `Application`
 --> src/widgets/toolbar.rs:7:5
  |
7 |     Application, Color, Event, FileDialogOptions, FileInfo, FileSpec, ImageBuf, Point, Rect,
  |     ^^^^^^^^^^^

warning: unused variable: `data`
  --> src/main.rs:92:9
   |
92 |         data: &mut ApplicationState,
   |         ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `env`
  --> src/main.rs:93:9
   |
93 |         env: &Env,
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_env`

warning: unused variable: `ctx`
  --> src/main.rs:94:9
   |
94 |         ctx: &mut DelegateCtx,
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`

warning: unused variable: `handle`
   --> src/main.rs:108:9
    |
108 |         handle: druid::WindowHandle,
    |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_handle`

warning: unused variable: `data`
   --> src/main.rs:109:9
    |
109 |         data: &mut ApplicationState,
    |         ^^^^ help: if this is intentional, prefix it with an underscore: `_data`

warning: unused variable: `env`
   --> src/main.rs:110:9
    |
110 |         env: &Env,
    |         ^^^ help: if this is intentional, prefix it with an underscore: `_env`

warning: unused variable: `ctx`
   --> src/main.rs:111:9
    |
111 |         ctx: &mut DelegateCtx,
    |         ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`

warning: unused variable: `target`
   --> src/main.rs:119:9
    |
119 |         target: Target,
    |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_target`

warning: unused variable: `data`
   --> src/main.rs:121:9
    |
121 |         data: &mut ApplicationState,
    |         ^^^^ help: if this is intentional, prefix it with an underscore: `_data`

warning: unused variable: `env`
   --> src/main.rs:122:9
    |
122 |         env: &Env,
    |         ^^^ help: if this is intentional, prefix it with an underscore: `_env`

warning: constant `CHAR_NEWLINE` is never used
  --> src/consts.rs:27:11
   |
27 | pub const CHAR_NEWLINE: char = '\n';
   |           ^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: associated function `newline` is never used
  --> src/data/grid_cell.rs:23:12
   |
23 |     pub fn newline() -> Self {
   |            ^^^^^^^

warning: `ascii-d` (bin "ascii-d") generated 14 warnings
    Finished release [optimized] target(s) in 1m 41s
    Bundling ascii-d_0.2.0_amd64.deb
error: Failed to create icon files
  Caused by: element to be decoded contains JPEG 2000 data, which is not yet supported

System details

Click to expand!

Ubuntu Version

PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

The Upper arrow and Down arrow are not shown properly

The arrow symbols is like a question mark.

image

In src/consts.rs, it is not shown correctly. The font of my iterm2 is JetBrains Mono.

image

However, I tried to translate the triangles into char code.

// In JavaScript
String.fromCharCode(9660)  // '▼'
String.fromCharCode(9650)  // '▲'
String.fromCharCode(9664)  // '◀'
String.fromCharCode(9654)  // '▶'

image

In the app, there still remain some gap, but it's much better. But is it intended to change into 🭯 so that this would narrow the gap?

image

The ASCIIflow project also shows that the char code of is 9650.

image

By searching the unknown symbol 🭯, I found it on symbl, and it is named Upper Triangular One Quarter Block. But if we do not have the font, it will not show correctly.

How to build?

@huytd Is there any pre-build file that I can download and just run on my Mac or any INSTALL.md for self-build guidelines?

Since I'm not a Rust user, it would be easier for me if there is a step-by-step INSTALL.md.

Thanks!

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.