simeg / eureka Goto Github PK
View Code? Open in Web Editor NEWπ‘ CLI tool to input and store your ideas without leaving the terminal
License: MIT License
π‘ CLI tool to input and store your ideas without leaving the terminal
License: MIT License
As proposed in #88, be able to create a repo during the first time setup step. This should be possible with the git2-rs library.
I really love eureka, I have a set up where I have a folder with a number of documents. The stuff I put into eureka are rough ideas, that later on I process and put into nicer documents. Sort of "scratch" or "draft" notes to nicer, more organised notes.
I'd love it if I could name it "ideas.md" or "scratch.md" and reserve the name "README.md" for a document explaining what the repository is all about.
Let's say you start inputting an idea but then change your mind, you should be able to quit eureka
by inputting exit
and q
.
I had a quick play with eureka and thought I would report my initial impressions:
During setup a relative path is accepted (probably anything even).
Then when running eureka it panics with Could not locate repo at: sdfsdf
.
If possible it might be better just to init a git repo in a default location.
Perhaps there is some cross-platform library that could help with that?
Not sure if making the branch configurable is really needed at setup time (modern git defaults to main
)?
You could also have a --clone
option to get a remote repo.
You could use ~/.eureka for configuring an alternative repo location location.
Like git commit
vs. git commit -m [msg]
. Sometimes you just want to write down something small, eureka should support this use-case as well.
After:
t_backtrace_open+0x39): more undefined references to __errno follow
there follows:
error: aborting due to previous error
error: failed to compile eureka v1.6.1
and:
Caused by:
Could not compile 'eureka'.
Attempted to update with:
C:\>cargo install eureka --force
Now you have to manually input your path, it would be nice if you could have auto-completion for this.
So the dependencies as far as I can tell are Rust and Cargo.
I would just mention that it's built using these, so people who want to install manually will be able to.
If a repo has been set you should be able to run a eureka-command to open up your ideas, instead of manually having to navigate to the repo and open the README.md.
When #16 is done, this issue can be started.
The push function still assumes that the branch name is "master." This causes a panic when saving a new idea, especially when following certain newer branch naming conventions (e.g., "main" instead of "master).
Line 49 in a8cac6d
Hello,
I was looking through the software within the ArchWiki and I found eureka did not have an AUR package for it yet, which would aid in installation on Arch based systems.
I have wrote up pretty much the entire package already, but I have run into one issue, I build and install the package, but it seems to be missing dependencies and eureka does not list dependencies needed to be installed for it to function, the follow error:
Adding and committing your new idea to main..
ERROR eureka > cannot find binary path
I need a response as soon as possible so I can push this package to the AUR (before someone else comes along and takes more of the namespace). Either respond to this issue, or email me at [email protected].
I am concerned this repository has died, as there has not been any commits to the main branch for nearly a year now, so I do hope someone sees this soon!
Have a good day.
Line 136 in 81b6a7e
most of the systems i have used are using vi for vim even on my ubuntu 18 there is nothing like vim but there is vi
in most cases user will have install vim
so i'll prefer to use /usr/bin/vi
As proposed in #88, would be nice to be able to clone an existing repo during the first time setup. Should be possible with git2-rs.
π½
Line 299 in 5c6f362
It can be a bit confusing to go straight into writing down your idea after the setup. Either add some text to describe what's going on or just say "Initial config complete, now you can use it".
Currently, the only way to interact with the readme.md file is to launch eureka that will open the editor and the commit changes and push to upstream.
It would be interesting to be able to open in read-only this file with a PAGER (like less, more, mostβ¦) to read the content. It will avoid the commit/push after closing the file.
So when you choose an editor it shows you this message:
What editor do you want to use for writing down your ideas?
1) vim (/usr/bin/vim)
2) nano (/usr/bin/nano)
3) Other (provide path to binary)
I wrote: vim
, which produced the next message:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
So, the issue for me was basically:
I was thinking to just write vim, because with option #3 (providing the path) it looked like it's a string value.
Now that I faced that problem I know I need to put the integer.
As it is now it just keeps on going and sets incorrect paths. What it should do is exit with status 1.
Line 112 in 81b6a7e
the path to nano is invalid or in other words it is not guarantee that nano will available at /usr/bin/nano
So instead of eureka just opening the README file, maybe it should create a new eureka file, and append to the README the link to that eureka.
So the use case would look something like:
eureka
->
Q: What subject would you like?
A: Card Mechanicle
Which would create a file called - CARD_MECHANICLE.MD
and append a link to it from the README.MD
, once ofcourse you finish writing the contents with VIM.
Hi
Thanks for sharing this program! I can see it being very useful in my workflow. Unfortunately I seem to be encountering a problem. Trying the latest release and git versions, I get this error message:
Adding and committing your new idea..
Added and committed!
Pushing your new idea..
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/barbarossa/.cargo/registry/src/github.com-1ecc6299db9ec823/eureka-1.8.1/src/git.rs:88:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'Box<Any>', /home/barbarossa/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.17/src/panic.rs:27:9
With RUST_BACKTRACE=1 I get:
Adding and committing your new idea..
Added and committed!
Pushing your new idea..
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/barbarossa/.cargo/registry/src/github.com-1ecc6299db9ec823/eureka-1.8.1/src/git.rs:88:47
stack backtrace:
0: rust_begin_unwind
at /build/rust/src/rustc-1.49.0-src/library/std/src/panicking.rs:495:5
1: core::panicking::panic_fmt
at /build/rust/src/rustc-1.49.0-src/library/core/src/panicking.rs:92:14
2: core::panicking::panic
at /build/rust/src/rustc-1.49.0-src/library/core/src/panicking.rs:50:5
3: eureka::git::Git::get_callbacks::{{closure}}
4: git2::remote_callbacks::credentials_cb::{{closure}}
5: git2::panic::wrap
6: git2::remote_callbacks::credentials_cb
7: handle_auth
8: handle_response.constprop.0
9: http_stream_read
10: git_smart__recv_cb
11: git_smart__store_refs
12: git_smart__connect
13: git_remote_connect
14: git2::remote::Remote::connect_auth
15: eureka::git::Git::push
16: eureka::Eureka<FH,W,R>::run
17: eureka::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'Box<Any>', /home/barbarossa/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.17/src/panic.rs:27:9
stack backtrace:
0: std::panicking::begin_panic
1: git2::remote::Remote::connect_auth
2: eureka::git::Git::push
3: eureka::Eureka<FH,W,R>::run
4: eureka::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The repo is private, and I believe I have my credentials stored; so in theory, eureka should be pushing commits no problem. I think I might be missing something anyway, do you have any ideas?
Maybe you want to change editor, or have a new idea repo. You should be able to flush your configuration.
Background
(#38, #39)
This project is written for macOS (because me, the author, uses a Mac) but not every user uses macOS. On Ubuntu the path to nano
is different from macOS.
Proposed solution
Before showing the user the list of editors, we should "query" the system to see what binaries are available at what locations.
Note: If the command which [editor]
returns 0
we can 1) know that the binary exists on the system, and 2) we get the path. So which
would be a good command for this.
Hi, I like your terminal color scheme on gif.
What terminal do you use and what color scheme is on that gif?
Currently git commands are invoked using std::process::Command
but should really be using git2.
I think serde
is being used because initially it was planned to have one JSON file with all config, but then it was decided to keep them separate. And I think serde
just stayed after that.serde
is no longer a dependency, see #21.
text_io
deals with user input. One macro is being used from the dependency and it feels like user input can be dealt with without an external dependency.
On Linux the preferred pager should be set in $PAGER
- you can still fall back to less, but this should take precedence
Currently it stores config in separate files which is not ideal. JSON format scales better.
When downloading the crate it's 1.7MB, which is way too big. Something is included in the package that should not be.
I just discover Eureka, from a tweet ! The idea sounds great and I just want to try it out
I have created a new private repository on GitHub with a Readme and clone it via SSH into my laptop.
When I add one idea into eureka, I get the following error
Adding and committing your new idea to main..
Added and committed!
Pushing your new idea..
ERROR eureka > No authentication method succeeded
Search into the documentation to see if some authentication from Git is needed and as I found nothing, I ask here if there is some configuration needed, or how could be the problem fixed ?
Thanks in advance
I considered installing this application, but considering the amount of setting up, getting used to and all the code I am seeing, I thought I'd be better off with a simple shell script. This is what I came up with:
#!/bin/sh
p=$PWD
cd $HOME/data/notes
case $1 in
log) file=life/${2:-general};;
idea) file=idea/$2.md;;
write) file=writings/$2.md;;
*) file=$2.md;;
esac
test "$3" && echo $3 >>$file || $EDITOR $file
git add $file
git commit -m $file
git push
cd $p
What is the reason for all that code, what more is your application doing?
Configuration files are expected to be in ~/.config/eureka/
/ $XDG_CONFIG_HOME/eureka/
per XDG Base Directory Specification instead of ~/.eureka/
Summary of the spec is on Arch Wiki:
https://wiki.archlinux.org/index.php/XDG_Base_Directory
The full specification is here:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Thanks.
It's a bit of a political hot topic right now, but I'm seeing that in the near future it might not be possible to assume users or repositories default to master
.
I propose moving the branch name out to something that can be configured rather than a hard-coded string of "master".
With #67 output to stdout changed so demo needs to reflect that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.