Comments (9)
@rpearce: @charles-l has opened a draft to handle the same, I could, for now:
- warn users to use
:quit
to save and close - replicate the behavior of
:quit
on receivingSIGINT
@ondreian Now that I think about it, auto save shouldn't be too hard to implement, feel free to request it over at #10 (I will keep it in my list of things to do nevertheless).
from dijo.
Robert @rpearce I noticed that when I installed on MacOs with $ cargo install dijo
it saves data just fine.
However if I clone this repo, then invoke with $ cargo run
data is not saved.
Is this what you see, too?
from dijo.
@StevenBlack Thank you for your quick 👀!
I installed on macOS via $ cargo install dijo
from dijo.
I'm actually also having this problem on Ubuntu, it saved the first day's entries, but has not persisted anything for the next 2 days.
edit: I used cargo install
to install it
edit 2: Yesterday (second day) I also added a new habit, and it did not save that habit.
from dijo.
Very strange, dijo
should panic if your file permissions are wrong or if the directory is inaccessible. It is also weird that only some users are facing this issue.
@ondreian could you please paste the outputs of the following, after running dijo
, adding a habit and quitting with :q
:
dijo -V
ls -al ~/Library/Application\ Support/rs.nerdypepper.dijo
(macOS)ls -al ~/.local/share/dijo/
(gnu/linux)echo $HOME
(probably not relevant to this issue)
To answer your question regarding default directory @rpearce, dijo
always selects Application Support
over $XDG_DATA_HOME
on macOS, because macOS doesn't follow XDG
base dirs spec (usually).
from dijo.
@ondreian could you please paste the outputs of the following, after running
dijo
, adding a habit and quitting with:q
:
dijo -V
dijo 0.1.4
ls -al ~/.local/share/dijo/
(gnu/linux)
total 16
drwxrwxr-x 2 benjamin benjamin 4096 Jul 20 11:49 ./
drwx------ 37 benjamin benjamin 4096 Jul 20 21:02 ../
-rw-rw-r-- 1 benjamin benjamin 2 Jul 22 11:56 'habit_record[auto].json'
-rw-rw-r-- 1 benjamin benjamin 241 Jul 22 11:56 habit_record.json
Shouldn't this be ~/.config/<user>
? I have enabled=True
enabled in my /etc/xdg/user-dirs.conf
echo $HOME
(probably not relevant to this issue)
/home/benjamin
I did alt + f4
my terminal in totality when I shut down for the day, but when I was scanning the source code before I installed, it looked like it should persist the state anytime the state is changed. I shouldn't have to always manually :q
to shutdown?
edit:
after some investigation if I do any sort of operations and then use alt +f4
to shutdown my terminal nothing is persisted, if I manually :q
it is.
from dijo.
@ondreian ah, dijo
doesn't autosave. You have to quit with :q
to to save and quit. A :write
command is in the works, to save state, but that would also be manual. At the moment, auto-save as a feature is not being worked on.
Shouldn't this be ~/.config/?
dijo
saves data in $XDG_DATA_HOME
and will be saving config files (once added) in $XDG_CONFIG_HOME
, as per XDG
base dirs spec. In the future, you should be able to choose a data dir to save .json
records.
from dijo.
Wow -- :q
totally was it. I was using ctrl+c
. It almost feels like a SIGINT
or SIGTERM
or whatever should prompt you, but I'm not on that committee :)
On the XDG note, I have all those vars configured on macOS so that programs will use them, and I can version control those if I want. I wonder if there's a way to specify the save directory for dijo
... closing, for the original thing has been sorted by me not using :q
.
Thank you!!
from dijo.
ah, dijo doesn't autosave. You have to quit with :q to to save and quit. A :write command is in the works, to save state, but that would also be manual. At the moment, auto-save as a feature is not being worked on.
I can move this discussion to a new issue if you like, seems we have figured out the mystery of the lost information. Before I open a new issue, does autosave fit with the goals of this project?
from dijo.
Related Issues (20)
- Use $XDG_... folders on macOS HOT 1
- Configure the number of columns HOT 2
- can't find dijo config file HOT 2
- Man pages has not been released HOT 2
- Customisation: Ability to change cursor colour HOT 2
- Make the view scrollable HOT 1
- Compilation error on OpenBSD
- Set hour at which day ends
- Request: Use `BTreeMap` instead of `HashMap` for serialization
- Wrong weekdays position on calendar
- Mobile phone integration? HOT 1
- Unclear documentation HOT 1
- Add `habit` to tags
- After the new day begins, the cursor cannot update.
- failed to select a version for the requirement `ahash = "^0.6"` HOT 1
- How do you use the `false` values? HOT 1
- The build for this broke, due to external crate change. HOT 2
- Man pages? HOT 2
- v0.2.4 build problem HOT 2
- Failed to install HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dijo.