note v1.0 released today!

Cool, mate.

Gotta run, working on a method to allow 4 or more Arch-based Distros to run with other Linux Distros being installed and updated, without going into kernel panic. Currently have Manjaro, SwagArch, Netrunner Rolling (Arch-based) and Sonar running off the same big Grub Menu.

Later

Chris
 


@wizardfromoz :
OK, that fix has been applied and committed to my repo at notabug.org.

As usual open a terminal and navigate into the note directory, where you cloned the git repo.
The commands:
Code:
git pull
sudo ./install.sh
will pull down the latest changes and run the installation script.

Please let me know if this fixes the issue for you. Then I can close the bug I filed in my bug-tracker.
 
Last edited:
Finally off work and get a chance to play with this too. :D Used Mint's git to download, all okay with that.

Running sudo ./install.sh gave this error:
Code:
cp: target '/usr/local/share/man/man1' is not a directory
I modified install.sh to make MANDIR="/usr/share/man" and then it installed without error.


I am not able to create a new note with the command (with or without sudo):
Code:
note {file-name}
The error I get for that is:
Code:
/usr/local/bin/note: line 144: : command not found


Not sure if I have the syntax wrong or possible a permissions issue. Or because I changed MANDIR?
Code:
which note
outputs
Code:
/usr/local/bin/note


If I give the command by itself:
Code:
note
I do seem to get a proper output of:
Code:
List of notes:  #blank, of course, since no notes have been created


I'll go back and re-read the thread too... maybe I missed something in the past few days.

Cheers
 
Aha!
Now we're getting somewhere.
That means that /usr/local/share/man/ exists on your system.

So my initial hunch was correct.
No other programs have installed any documentation to /usr/local/share/man/man1

So the man1 subdirectory doesn't exist yet. Which is why you were getting that error.

So my installation script will need to create the directory for the man pages if it doesn't already exist.

Phew!
I'll post again later when I've made and uploaded the changes.
Hopefully that will put this issue to bed.

At some point in the next couple of days, I'll be adding an uninstall script. Would be rude not to!

Just to confirm again... today's install did not create /usr/local/share/man/man1 (but /usr/local/share/man does exist).

Also, to confirm, since I changed MANDIR in the install.sh, I can see the man pages with no problem by:
Code:
man note
man notesettings

Cheers
 
Finally off work and get a chance to play with this too. :D Used Mint's git to download, all okay with that.

Running sudo ./install.sh gave this error:
Code:
cp: target '/usr/local/share/man/man1' is not a directory
I modified install.sh to make MANDIR="/usr/share/man" and then it installed without error.

Goddamn it Mint - why do you not behave like other distros?!
OK, that's really odd.....
Traditionally programs installed to /usr/local/bin/ get their man pages installed to /usr/local/share/man/
And programs installed to /usr/bin get their man pages installed to /usr/share/man
So I try to respect that. I don't know why this isn't working for mint.....

We know that /usr/local/share/man exists and is on the manpath. The 'mkdir -p' I used in the script should create the man1 directory inside /usr/local/share/man/.. I don't understand why the copy operation is failing....

What is the result of the command:
Code:
file  /usr/local/share/man

Also try:
Code:
file /usr/local/share/man/man1

This is REALLY odd!
I wonder if perhaps Mint are using a symbolic link for the /man or /man1 part of the path or something?!
If file says they are directories - I really don't understand why cp is failing.
The script was ran as root via sudo - so there was enough privilege..... Hmmmm.....


I am not able to create a new note with the command (with or without sudo):
Code:
note {file-name}
The error I get for that is:
Code:
/usr/local/bin/note: line 144: : command not found

Yes - I believe this bug can be filed under ass/u/me - in other words I've been bitten on the arse by another of my naive assumptions. heh heh!

Line 144 is the line that attempts to create/open a note in the editor.

I have a sneaky suspicion that the environment variable $EDITOR is not set on your system.
So when notesettings attempted to set itself up - the $ED variable in settings.cfg will be empty.

After having a dig through my configs - It looks like I'm explicitly exporting it in my .bashrc.
I just ass/u/med that the version in my .bashrc was over-riding an existing environment variable. I hadn't considered that it might not exist at all.

If you run notesettings without any parameters - I have a feeling that you will probably see something like this:
Code:
ED=
KEEPEDITORBACKUPS=0
PAGER=/usr/bin/less

I'll have to update the settings script to ask the user which text editor note should use if $EDITOR is empty.

In the meantime, you can fix the editor related problem using notesettings:
Code:
notesettings -e $(which vim)
NOTE: substitute vim for whichever terminal based editor you'd prefer to use - nano, ed, emacs etc.

Then you will see something like:
Code:
ED=/usr/bin/vim
KEEPEDITORBACKUPS=0
PAGER=/usr/bin/less
Obviously, your output for $ED should reflect the path to your chosen editor.

