Coder Social home page Coder Social logo

Comments (4)

scrouthtv avatar scrouthtv commented on June 8, 2024

Do you only want to export what is currently visible on screen?

Recently, I added GetCell, which allows for reading a single cell from the screen. The easiest way for API users would be something like this:

w, h := termbox.Size()

for x := 0; x < w; x++ {
  for y := 0; y < h; y++ {
    file.Write(termbox.GetCell(x, y).Ch)
  }
  file.Write('\n')
}

If you're familiar with Go, you could simply clone sc and implement the functionality yourself.
If you're not, let me know and I'll do it

from termbox-go.

scrouthtv avatar scrouthtv commented on June 8, 2024

Try cloning https://github.com/scrouthtv/sc, checking out feature/save and running it. If you press W, it exports the current screen to /tmp/hello.

Is this kind of what you want?

from termbox-go.

pedroalbanese avatar pedroalbanese commented on June 8, 2024

Hi, I greatly appreciate the speed in replying.
Briefly, in the original SC there is a function that prints only the calculated table in plain text (https://www.linuxjournal.com/article/10699). The sc tool in golang is great, but it prevents us from exporting calculations. The author does not intend to implement..

I need more precisely the W command from the original SC program, to save the precomputed table. I'm not a Linux user and I'm new to Go, I needed this to run on Android and Windows which I can't cross-compile the C version for because of libncurses..

Thanks!

from termbox-go.

scrouthtv avatar scrouthtv commented on June 8, 2024

You want to export the entire spreadsheet / table that is currently opened - including content that is currently off-screen?

So basically you want sc's P command, but the exported file should contain the calculated values and not their formulas.

This repository is about termbox, a Go alternative to ncurses. Your issue is more of an issue with sc, let's move over there.

from termbox-go.

Related Issues (20)

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.