So it looks like I still have a lot of work to do on this! XD
I haven't got any spare USB drives ATM - I need to get hold of one and try booting into Mint and try some messing from a fresh install.....

Thanks for all of the testing you guys are doing for me!
 
Last edited:
Hey, I'm glad to help, but sorry it's creating more work for you! :eek::D I am looking forward to using your note app too... it looks very handy, indeed. You've also motivated me (somewhat) to release a little script I've worked on... except I'm afraid I will then have to spend too much time to fix/enhance it! (Believe me, scripting or any programming is out of my experience, so even simple things are quite difficult.)

So, anyway... you were quite right about the editor. I used notesettings to choose gedit and can now create/open new notes. Woo-hoo! :D

The install script does seem to fail to create the man1 directory, but man already exists. To follow your instructions:
Code:
file /usr/local/share/man
returns:
Code:
/usr/local/share/man: directory

and
Code:
file /usr/local/share/man/man1
returns
Code:
/usr/local/share/man/man1: cannot open `/usr/local/share/man/man1' (No such file or directory)


I'll be happy to do any further testing that you would like, or uninstalling and reinstalling if needed.

Cheers
 
Oh I am a complete idiot.....HA!

I've just spotted the problem with the man-page related bug.

In line 19 of install.sh - I forgot to append "/man1" to the end of the line.
That would be the cause of that then....
I can't believe I missed that..... ::rolleyes::

The latest commit should definitely fix the man page installation problem!

Regarding the $EDITOR related bug - that will require a bit of rework in the notesettings script. I will make that my next priority over the next few days.

Changes have been pushed to the repo.

@atanere :
Before you try to update from git - you will need to tell git to discard the changes you made to install.sh (otherwise git will complain):
Code:
git checkout -- install.sh

To remove note and notesettings:
Code:
rm /usr/local/bin/note
rm /usr/local/bin/notesettings

Then you might want to remove the man-pages that you installed to /usr/share/man/man1/, so you don't end up with duplicate man pages in different directories on your file-system.
Code:
rm /usr/share/man/man1/note.1
rm /usr/share/man/man1/notesettings.1

After that, the update will be the usual:
Code:
git pull
sudo install.sh

I am 99.99999999% certain that the man page related problems are finally fixed!
I am also sorry for any bad things I said about Mint - I take them back. And I am an absolute idiot! XD
 
Needed sudo, of course, to rm those files, but all is well. Fresh install went without a hitch, and the man pages are now where you want them in /usr/local/share/man/man1. :cool::D

Clem will be happy to read your apology! LOL :D:D:D

Cheers
 
OK I'm still digesting the above while I'm on my second coffee and have a short road trip to take back in about 4 hours.

But following #22 I get

chris@SylviaMATE-Study ~ $ ls
Desktop Documents Downloads Music note Pictures Public Templates Videos
chris@SylviaMATE-Study ~ $ git pull
fatal: Not a git repository (or any of the parent directories): .git
chris@SylviaMATE-Study ~ $ ls

/ass/u/me - I love that, sounds like me :D

Wiz
 
Needed sudo, of course, to rm those files, but all is well. Fresh install went without a hitch, and the man pages are now where you want them in /usr/local/share/man/man1. :cool::D

Clem will be happy to read your apology! LOL :D:D:D

Cheers

@atanere
Re: Sudo
As homer would say "D'oh!" - you're right. I forgot the sudo in those rm commands... Sorry!

Glad that bug has been put to bed though. Phew!
Just the $EDITOR bug to fix in the notesettings script now.


@wizardfromoz :
Re:
OK I'm still digesting the above while I'm on my second coffee and have a short road trip to take back in about 4 hours.

But following #22 I get

chris@SylviaMATE-Study ~ $ ls
Desktop Documents Downloads Music note Pictures Public Templates Videos
chris@SylviaMATE-Study ~ $ git pull
fatal: Not a git repository (or any of the parent directories): .git
chris@SylviaMATE-Study ~ $ ls

/ass/u/me - I love that, sounds like me :D

Wiz

That's because you weren't in the note/ directory.
Sorry I wasn't clear, I suppose I should have put "cd note" in the list of commands.
You need to be inside the cloned repo in order to use git pull.
e.g.
Code:
cd note
git pull
sudo ./update.sh

The original instructions from that post were:
@wizardfromoz :
As usual open a terminal and navigate into the note directory, where you cloned the git repo.
The commands:
Code:
git pull
sudo ./install.sh
will pull down the latest changes and run the installation script.


BTW: I know you're still reading through the thread from a few posts back - but you can safely skip a LOT of the instructions in the previous posts now.

The next time you pull from the git repo - you will have the most up to date version of note.
The man-page related bug in install.sh has finally been fixed.

There is one bug that might catch you out. One that Stan discovered and disclosed in post 23 (quoted below for your convenience:
I am not able to create a new note with the command (with or without sudo):
Code:
note {file-name}
The error I get for that is:
Code:
/usr/local/bin/note: line 144: : command not found
That is due to a bug that occurs in the first-run of notesettings. I was naively thinking that the $EDITOR environment variable would exist on all systems. So that is something I have to work on.

But there is a simple workaround that will fix the issue.
If you do get that error, you just need to run the notesettings script and tell it which editor you want it to use.
e.g.
Code:
notesettings -e $(which vim)
or if you wanted to use nano, or emacs, or ed, or even a GUI text editor like gEdit, geany, kate - you simply call "notesettings -e " with the path to your favourite editor.

I didn't really have GUI based editors in mind when I created note, but note will happily use GUI based editors!
 
A picture is worth 1,000 words

7VyFV32.png


From CT to JT - nice work :p
 
A picture is worth 1,000 words
From CT to JT - nice work :p

Thanks to you and Stan - I've managed to make a lot of improvements to my little system already.
So thank you both @wizardfromoz and @atanere

I know that note itself is fine - I've had no problems with it over the past 5 years. It's a neat little program.

All of the problems were in the installation and configuration scripts - which I only provided as a convenience to potential users. But thanks to my "ass/u/me" related problems - it turned out to be a bit more of a pain.... So sorry about that. It was a bit of a poor show on my part!

I could have just posted installation instructions that said:
"copy the scripts to somewhere on your path, copy the man-pages to somewhere on your manpath and run notesettings to set up your editor and pager" and nobody would have been any the wiser.

But I tried to be "clever" and provide a convenient installer and automatic "smart" initialisation for the settings script and ended up making myself look a bit stupid in the process! Heh heh!

But it's been a valuable learning experience for me. It's given me a few things to think about and a few ideas on how to improve things.

It's also highlighted the fact that I need to get a spare system (or as mentioned - at least a couple of USB-sticks) so I can set up a clean install in a clean environment and properly test things.

My laptop isn't a suitable environment for testing because its 'dirty' - there are tons of customisations I've made and tons of additional bits of software and environment variables floating about.

At least I have something to fill my evenings and weekends now. Especially seeing as I can't drum at the moment. I'm still recovering from some injuries I sustained in October and December last year. It's a long story, so it's in a spoiler below!

In October I broke my left ankle whilst walking down some stairs at work. Completely normally - no slip, no awkward twist of the ankle. Nothing dramatic - just walking normally - step, step, step, *Crack* - PAIN!

One of the tendons came away from the bone and took a good sized chunk of bone with it. An avulsion fracture!

And then in December - a few days after xmas - I managed to tear several tendons/ligaments in my left shoulder whilst trying to put a heavy box in the loft.

Looking back - trying to climb the narrow loft-ladder with my left leg in a giant orthopaedic boot (containing a broken ankle), whilst lifting a heavy box probably wasn't the smartest move I've ever made! :/

If my ankle wasn't broken and my leg wasn't in that damn boot - I would have been up the ladder like a shot with that box and it wouldn't have been a problem.

But thanks to the boot, it took about 3 or 4 mins, which was a long time to be awkwardly carrying that weight. Just as I got to the top of the ladder - my left shoulder completely went... I dropped the box into the loft and screamed - the pain was unreal.
Fortunately, I didn't pass out or anything, or there would have been some kind of fall involved as well. I dread to think what might have happened if I'd lost consciousness.

And then I had to try and get back down again.

Anyway - my ankle has healed nicely and is almost fully rehabilitated now. But the shoulder is still quite painful and has an extremely limited range of movement. So no drumming yet. :(

I haven't even seen my drumkit since the beginning of November, when I played Kinasis' final gigs of 2017 with a broken ankle.

Luckily they've got someone to stand-in for me for the first few gigs/tours of 2018. But if my shoulder doesn't start improving soon, I think they'll have to start looking for a more permanent replacement! :/


Anyway - thanks again for all of the testing.
I hope note proves to be useful to you!
 
Hey Jason... you look more like a genius to me! :D It's a really nice little app, and the installer/configuration scripts and man pages make it quite a professional product, in my opinion. Quickly finding and fixing the few little hiccups actually helps to show your skills. I'm quite pleased and intend to use it... I've already put a few notes into it that I use repeatedly.

I don't know how you're going to tackle the EDITOR issue, but isn't a simple solution to just hardcode vim (or nano) into it, and then give instructions on how to change it? That would prevent a first-run failure on creating a note. But you know better than me, and you probably have a more elegant solution in mind.

Anyway... thank you! :cool::D:D:D

Cheers
 

Members online


Top